Accessing Connectivity Feature
The Connectivity feature and its commands can be accessed from a Connectivity tab that appears above the Ribbon. If the Connectivity tab is not visible, you either need to enable the feature or restart Visual Components Premium 4.9.
Commands
Name | Description |
Add Group | Adds and lists a new variable group with a selected connection. |
Add Server | Adds a new connection for a selected plugin. |
Add Variables | Opens an editor for connecting simulation variables to server variables. |
Clear | Removes all connections for each plugin. |
Disconnect | Disconnects Visual Components Premium 4.9 from a selected connection. |
Edit Connection | Displays options in a task pane for editing or troubleshooting a selected connection. |
Export | Exports the configuration of all connections in an XML format. |
Import | Imports an XML or CFG file that defines the configuration of one or more connections. |
Reconnect | Attempts to reconnect Visual Components Premium 4.9 to a selected connection. |
(Server) Remove | Removes a selected connection. |
(Variable) Remove | Removes a selected variable group. |
Restore Windows | Restores the workspace of current view to its default setting. |
Show | Displays a list of panels that can be shown/hidden from the current view of workspace. |
Show Variables | Shows a panel for managing the connection between simulation and server variables. |
Panels
Connectivity Configuration
The Connectivity Configuration panel allows you to manage connections for supported plugins. The structure of content in the Connectivity panel is as follows:
- Level 1 - Plugin. This refers to a communication protocol supported by Visual Components Premium 4.9 used for connecting a PLC or server. Currently, you can establish connections using Beckhoff ADS and OPC UA protocols. If you are using Beckhoff ADS, you must either install a TC1000 package or have a full TwinCAT 3 installation on the device running Visual Components Premium 4.9. Otherwise, you will not be able to establish a connection to a TwinCAT 2/3 PLC. In most cases, the ADS libraries are installed with a PLC, so a workaround is to run Visual Components Premium 4.9 and the TwinCAT PLC on the same device.
- Level 2 - Connection. This is an added connection for a PLC or server using a plugin. Listed with every connection is a button that you can use to turn on/off the connection.
- Level 3 - Variable Group. This a group of variables for a connection that allows you to pair (map) variables of components in the 3D world to variables of a PLC/server on the other side of the connection. Listed with every variable group is a data flow arrow, an update mode indicator, and a button for turning on/off the variable group. A data flow arrow is set by the Transmission direction property of a variable group and can be Simulation to server (right arrow, sends out simulation variable values) or Server to simulation (left arrow, reads in server variable value). The update mode indicator is set by the Update mode property of a variable group and can be cyclic (updates data using time set by Cyclic update interval property of variable group) or event-based (updates data when there is a change in value for a variable in the group). By default, every new connection has two variable groups for reading in and sending out variable values.
Connected Variables
The Connected Variables panel allows you to manage and debug issues related to the pairing of simulation and server variables in all connections. The top and middle sections of the Connected Variables panel contain a table related to paired variables. The bottom section of the Connected Variables panel contains two sets of controls on opposing ends.
Variable Pair Table
The table contains column headers which are split into two fields. The first field is the column header name, and the second field contains column filtering and sorting options.
- Structure. Lists a connection with its variable groups and paired variables. By default, the name of a variable pair is the name of its simulation variable. You can click a variable pair field to edit its name.
- Simulation variable. The id of a paired simulation variable, which is defined by the level of the variable in its component's hierarchy. An id may contain up to four parts and uses a dot separator. The first part of an id is a component name, which is colored red and always included in the id. A DOF name, which is colored green, may follow and is used to identify joint properties. A behavior or signal name is colored green. A property name is colored blue.
- Simulation type. The data type of a paired simulation variable, which is indicated by an icon.
- Simulation value. The current value of a paired simulation variable. Real values are shown with maximum precision, and the field of a Boolean value is highlighted with either a TRUE or FALSE value.
- Prepared value. The value you want to assign a paired simulation variable. All prepared values are assigned at once using the Write Prepared Values command or its shortcut, which you can access by right-clicking anywhere in the table. In some cases, you would assign prepared values to debug the behavior of a simulation.
- Latest value. The most recent value of a paired simulation variable based on the last successful sync with its server variable counterpart. For server to simulation, the value is the result of a conversion to the simulation variable's data type. For simulation to server, the value is converted to a .NET data type that is the closest match to the server variable's data type. The current and latest value of a paired simulation variable may differ in two ways. First, the current value can update faster than a value set to or received from a connection. Second, the value conversion between integer, double and float data types may reduce precision.
- Status. Any error associated with the variable pair. You can point at an error to get a short description about the error.
- Server variable. The id of a paired server variable in a readable format, which depends on the plugin of the connection. For example, an OPC UA connection would show the variable node name and any array index value (Example[0]) if the variable node is found on the main OPC UA server. For a Beckhoff ADS connection, a variable name would be its full textual id.
- Server type. The data type of a paired server variable using terminology specific to the PLC or server connection. This is provided in order to id potential value conversion errors.
Performance Statistics
The left-side set of controls are indicators for performance statistics, which include:
- Average update time. The average amount of time it took to process an update for a variable pair.
- Average plugin time. The average amount of time it took the plugin to process an update for a variable pair.
- Max update time. The maximum amount of time it took to process an update for a variable pair.
- Max plugin time. The maximum amount of time it took the plugin to process an update for a variable pair.
- Pairs with errors. The number of variable pairs with an error status. This value will never exceed the total number of variable pairs you have for your current session.
- Errors on this run. The total number of errors that occurred in current or last simulation.
Update time covers the entire process of changing a simulation variable to confirmation from a PLC/server that the value was written for that update. Time may start from each tick in a cyclic update timer or a value change event received by the simulation from a PLC/server.
Note: An event-based update from server to simulation would not include the latency or communication delay in the server, data transfer over the network, and inside the library used by Visual Components Premium 4.9 for implementing the plugin connection.
Plugin time is a subset of total update time and only includes the time spent by the plugin itself. Generally, plugin time is closer to the communication delay Visual Components Premium 4.9 has with a PLC/server. Plugin time excludes the delays from synchronization with a simulation thread, for examples spikes from rendering the 3D world that would pause all other processes.
Technical: Statistics are calculated at 10Hz, but variables may update at 1000Hz. Each update operation for a variable pair is tracked separately and includes timing information. For example, you may get 1000 times the total number of variable pairs worth of timing data each second. The calculation itself uses the latest available timing values for each variable pair. Some variable pairs may have gone through several updates in between each statistics update, while others none, which is why only the latest value is stored and used in averages.
Variable Pair Options
The right-side set of controls are commands manipulating variable pairs listed in the table.
- Add Variable Pairs. Same as Add Variables command listed in the Ribbon.
- Write Prepared Values. Sets the current value of a variable pair to its prepared value. This is done for all variable pairs.
- Move Variables. Allows you to move selected variable pairs to another connection that has the same plugin.
- Delete Selected. Permanently removes selected variable pairs from a connection. This deletes the connection between two variables not the variables themselves.
- Update Selected. Updates the variable pairs of a selected variable group.