Below is the list of complex functions available in jQuery.e-dom.2.0.js. Here is the link to the package with examples.
Prepares the element to periodical refresh (initiated by StartRefreshing()) or single refresh (launched by .RefreshIt()). Simplifies the handling of the data received from PLC.
Parameters:
Example 1 (within $(window).load):
$('#ReadField1').MakeReadField({ read: 'QX0.5' });
After the StartRefreshing() is called, the data from QX0.5 address will be requested periodically and the response will be written into ‘Readfield1’,
Example2:
$('#ReadField2').MakeReadField({ 'IW0', valuetype: ‘temp’ });
After the StartRefreshing() is called, the data from IW0 will be requested periodically and the response will be converted into temperaturę (divided by 10, unit added) and written into ‘ReadFile2’.
Example 3:
$('#ReadField3').MakeReadField({ read:'QX0.5', refreshtype: 'status', image: 'ReadField3_Image' });
After the StartRefreshing() is called, the data from QX0.5 will be requested periodically and the response will be compared with the status of the ‘ReadField3’ element. If status needs to be changed, the ‘flipped’ class will be added/removed and the ReadField3_Image will be changed.
Chanes the given element into a button, which when clicked sends the given data to the PLS. After the data is sent it can optionally trigger a refresh of another element.
Parameters:
Example 1 (within $(window).load):
$('#Button1').MakeWriteButton({ write:'MB11', staticvalue: 1 });
After the Button1 is clicked, '1' is sent to the PLC to MB11 address. Nothing else happens.
Example 2:
$('#Button2').MakeWriteButton({ write: 'MB11', dynamicvalue: 'datafield1' });
Afterh the Button2 is clicked, the value stored in 'datafield1' is sent to the PLC to MB11 address.
$('#Button3').MakeWriteButton({ write: 'MB11', staticvalue: 1, refreshonwrite: 'ButtonHolder' });
After Button3 is clicked, '1' is sent to the PLC to MB11 address. After a successful write the ‘ButtonHolder’ is refreshed
It is a combination of the .MakeReadField() and the .MakeWriteButton functions.
Changes the given element into a button, which when clicked sends 1 and 0 to the plc ('tap'). Additionally the given element will be periodically refreshed and its status will be updated.
Parameters:
Example 1 (within $(window).load):
$('#Button1').MakeTapButton({ write: 'MB11', read: 'QX0.5' });
Button1 will be a button, which 'taps' the variable under MB11 address and changing its status in line with the data received from QX0.5
$('#Button2').MakeTapButton({ write: 'MB11', read: 'QX0.5', image: 'Button2_Image', tapduration: 1000 });
As in Example 1, but the tap, sent when the button's status is 0 will last over 1 sec. The image with id ‘Button2_Image’ will be changed in line with the status of the button.