-
Notifications
You must be signed in to change notification settings - Fork 98
Custom serial devices
Custom serial devices plugin allows you to drive any serial device by defining it's protocol.
The plugin is not enabled by default, to enable it go into settings/plugins :
The plugin will now appear on the left menu :
Define your port characteristics
- Serial port : the serial port to be used
- Baudrate : the baudrate to be used
- Enable RTS : Enable the "Ready to send" line
- Enable DTR : Enable the "Data Terminal Ready" line
- Log incoming data : data sent to the computer is logged in a windows, otherwise it's simply thrown away, this is useful for debugging purpose
- Automatic reconnect : In case of serial port error (disconnect ...) Simhub will automatically try to reconnect to the device at a regular interval.
All protocol messages are dynamically built using NCALC or Javascript. The plugin does not send any predefined messages start or terminator characters. You need to add them to you messages.
Allows you to define a "hello" message. This message will be sent straight after serial port is open.
Allows you to define a "goodbye" message. This message will be sent straight before serial port is closed. NB : In case of serial port error (disconnect, connection loss) it won't be sent.
Messages sent to communicate with the device. You can have multiple messages with multiple frequencies. As a general rule of thumb empty messages won't be sent. Messages are encoded in ASCII
- Enable switch : When disabled the message will be ignored
- Message formula
- Update frequency : Define the maximum frequency at which the message must be sent, if you only want to send value changes , you can select
Changes only
. Free SimHub version is limited to 10Hz.
You can import and export settings for easy sharing.
Settings freezing allows you to put the device settings in readonly mode. Only the serial port and the setting panel will stay active.
Allows you to build a device control panel. All properties created with the settings panel will be available for use from ncalc or javascript using "insert setting" :
- Sending a simple string using ncalc formula
'Hello'
- Ending a message with
line feed
'Hello\n'