Class PLCmon.Action
All Packages  Class Hierarchy  This Package  Previous  Next  Index

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

 o DM
Reference to the DM[n] array to be used for storing READDM data or to be used as the source for WRITEDM action
 o 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.
 o actionType
Read or Write action represented by ActionConstant.READSINGLE, ActionConstant.WRITESINGLE, ActionConstant.READDM and ActionConstant.WRITEDM
 o index
Index to the system variable.
 o result
whether read or write action is successful.
 o stringValue
String data for WRITESINGLE action or returned String for READSINGLE action
 o value
Integer data for WRITESINGLE action or returned data for READSINGLE action
 o varCount
Number of variables to read
 o varType
Variable type (input, output, DM, timerSV, etc).

Constructor Index

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

Variables

 o 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

 o 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.

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

 o 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.

 o 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

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

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

 o varCount
public int varCount
Number of variables to read

 o 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

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

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

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


All Packages  Class Hierarchy  This Package  Previous  Next  Index