IO Browser
The IO Browser allows you to connect your simulation to PLCs for controls testing and virtual commissioning. The user interface is split into two tabs. The “Servers” tab displays all the configured servers (PLCs) and the tags for those servers. The “Bindings” tab displays the complete list of bindings for all tag servers.
Definitions
Servers
A (tag) server is a device, such as a PLC, that provides IO points called tags. This documentation will refer to servers and PLCs interchangeably. Servers typically support one or more protocols which allow clients, such as ProtoTwin Connect, to read/write tag values.
Tags
Tags represent areas of memory in the PLC. Tags usually have an associated name, area and data type.
Most PLCs and protocols support at least three areas:
- Inputs: The tag is an input to the PLC, which the PLC program can read.
- Outputs: The tag is an output from the PLC, which the PLC writes to.
- Memory: The tag can be read and written by the PLC.
ProtoTwin Connect supports reading/writing tags with the following data types:
- Bit: A boolean value, which can either be true or false.
- UInt8: An unsigned byte, which can represent integral values between 0 and 255 inclusive.
- Int8: A signed byte, which can represent integral values between -128 and 127 inclusive.
- UInt16: An unsigned word, which can represent integral values between 0 and 65,535 inclusive.
- Int16: A signed word, which can represent integral values between -32,768 and 32,767 inclusive.
- UInt32: An unsigned double word, which can represent integral values between 0 and 4,294,967,295 inclusive.
- Int32: A signed double word, which can represent integral values between -2,147,483,648 and 2,147,483,647 inclusive.
- Float: A single precision floating point number, which can represent real numbers.
Signals
Signals represent IO points in the model, such as the state of a sensor or the speed of a motor. Signals have an access restriction associated with them. This access restriction is analagous to file permissions in a filesystem:
- Readable: The signal can be read by a PLC.
- Writable: The signal can be read or written by a PLC.
You can think of writable signals as inputs to the model, and readable signals as outputs from the model. However, since writable signals can also be read, a writable signal could also be an output from the model. This is best illustrated with a concrete example. The motor component provides the following input (writable) signals:
- State: Whether the motor is switched on.
- Target Position: The target position of the motor, when operating with the “Position” controller mode.
- Target Velocity: The maximum velocity of the motor.
- Force Limit: The maximum force/torque that the motor may apply to achieve the motion profile.
A PLC may write to any of these signals. However, it may also make sense for the PLC to be able to read from any of these signals. Conversely, the distance sensor component provides the following output (readable) signals:
- State: Whether an object is being detected by the sensor.
- Distance: The distance to the detected object.
A PLC may read any of these signals, but it doesn’t make sense for the PLC to be able to write to them.
Bindings
Bindings are the connection between PLC tags and model signals. Bindings are directional. The direction that data flows is determined by direction of the binding. The direction of bindings for input and output tags cannot be changed. ProtoTwin Connect will always write to input tags and read from output tags. The direction for bindings involving memory tags can be specified.
- Inputs: Values are transferred from signals to the input PLC tags.
- Outputs: Values are transferred from output PLC tags to (writable) signals.
- Memory: Values are transferred in the direction specified by the binding.
Note that only writable signals may be written to. Therefore, it is not possible to bind an output tag to a readable signal. Furthermore, readable signals can only be transferred to the PLC. Therefore, the direction for bindings of tags to readable signals cannot be changed. The direction for bindings of tags to writable signals can be toggled by clicking the binding direction icon in the left-most column of the binding table.
Adding Servers
You can add a server (PLC) by clicking the “Add Server” button. This will bring up a dialog window, where you can select the protocol for the connection along with various connection parameters. The connection parameters depend on the protocol selected. Please refer to the documentation page for each specific protocol for further details:
Select “Save” to add the server once all the parameters have been configured. The server will now appear in the list of tag servers.
Adding Tags
Select the server for which you want to add tags. The tag table will appear, which lists all the tags that have been added/imported for that server. You can add tags manually, one at a time, or import a collection of tags from the PLC or from an excel spreadsheet. You can also select tags and press the DELETE key to delete all selected tags. Deleting a tag will delete any binding associated with the tag.
Binding Tags
Select any of the servers to display the list of tags for that server. Click the button in the left-most column of the tag table to create a binding for that tag. Tags that have been successfully bound are displayed in green. Tags that have incompletely configured bindings are displayed in red. You can hold the CTRL key and click multiple tags to create many bindings quickly. Clicking a tag that is already bound will take you to the binding for that tag.
Once the binding has been created, you must configure the signal for the binding. Each signal is defined by an “entity/component/property” path. You must first select the appropriate entity. You can then select a component on that entity. Finally, you can select the property/signal on that component. The right-most column of the binding table displays the current value. The value will be NULL
until the server has been connected. ProtoTwin Connect will automatically connect to the server when running the model.
Bindings may be deleted by selecting them and pressing the DELETE key. Note that if the entity or component for the signal are deleted/removed then the binding will become inactive. If the entity or component are removed whilst the model is running then the binding will become inactive until the model is reset. Resetting will restore the model and bindings to the state that existed immediately prior to running the model.
Finally, the direction for bindings of memory tags to writable signals can be toggled by clicking the icon in the left-most column of the binding table. This allows you to specify whether values should be written from the signal to the PLC tag (Write to Server) or read from the PLC tag and written to the signal (Read from Server). Note that it is not possible to toggle the direction for bindings involving input or output tags, or for bindings involving readable signals.