Setup
This guide covers the transmit-capable IOU13 (Bitbus Slave Variant) running the bbslave firmware. The Bitbus demo uses internal loopback to exchange messages between a simulated master and the slave on one module.
Prerequisites
Hardware
- A Moducop Edge Computer with a IOU13 (Bitbus Slave Variant) installed
- A development PC (Windows or Linux), connected via Network to the Moducop
No Bitbus cable, external master, or second Bitbus device is required.
Tools on Development PC
The examples are written in programming language Go, we download the go sources and compile them. Therefore we need some tools on your development PC:
Get Demo Software
Clone the repository containing the examples to a folder of your choise (here myworkdir).
c:
cd \myworkdir
git clone https://github.com/ci4rail/io4edge-client-go.git
cd io4edge-client-go
cd ~/myworkdir
git clone https://github.com/ci4rail/io4edge-client-go.git
cd io4edge-client-go
Determine the Service Address of your IOU13 (Bitbus Slave Variant)
Io4Edge Devices are usually addressed by their service address, which is a name in the network.
The IOU13 (Bitbus Slave Variant)'s service name depends on the ModuCop's slot and is usually
S101-IOU13 (Bitbus Slave Variant)-USB-EXT-<slot-number>[-<function>], i.e. if the IOU13 (Bitbus Slave Variant) is in the slot next to ModuCops CPU01, we have the following service names:
| Service Name | Description |
|---|---|
| S101-IOU13-USB-EXT-1 | Core function |
| S101-IOU13-USB-EXT-1-com | Serial interface |
| S101-IOU13-USB-EXT-1-bitbus | Bitbus sniffer and sender |
| S101-IOU13-USB-EXT-1-bbslave | Bitbus slave |
We need this service address in the demo programs to address the module.
If you are unsure, you can also browse the available devices:
ssh root@<moducop-ip>
Once logged in into the Moducop Shell:
io4edge-cli scan -f
If your IOU13 (Bitbus Slave Variant) is in the slot next to the CPU, the output should be:
DEVICE ID SERVICE TYPE SERVICE NAME IP:PORT
S101-IOU13-USB-EXT-1 _io4edge-core._tcp S101-IOU13-USB-EXT-1 192.168.201.1:9999
_ttynvt._tcp S101-IOU13-USB-EXT-1-com 192.168.201.1:10000
_io4edge_bitbusSniffer._tcp S101-IOU13-USB-EXT-1-bitbus 192.168.201.1:10001
_io4edge_bitbusSlave._tcp S101-IOU13-USB-EXT-1-bbslave 192.168.201.1:10002
Run the Demos
- Bitbus slave loopback demo: exchange messages internally without Bitbus wiring.
- Serial port demo: test the COM port with an external RS232 loopback connection.