<< Click to Display Table of Contents >> Common RTU and TCP library |
![]() ![]() ![]() |
commonserverwrite(Input1, Input2) - used to write byte to the common server. Input1 contains name of the server. Input2 contains value to write.
Example:
commonserverwrite(”CommonServer", 1);
commonserverwritearray(Input1, Input2) - used to write byte array to the common server. Input1 contains name of the server. Input2 contains array to write.
Example:
byte bytes[8] = [01,04,00,01,00,02,32,11];
commonserverwritearray(”CommonServer", bytes);
commonserverwritestring(Input1, Input2) - used to write string to the common server. Input1 contains name of the server. Input2 contains string to write.
Example:
commonserverwritestring(”CommonServer", "Hello");
commonserverread(Input1) - used to read byte from the common server. Input1 contains name of the server.
Example:
int value = commonserverread(”CommonServer");
commonserverreadarray(Input1) - used to read byte array from the common server. Input1 contains name of the server.
Example:
byte bytes[8] = [00,00,00,00,00,00,00,00];
bytes = commonserverreadarray(”CommonServer");
commonserverreadstring(Input1, Input2) - used to read string from the common server. Input1 contains name of the server.
If Input2 is true ENTER (/r/n) value is excluded.
Example:
string text = commonserverreadstring(”CommonServer". true);