
StoreX
Series
Remote Operation V0712 .doc
8
RKi, 26.11.2020
DISCONTINUED
FUNCTION STX_OpenCom(pN:INTEGER):STRING;
BEGIN
STX_OpenCom:=STX_ReadBackStr(pN,'CR')
END;
Time out functions and communication error can be trapped at this level.
FUNCTION STX_CloseCom(pN:INTEGER):STRING;
BEGIN
STX_CloseCom:=STX_ReadBackStr(pN,'CQ')
END;
These examples show how simple communication becomes when using the
“STX_ReadBack” procedure. The following example explains how often used sequences are
programmed. The ‘Set-‘procedure sets an internal relay (or flag). The value of the flag
becomes ‘1’. The ‘Reset-‘procedure resets an internal relay (or flag) . The value of the flag
becomes ‘0’. Flags can be set, reset or read.
FUNCTION STX_Set(pN,rel:INTEGER):STRING;
VAR sR:STRING;
BEGIN
Str(rel,sR);
STX_Set:=STX_ReadBackStr(pN,'ST '+sR)
END;
FUNCTION KV_Reset(pN,rel:INTEGER):STRING;
VAR sR:STRING;
BEGIN
Str(rel,sR);
STX_Reset:=STX_ReadBackStr(pN,'RS '+sR)
END;
FUNCTION STX_Read(pN,rel:INTEGER):STRING;
VAR sR:STRING;
BEGIN
Str(rel,sR);
STX_Read:=STX_ReadBackStr(pN,'RD '+ sR)
END;
The Set and Reset will return an ‘OK’-response if operation is successful. The Read-
procedure will return a ‘0’ or ‘1’.
Data memories are 16 bit oriented. They can be read or written. The following examples
show how to use the data memories.
FUNCTION STX_ReadDataMemory(pN,nbr:INTEGER):STRING;
VAR sR:STRING;
BEGIN
Str(nbr,sR);
STX_ReadDataMemory:=STX_ReadBackStr(pN,'RD DM'+ sR)
END;
FUNCTION STX_WriteDataMemory(pN,nbr:INTEGER; valu:WORD):STRING;
VAR sR,sV:STRING;
BEGIN
Str(nbr,sR); Str(valu,sV);
STX_ReadDataMemory:=STX_ReadBackStr(pN,'WR DM'+ sR + ' ' + sV)
END;
Note that the Response on the above Write procedure is always ‘OK’. The Read procedure
will return a five-character-string.