We are developing an application on a WAGO CC100 (751-9402) using CODESYS V3.5. The controller has two RS-485 interfaces, both currently used by the CODESYS application for Modbus RTU communication.
We would like to occasionally access one of these same RS-485 interfaces from a Linux application running on the CC100 for diagnostic and maintenance purposes.
The Linux application would never access the RS-485 interface simultaneously with CODESYS. The intended sequence would be:
- CODESYS temporarily stops communication on the selected RS-485 interface.
- The interface is released by CODESYS.
- The Linux application opens the corresponding serial device (e.g.
/dev/tty...) and performs the required Modbus RTU communication. - Linux closes/releases the serial interface.
- CODESYS resumes communication.
Our questions are:
- Is this type of exclusive, non-simultaneous access to the CC100 RS-485 interfaces by CODESYS and Linux supported?
- How are the two CC100 RS-485 interfaces exposed to Linux (e.g.
/dev/tty...)? - Does the CODESYS/WAGO serial driver allow the interface to be properly released and subsequently reopened by a Linux process?
- Is there a recommended WAGO mechanism or API for switching ownership of the serial interface between CODESYS and Linux?
- Are there any restrictions or precautions regarding this approach, particularly concerning the CODESYS runtime and the WAGO serial drivers?
We are specifically interested in occasional Linux access, rather than having Linux permanently manage the RS-485 communication.