'Inteligenty' dom ze sterownikiem PLC

 Language:
Szukanie zaawansowane  

Aktualności:

Powrót do strony głównej: www.edom-plc.pl

Autor Wątek: jQuery / STRING and REAL values  (Przeczytany 3828 razy)

adam

  • Newbie
  • *
  • Wiadomości: 3
    • Zobacz profil
jQuery / STRING and REAL values
« dnia: Lutego 20, 2013, 04:57:30 pm »

Hi there!

Starting to work on visualisations based on jQuery / Modbus / Wago 750-881, I can't get over this problem.
I Codesys I've got declared:
sun_elevation AT %MW200  : REAL;
sun_elevation_round    AT %MW202  : WORD;
status_text    AT %MW1000 : STRING(10);
When I use
$('#Elevation').MakeReadField({
   read:   'MW200',     
});

$('#Status').MakeReadField({
   read:   'MW1000',     
});
I'm getting only some numbers, both for the REAL and the STRING :-(

Secondly, as I am realy a newbie to this, could you help as well, how to re-format the value gained from MakeReadField function? I need to devide the gained numeb by 100 for instance, before updating the value within the DIV element.
Any hints please?
Thanks Adam
Zapisane