cbus:cangc6-firmware-en
Table of Contents
CAN-GC6 mergCBUS 4 Chanel Servo Controller
This page documents the HEAD revision of the firmware.
Firmware
Firmware version: 1.a rev.: 305, resonator: 8MHz, Rocrail: 3181+ |
The firmware is based on CAN-GC2.
Boot mode is not supported.
Copyrights
Features
- All variables and events are configurable. (FLiM)
- Servo speed.
- Switch commands are processed.
- Servo end positions are reported. (GCA136 compatible.)
- "Start Of Day" support.
- LED4 for 1 or more servo position pending.
- Relay control. (GCA137, Tx 480 baud)
- External switch position sensors processing.
- Save servo positions at power off.
- Restore servo position and relays state.
- Stop servo pulse after reaching the wanted position + 2 seconds.
- 1000 steps in pulse width from 0.5 to 2.5ms.
- Max. speed 20.
- Separate speed for left and right move.
- Bounce option.
IDs
NMRA Manufacturer ID | 70 |
Product ID | 6 |
HEX
Sources
Development Tools
- MPLAB X v1.00
- C18 v3.40
- PICKit 3
Node Variables
# | Description |
---|---|
1 | node configuration |
2 | CAN-ID |
3-22 | 4 x 5 Servo settings |
Node configuration byte
Bit | Function | Remark |
---|---|---|
0 | save servo positions at power off command | |
1 | use short events |
Servo settings
Byte | Function | Remark/Range |
---|---|---|
0 | config | |
1 | left | 50…250 |
2 | right | 50…250 |
3 | speed left | 1…20 |
4 | speed right | 1…20 |
Servo configuration byte
Bit | Function | Remark |
---|---|---|
0 | Relay polarisation | Swap polarization. |
1 | External switch sensors | |
2 | Bounce |
Node Events
- Sensors will generate OPC_ACON/OPC_ACOF events.
- Servos will change position on OPC_ACON/OPC_ACOF.
Event# | Description | Variable |
---|---|---|
0-3 | servo switch 1…4 | not used |
4-7 | servo sensor 1…4 | not used |
8 | SOD | not used |
Servo control
The servo pulse width must be between 0.5 and 2.5 ms for 180° range:
Every 5 ms a pulse is started for one of the 4 servos. The refresh rate for each servo is 20ms: 50Hz.
Timer0 is used for the 5ms interval and Timer2 for the pulse width which is re-programmed for each servo in every 5ms cycle.
External Sensors
Optional every servo can use two sensor inputs, on connectors Fb1…Fb4, for signalling the switch position.
Straight | Thrown | Status |
---|---|---|
0 | 0 | The switch stand is pending. |
1 | 0 | Straight position. |
0 | 1 | Thrown position. |
1 | 1 | Invalid. |
A position change is only reported on the CBUS if only one of the inputs is high.
cbus/cangc6-firmware-en.txt · Last modified: 2024/08/11 18:05 by 127.0.0.1