
FC6A S
ERIES
M
ICRO
S
MART
A
LL
-
IN
-O
NE
T
YPE
C
OMMUNICATION
M
ANUAL
FC9Y-B1730
11-25
11: W
EB
S
ERVER
JavaScript Functions
When the monitor function is enabled, device data can be read and written using JavaScript functions.
The raw data obtained via CGI can be used and processed in a more complicated manner than that when using metacharacters.
See the appendix for details about the CGI interface.
■
Read Device Data Function
Idec.device_read (device, address, length, driver, net_no)
The return value is a hexadecimal numeric value in a string with the format "XXXX". If length is 2 or larger, "_" is inserted between
items of data. The return value is "" if there was no response from the server or if the parameters are incorrect.
Note:
The function is as follows when D2058 is 49910 (C2F6h) and D2059 is 59768 (E978h).
var raw_data = idec.device_read (“D”, 2058, 2, 0, 0);
The variable raw_data will be "C2F6_E978" when the function normally terminates.
■
Write Device Data Function
idec.device_write (device, address, length, driver, net_no, data)
The return value is true when the function normally terminates and false in all other cases.
Note:
The function is as follows when writing 49910 (C2F6h) to D2058 and 59768 (E978h) to D2059.
var status_write = idec.device_write (“D”, 2058, 2, 0, 0, “C2F6_E978”);
The variable status_write is true when the function normally terminates.
device
: Sets the device to read as a string.
Currently only D (data register) can be used.
address
: Sets the device number to read.
length
: Sets the size of the data from the start of address to read.
Set this as a decimal value between 1 and 64.
driver
: The driver number. Set this to 0.
net_no
: The network number. Set this to 0.
device
: Sets the device to write as a string. Currently only D (data register) can be used.
address
: Sets the device number to write.
length
: Sets the size of the data from the start of address to write. Set this as a decimal value between 1 and 64.
driver
: The driver number. Set this to 0.
net_no
: The network number. Set this to 0.
data
: Sets the data to write as a hexadecimal numeric value in a string. If length is 2 or larger, insert "_"
between items of data.
Содержание MICROSmart FC6A-C16K1CE
Страница 1: ...B 1730 2 FC6A SERIES All in One Type Communication Manual...
Страница 60: ...3 COMMUNICATION SETTINGS 3 22 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 76: ...4 MAINTENANCE COMMUNICATION 4 16 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 126: ...5 USER COMMUNICATION INSTRUCTIONS 5 50 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 158: ...6 MODBUS COMMUNICATION 6 32 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 200: ...8 J1939 COMMUNICATION 8 32 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 218: ...10 SEND E MAIL FUNCTION 10 16 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 252: ...INDEX 4 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730 INDEX...