Class PLCmon.Action

Object
   |
   +----PLCmon.Action

public class Action
extends Object
This constructor creates a data object which contains the instruction and data to be read from or written into the PLC via the ConnectTLServer object

 


 

Variable Index

DM
Reference to the DM[n] array to be used for storing READDM data or to be used as the source for WRITEDM action
ID
The ID of the PLC to be accessed, it should be in the range of 00 to FF hex or 0 to 255 decimal.
actionType
Read or Write action represented by ActionConstant.READSINGLE, ActionConstant.WRITESINGLE, ActionConstant.READDM and ActionConstant.WRITEDM
index
Index to the system variable.
result
whether read or write action is successful.
stringValue
String data for WRITESINGLE action or returned String for READSINGLE action
value
Integer data for WRITESINGLE action or returned data for READSINGLE action
varCount
Number of variables to read
varType
Variable type (input, output, DM, timerSV, etc).

Constructor index

PLCmon.Action(int, int, int, int, int)
Constructor for READSINGLE OR WRITESINGLE integer
PLCmon.Action(int, int, int, int, int, String, int[], int)
Most complete form of constructor
PLCmon.Action(int, int, int, int, int, int[])
 
PLCmon.Action(int, int, int, int, String)
Constructor for READSINGLE OR WRITESINGLE String variable
 

Variables

DM
public int[] DM
Reference to the DM[n] array to be used for storing READDM data or to be used as the source for WRITEDM action

 

ID
public int ID
The ID of the PLC to be accessed, it should be in the range of 00 to FF hex or 0 to 255 decimal.

 

actionType
public int actionType
Read or Write action represented by ActionConstant.READSINGLE, ActionConstant.WRITESINGLE, ActionConstant.READDM and ActionConstant.WRITEDM

 

index
public int index
Index to the system variable. E.g. 1 for INPUT[1], 5 for DM[5]. etc. Use character 'A' to 'Z' for Integer and String variables.

 

result
public int result
whether read or write action is successful.
The result codes are defined in the ActionConstant and would be one of the following:

 

OK
LOSTSVRERROR
PLCNORESPONSE
CORRUPTEDRESPONSE
ACCESSLEVELVIOLATION
UNSENT
PLCPWDERROR

 

stringValue
public java.lang.String stringValue
String data for WRITESINGLE action or returned String for READSINGLE action

 

value
public int value
Integer data for WRITESINGLE action or returned data for READSINGLE action

 

varCount
public int varCount
Number of variables to read

 

varType
public int varType
Variable type (input, output, DM, timerSV, etc).
The variable type are defined in the ActionConstant class as follow:
DM
INPUT
OUTPUT
RELAY
TIMER
CTR
TIMERPV
CTRPV
CLK
DATE
HSCPV
ADC
DAC
PWM
RESERVE
EMINT
EMLINT
EMEVENT
INTEGER
STRING
TIMERSV
CTRSV

E.g. Action action = new Action(1, ActionConstant.READSINGLE, ActionConstant.INTEGER, 0, "");

 

 

Constructors

Action
public Action(int ID,
              int actionType,
              int varType,
              int index,
              int value)
Constructor for READSINGLE OR WRITESINGLE integer

 

Action
public Action(int ID,
              int actionType,
              int varType,
              int index,
              int value,
              String s,
              int DM,
              int dmCount)
Most complete form of constructor

 

Action
public Action(int ID,
              int actionType,
              int varType,
              int index,
              int dmCount,
              int DM)
Action
public Action(int ID,
              int actionType,
              int varType,
              int index,
              String stringValue)
Constructor for READSINGLE OR WRITESINGLE String variable