ChannelOPCDA.ChannelOPCDA
- Last UpdatedAug 22, 2023
- 1 minute read
The ChannelOPCDA.ChannelOPCDA channel enables connection to OPC-DA servers and exchange data.
It also supports http and XML OPC connections.
Note: Host XR Bridge and the OPC server on the same machine.
Code example
This is a code example for ChannelOPCDA.ChannelOPCDA.
<channel name="test" class="ChannelOPCDA.ChannelOPCDA" url="opcda://INTOUCH/ArchestrA.FSGateway.3" refreshTime="100"/>
Parameters
These are parameters for the channel connection.
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
Mandatory |
The name of the channel. |
|
class |
SQL |
Must be ChannelOPC.ChannelOPC. |
|
url |
Mandatory |
OPC connection url including protocol schema. |
|
refreshTime |
Optional (def. 100) |
Reading refresh time in ms. |
Simulation
OPCDA has no specific simulation related parameter. All the OPC variables are defined as <item/>.
Code example
<opc>
<item name="New_InTouch_000.alm_bgPar_Act_006x03" type="BOOL"/>
</opc>
Item parameter
An exchanged OPC variable.
The following data types are available:
-
I1 8-bit int
-
I2 16-bit int
-
I4 32-bit int
-
R4 32-bit float
-
R8 64-bit double
-
BOOL boolean
-
STRING text string
Code example
This is a code example for Item parameter.
<item name="New_InTouch_000.alm_bgPar_Act_006x03" type="BOOL"/>
Simulations
The Simulations node contains a <simulation> node for every supported simulation (currently only 1). For every supported simulation, you must include the channels that the simulation involves with correct configurations and variables, then you must set up rules for the simulation.