TwinCAT 3 Communication

This SIMPL+ macro is the basis for communication between the Crestron controller and the TwinCAT 3 controller.
It receives write and read commands from the TwinCAT 3 controller via TCP/IP and forwards them to the respective SIMPL+ macros.
The signals To_TwinCAT3 (up to 500) can be read directly by a TwinCAT 3 controller, while the signals From_TwinCAT3 (up to 500) can also be written from a TwinCAT 3 controller.
Inputs
Send_KeepAlive : DIGITAL_INPUT;
Command_Req : BUFFER_INPUT;
To_TwinCAT3 : ANALOG_INPUT[500];
Send_KeepAlive: If the Signal changes from low to high, a watchdog telegram is sent to the TwinCAT 3 PLC. This watchdog telegram also builds the TCP/IP connection between the Crestron Controller and the TwinCAT 3 Controller. The Signal should switch from low to high about every 4 Seconds. The Crestron Module Oscillator can be used for this purpose (see example). .
Command_Req: Signal from the individual write and read blocks. This signal contains the command that is transferred to the TwinCAT 3 PLC.
To_TwinCAT3: Data with external read access.
Outputs
Command_Res : STRING_OUTPUT;
TCP_Client_Status : ANALOG_OUTPUT;
From_TwinCAT3 : ANALOG_OUTPUT[500];
Command_Res: Signal with the feedback messages from the individual read and write blocks.
TCP_Client_Status: This analog signal contains the status of the TCP connection.
Value | Connection Status |
---|---|
0 | Not Connected |
1 | Waiting for Connection |
2 | Connected |
3 | Connection Failed |
4 | Connection Broken Remotely |
5 | Connection Broken Locally |
6 | Performing DNS Lookup |
7 | DNS Lookup Failed |
8 | DNS Name Resolved |
From_TwinCAT3: Data with external write access.