IDEC FC6A-C16K1CE Communications Manual page 243

Fc6a series microsmart all-in-one type
Hide thumbs Also See for FC6A-C16K1CE:
Table of Contents

Advertisement

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)
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.
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)
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.
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.
FC6A S
M
S
A
ERIES
ICRO
MART
-
-O
T
C
LL
IN
NE
YPE
OMMUNICATION
M
FC9Y-B1730
ANUAL
11: W
S
EB
ERVER
11-25

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents