Opto22.Controller
Controller .Net Software Development Kit for SNAP-PAC
|
Item class for configuring and submitting grouped item reads. More...
Public Member Functions | |
Item () | |
Constructor More... | |
void | Reset () |
Reset the item object for reuse. More... | |
String | GetTag () |
Retrieve the item tag name. More... | |
eItemTypes | GetItemType () |
Retrieve the item tag type. More... | |
Int32 | GetStartIndex () |
Retrieve the item's table start index. Only useful if this is a table type. More... | |
Int32 | GetNumberofElements () |
Retrieve the number of elements requested from the table. Only useful if the item is a table type. More... | |
Boolean | GetData (out Boolean bValue) |
Retrieve the data as an bValue. Returns false if the data type mismatches or is incorrect. More... | |
Boolean | GetData (out Int32 i32) |
Retrieve the data as an Int32. Returns false if the data type mismatches or is incorrect. More... | |
Boolean | GetData (out Int64 i64) |
Retrieve the data as an Int64. Returns false if the data type mismatches or is incorrect. More... | |
Boolean | GetData (out Single f32) |
Retrieve the data as a Single. Returns false if the data type mismatches or is incorrect. More... | |
Boolean | GetData (out String s) |
Retrieve the data as a string. Returns false if the data type mismatches or is incorrect. More... | |
Boolean | GetData (out Int32[] i32ary) |
Retrieve the data as an Int32 array. Returns false if the data type mismatches or is incorrect. More... | |
Boolean | GetData (out Int64[] i64ary) |
Retrieve the data as an Int64 array. Returns false if the data type mismatches or is incorrect. More... | |
Boolean | GetData (out Single[] f32ary) |
Retrieve the data as a Single array. Returns false if the data type mismatches or is incorrect. More... | |
Boolean | GetData (out String[] sary) |
Retrieve the data as a string array. Returns false if the data type mismatches or is incorrect. More... | |
Boolean | GetData (out eChartStatus ChartStatus) |
Retrieve the data as a chart status enumeration. Returns false if the item was set with an incorrect enumeration (type). More... | |
Boolean | GetAnalogData (Item.eAnalogPointAttributes AnalogAttribute, out Single f32Value) |
analog point and pointer to analog point attribute fetch More... | |
Boolean | GetDiscreteData (Item.eDiscretePointAttributes DiscreteAttribute, out Boolean bValue) |
discrete point and pointer to analog point attribute fetch More... | |
Boolean | GetDiscreteData (Item.eDiscretePointAttributes DiscreteAttribute, out Int32 i32Value) |
discrete point and pointer to discrete point 32-bit integer attribute fetch More... | |
Boolean | GetPidData (Item.ePidAttributes PidAttribute, out Single f32Value) |
Access data from a PID or pointer to a PID read. More... | |
Boolean | GetPidData (Item.ePidAttributes PidAttribute, out Boolean bValue) |
Access data from a PID or pointer to a PID read. More... | |
Boolean | SetAnalogRead (String sNewTag, eItemTypes eNewType, eAnalogPointAttributes[] earyNewAnalogAttributes, Int32 i32AttributeLength) |
Set an analog point read with attributes. Use for grouped reads. More... | |
Boolean | SetDiscreteRead (String sNewTag, eItemTypes eNewType, eDiscretePointAttributes[] earyNewDiscreteAttributes, Int32 i32AttributeLength) |
Configure a discrete point read. Use for grouped reads. More... | |
Boolean | SetPidRead (String sNewTag, eItemTypes eNewType, ePidAttributes[] earyNewAttributes, Int32 i32AttributeLength) |
Set a PID to read. Use for grouped reads. More... | |
Boolean | SetRead (String sNewTag, eItemTypes eNewType) |
Set an Item to Read (for non-table types). Use for grouped reads. More... | |
Boolean | SetRead (String sTag, eItemTypes eType, Int32 i32StartIndex, Int32 i32Elements) |
Set an Item to Read (for table types). Use for grouped reads. More... | |
Properties | |
Boolean | SuccessfulRead [get] |
Retrieve the success flag, only valid when ReadList() or WriteList() return true. More... | |
Int32 | ErrorResult [get] |
Retrieve the adjoining error code when a GetSuccessStatus or GetStatus(bSuccess) return a false value. More... | |
Item class for configuring and submitting grouped item reads.
This object must be used in the context of a single thread.
Item types. To retrieve data from ReadGroupItems(), see the GetData() overloads of Opto22.Controller.Controller.Item.
Enumerator | |
---|---|
invalid |
An invalid tag type. |
integer32 |
[ReadGroupItems(), Read32BitIntegerVariable(), Write32BitIntegerVariable()] 32-Bit Integer Variable (returns an Int32 type) |
pinteger32 |
[ReadGroupItems(), Read32BitIntegerVariable(), Write32BitIntegerVariable()] Pointer to a 32-Bit Integer Variable (returns an Int32 type) |
integer64 |
[ReadGroupItems(), Read64BitIntegerVariable(), Write64BitIntegerVariable()] 64-Bit Integer Variable (returns an Int64 type) |
pinteger64 |
[ReadGroupItems(), Read64BitIntegerVariable(), Write64BitIntegerVariable()] Pointer to a 64-Bit Integer Variable (returns an Int64 type) |
float32 |
[ReadGroupItems(), Read32BitFloatVariable(), Write32BitFloatVariable()] 32-Bit Float (returns a Single type) |
pfloat32 |
[ReadGroupItems(), Read32BitFloatVariable(), Write32BitFloatVariable()] Pointer to a 32-Bit Float (returns a Single type) |
uptimer |
[ReadGroupItems(), ReadUpTimerVariable(), WriteUpTimerVariable()] Up-Timer (returns a Single type) |
puptimer |
[ReadGroupItems(), ReadUpTimerVariable(), WriteUpTimerVariable()] Pointer to an Up-Timer (returns a Single type) |
downtimer |
[ReadGroupItems(), ReadDownTimerVariable(), WriteDownTimerVariable()] Down-Timer (returns a Single type) |
pdowntimer |
[ReadGroupItems(), ReadDownTimerVariable(), WriteDownTimerVariable()] Pointer to a Down-Timer (returns a Single type) |
stringvariable |
[ReadGroupItems(), ReadStringVariable(), WriteStringVariable()] String Variable (returns a String type) |
pstringvariable |
[ReadGroupItems(), ReadStringVariable(), WriteStringVariable()] Pointer to a String Variable (returns a String type) |
integer32table |
[ReadGroupItems(), Read32BitIntegerTable(), Write32BitIntegerTable()] 32-Bit Integer Table (returns an Int32[] type) |
pinteger32table |
[ReadGroupItems(), Read32BitIntegerTable(), Write32BitIntegerTable()] Pointer to a 32-Bit Integer Table (returns an Int32[] type) |
integer64table |
[ReadGroupItems(), Read64BitIntegerTable(), Write64BitIntegerTable()] 64-Bit Integer Table (returns an Int64[] type)hell |
pinteger64table |
[ReadGroupItems(), Read64BitIntegerTable(), Write64BitIntegerTable()] Pointer to a 64-Bit Integer Table (returns an Int64 type) |
float32table |
[ReadGroupItems(), Read32BitFloatTable(), Write32BitFloatTable()] 32-Bit Float Table (returns a Single[] type) |
pfloat32table |
[ReadGroupItems(), Read32BitFloatTable(), Write32BitFloatTable()] Pointer to a 32-Bit Float Table (returns a Single[] type) |
stringtable |
[ReadGroupItems(), ReadStringTable(), WriteStringTable()] String Table (returns a String[] type). |
pstringtable |
[ReadGroupItems(), ReadStringTable(), WriteStringTable()] Pointer to a String Table (returns a String[] type) |
chart |
[ReadGroupItems(), ReadStringTable(), WriteStringTable()] Chart status, returns eChartStatus) |
pchart |
[ReadGroupItems(), ReadStringTable(), WriteStringTable()] Pointer to a chart, returns eChartStatus) |
powerupclear |
Internal operation performed when opening a connection to a controller. |
firmwareversion |
[ReadItem()] Firmware version of the controller (returns a String type) |
partnumber |
[ReadItem()] Returns connected device's part number (returns a String type) |
stackdepth |
[ReadItem()] Stack depth (returns an Int32) |
volatilememory |
[ReadItem()] Volatile memory available. (returns an Int32) |
nonvolatilememory |
[ReadItem()] Non-volatile memory available. (returns an Int32) |
filememory |
[ReadItem()] Amount of file memory available (does not include MicroSD). (returns an Int32) |
uptimeseconds |
[ReadItem()] Time in seconds since controller has been continuously running in seconds. (returns and Int32) |
strategyname |
[ReadItem()] Name of the strategy. Blank if a strategy is not found. (returns String) |
strategytimestamp |
[ReadItem()] Timestamp of the strategy. Blank if a strategy is not found. (returns String) |
strategydatestamp |
[ReadItem()] Datestamp of the strategy. Blank if a strategy is not found. (returns String) |
autorunstatus |
[ReadItem()] Autorun status. Non-zero indicates autorun. (returns Int32) |
timedate |
[ReadItem()] controller's data and time. (returns String) |
startchart |
[WriteChartStatus()] Start a chart. (Data is the name of the chart). |
pstartchart |
[WriteChartStatus()] Start a chart. (Data is the name of the chart). |
stopchart |
[WriteChartStatus()] Stop a chart. (Data is the name of the chart). |
pstopchart |
[WriteChartStatus()] Stop a chart. (Data is the name of the chart). |
suspendchart |
[WriteChartStatus()] Suspend a chart. (Data is the name of the chart). |
psuspendchart |
[WriteChartStatus()] Suspend a chart. (Data is the name of the chart). |
continuechart |
[WriteChartStatus()] Continue a chart. (Data is the name of the chart). |
pcontinuechart |
[WriteChartStatus()] Continue a chart. (Data is the name of the chart). |
chartsrunningcount |
[ReadItem()] Number of charts running. (returns Int32, the number of charts running). Note, zero charts running means the strategy is effectively stopped unless serial interrupts are enabled or an HMI is responsible for starting charts. |
writedatetimefromlocalpctime |
[WriteControllerDateTimeUsingPcLocalTime()] Set the date and time from the PC's current local time. No data is required. |
writedatetimefromuserdata |
[WriteDateTimeFromUser()] Set the date and time from user data. Provide a 6 element integer table with the following values, lowest to highest index: (Month 1-12, Day 0 though 6, Year modulo 100, Hour (0-23), Min (0-59), Sec (0-59) |
getobjectinfo |
Internal operation. |
getmessagequeuecount |
[ReadItem()] retrieve the number of messages currently in the message queue. Returns an Int32 for data. |
getmessagequeue |
[ReadItem()] Retrieve the messages in the message queue. Returns an controller.MessageEntry[]. Up to 1000 messages may be returned. This may take a 'long' time. |
clearallmessages |
[ReadItem()] Clears all messages from the messages queue. |
apoint |
[ReadGroupItems(), WriteAnalogPointAttribute()] Analog point. Additional attributes used with this type. |
papoint |
[ReadGroupItems(), WriteAnalogPointAttribute()] Pointer to an analog point. Additional attributes used with this type. |
dpoint |
[ReadGroupItems(), WriteDiscretePointAttribute()] Digital point. Additional attributes used with this type. |
pdpoint |
[ReadGroupItems(), WriteDiscretePointAttribute()] Pointer to a digital point. Additional attributes used with this type. |
startstrategy |
[WriteStartControllerStrategy()] Start strategy. If the strategy is running, it is first stopped and then started. |
stopstrategy |
[WriteStopControllerStrategy()] Stop strategy. |
pid |
[ReadGroupItems()] Read a SNAP-PAC based PID. Since this abstracts to an I/O read operation, this may take a considerable amount of time to process. |
ppid |
[ReadGroupItems()] Read a SNAP-PAC based PID via a pointer. Since this abstracts to an I/O read operation, this may take a considerable amount of time to process. |
Opto22.Controller.Controller.Item.Item | ( | ) |
Constructor
Boolean Opto22.Controller.Controller.Item.GetAnalogData | ( | Item.eAnalogPointAttributes | AnalogAttribute, |
out Single | f32Value | ||
) |
analog point and pointer to analog point attribute fetch
Boolean Opto22.Controller.Controller.Item.GetData | ( | out Boolean | bValue | ) |
Retrieve the data as an bValue. Returns false if the data type mismatches or is incorrect.
bValue | bValue read from controller. |
Boolean Opto22.Controller.Controller.Item.GetData | ( | out Int32 | i32 | ) |
Retrieve the data as an Int32. Returns false if the data type mismatches or is incorrect.
i32 | Int32 read from controller. |
Boolean Opto22.Controller.Controller.Item.GetData | ( | out Int64 | i64 | ) |
Retrieve the data as an Int64. Returns false if the data type mismatches or is incorrect.
i64 | Int64 read from controller. |
Boolean Opto22.Controller.Controller.Item.GetData | ( | out Single | f32 | ) |
Retrieve the data as a Single. Returns false if the data type mismatches or is incorrect.
f32 | Single read from controller. |
Boolean Opto22.Controller.Controller.Item.GetData | ( | out String | s | ) |
Retrieve the data as a string. Returns false if the data type mismatches or is incorrect.
s | String read from controller. |
Boolean Opto22.Controller.Controller.Item.GetData | ( | out Int32[] | i32ary | ) |
Retrieve the data as an Int32 array. Returns false if the data type mismatches or is incorrect.
i32ary | Int32 array. |
Boolean Opto22.Controller.Controller.Item.GetData | ( | out Int64[] | i64ary | ) |
Retrieve the data as an Int64 array. Returns false if the data type mismatches or is incorrect.
i64ary | Int64 array. |
Boolean Opto22.Controller.Controller.Item.GetData | ( | out Single[] | f32ary | ) |
Retrieve the data as a Single array. Returns false if the data type mismatches or is incorrect.
f32ary | Single array. |
Boolean Opto22.Controller.Controller.Item.GetData | ( | out String[] | sary | ) |
Retrieve the data as a string array. Returns false if the data type mismatches or is incorrect.
sary | String array. |
Boolean Opto22.Controller.Controller.Item.GetData | ( | out eChartStatus | ChartStatus | ) |
Retrieve the data as a chart status enumeration. Returns false if the item was set with an incorrect enumeration (type).
ChartStatus | Chart status interpreted from controller data. |
Boolean Opto22.Controller.Controller.Item.GetDiscreteData | ( | Item.eDiscretePointAttributes | DiscreteAttribute, |
out Boolean | bValue | ||
) |
discrete point and pointer to analog point attribute fetch
Boolean Opto22.Controller.Controller.Item.GetDiscreteData | ( | Item.eDiscretePointAttributes | DiscreteAttribute, |
out Int32 | i32Value | ||
) |
discrete point and pointer to discrete point 32-bit integer attribute fetch
eItemTypes Opto22.Controller.Controller.Item.GetItemType | ( | ) |
Retrieve the item tag type.
Int32 Opto22.Controller.Controller.Item.GetNumberofElements | ( | ) |
Retrieve the number of elements requested from the table. Only useful if the item is a table type.
Boolean Opto22.Controller.Controller.Item.GetPidData | ( | Item.ePidAttributes | PidAttribute, |
out Single | f32Value | ||
) |
Access data from a PID or pointer to a PID read.
PidAttribute | Attribute requested. |
f32Value | Value fetched. |
Boolean Opto22.Controller.Controller.Item.GetPidData | ( | Item.ePidAttributes | PidAttribute, |
out Boolean | bValue | ||
) |
Access data from a PID or pointer to a PID read.
PidAttribute | Attribute requested. |
bValue | Value fetched. |
Int32 Opto22.Controller.Controller.Item.GetStartIndex | ( | ) |
Retrieve the item's table start index. Only useful if this is a table type.
String Opto22.Controller.Controller.Item.GetTag | ( | ) |
Retrieve the item tag name.
void Opto22.Controller.Controller.Item.Reset | ( | ) |
Reset the item object for reuse.
Boolean Opto22.Controller.Controller.Item.SetAnalogRead | ( | String | sNewTag, |
eItemTypes | eNewType, | ||
eAnalogPointAttributes[] | earyNewAnalogAttributes, | ||
Int32 | i32AttributeLength | ||
) |
Set an analog point read with attributes. Use for grouped reads.
sNewTag | Analog point name. |
eNewType | Parameter type, only apoint and papoint types supported. |
earyNewAnalogAttributes | Array of analog point attributes to fetch. |
i32AttributeLength | Volume of attributes to fetch. |
Boolean Opto22.Controller.Controller.Item.SetDiscreteRead | ( | String | sNewTag, |
eItemTypes | eNewType, | ||
eDiscretePointAttributes[] | earyNewDiscreteAttributes, | ||
Int32 | i32AttributeLength | ||
) |
Configure a discrete point read. Use for grouped reads.
sNewTag | Discrete point name. |
eNewType | Type, only dpoint and pdpoint allowed. |
earyNewDiscreteAttributes | Array of discrete attributes to retrieve. |
i32AttributeLength | Attribute length. |
Boolean Opto22.Controller.Controller.Item.SetPidRead | ( | String | sNewTag, |
eItemTypes | eNewType, | ||
ePidAttributes[] | earyNewAttributes, | ||
Int32 | i32AttributeLength | ||
) |
Set a PID to read. Use for grouped reads.
sNewTag | Name of the PID. |
eNewType | Use either ePidAttributes.pid or ePidAttributes.ppid. |
earyNewAttributes | Array of requested attributes. |
i32AttributeLength | Length of requested attributes. |
Boolean Opto22.Controller.Controller.Item.SetRead | ( | String | sNewTag, |
eItemTypes | eNewType | ||
) |
Set an Item to Read (for non-table types). Use for grouped reads.
sNewTag | Tag name. |
eNewType | The Object type. |
Boolean Opto22.Controller.Controller.Item.SetRead | ( | String | sTag, |
eItemTypes | eType, | ||
Int32 | i32StartIndex, | ||
Int32 | i32Elements | ||
) |
Set an Item to Read (for table types). Use for grouped reads.
sTag | Tag name. |
eType | The Object type. |
i32StartIndex | Start element of the table (table indices start from zero). |
i32Elements | Number of table elements to read. |
|
get |
Retrieve the adjoining error code when a GetSuccessStatus or GetStatus(bSuccess) return a false value.
|
get |
Retrieve the success flag, only valid when ReadList() or WriteList() return true.