Support for Opto22/Native communications protocol (Opto22 PAC).
Version 2.2.5 provides support for Opto22 PAC Controllers. The Opto22/Native is a symbolic communications protocol that uses PAC control symbolic tag names to access variables in Opto22 PAC controllers. Integer, Float and String data types and Tables are fully supported for read and write. Additionally, ways to perform particular operations on timers and chars and to access fields of digital and analog I/O points are provided.
Opto22 Data Types:
Supported types for Opto22 are DINT, REAL and STRING (Column B). Other data types in ScadaMobile can be used as well but they may trim results depending on the actual values in the controller.
Tables are fully supported. Tables can be of DINTs, REALs or STRINGs. To access tables you define the number of elements to read or write from a table as an array subscript on Column B. For example REAL will refer to 8 elements of a table of floats. Similarly, on column C you specify the starting element, for example myRealTable. These two examples com- bined on the same row will cause reads or writes of 8 values from the table myRealTable starting at element 3 and continuing through element 10 inclusive.
Opto22 Digital and Analog I/O Points:
I/O points in Opto22 are represented by data structures which ScadaMobile can read and provide access to some of its members. In order to access I/O point structure members a dot notation using particular names is used. The following member access names are available:
digital_IO_point.state read access to a BOOL value corresponding to the actual state of any Digital I/O point
digital_I_point.on_latch read access to a BOOL with the OnLatch attribute of a Digital Input point
digital_I_point.off_latch read access to a BOOL with the Off Latch attribute of a Digital Input point
digital_I_point.counter read access to a DINT value with the Counter value of a Digital Input point
analog_IO_point.value read access to a REAL with the actual value of any Analog I/O point
analog_I_point.min read access to a REAL with the min value of an Analog Input point
analog_I_point.max read access to a REAL with the min value of an Analog Input point
IO_Point.enabled read access to an an 8 bit value register associated with an I/O point to check if its I/O Unit and I/O Point Communication flags are enabled.
Note that these member access names are not available on the expressions engine but only as an extension for point variable definitions as entered in Column C. In other words, a point variable data structure cannot be read as a single object but only through its members.
Timer values are accessed as any regular float variable. Additionally, some actions can be performed on timers when operated in write mode. In such case particular commands are sent to the PAC controller as opposed to a data value. To cause commands for appropriate actions to be sent you must set the row as writable by giving a suitable value to the write_access attribute on Column D. Also to prevent the interface to display the actual time value we recommend to set style=button for rows meant to trigger an action. Actions are specified using the dot notation with particular names as follows:
timer Actual value, a REAL with the value of the Timer variable timer.
timer.start_timer when written to sends the command StartTimer to the Timer timer
timer.stop_timer when written to sends the command StopTimer to the Timer timer
timer.pause_timer when written to sends the command PauseTimer to the Timer timer
timer.continue_timer when written to sends the command ContinueTimer to the Timer timer
It is possible to read Chart Status and to perform Start and Stop operations. This is provided by means of structure member access names. The Start and Stop commands work with writable rows. The same recommendations given for Timer commands apply for Chart commands.
chart.chart_status provides read access to the 32 bit BitStat value of Chart chart as a UDINT value
chart.start_chart when written to sends a Start command to the Chart chart
chart.stop_chart when written to sends a Stop command to the Chart chart
All of these functions are demonstrated in the opto22pac.csv example file preinstalled with the ScadaMobile, which is based on the SNAP PAC Learning Center project files and can be used as a template for your project.
We also updated the manual to take into account the added support for Opto22 PAC Controllers.