Table of Contents

CAN-GC6 mergCBUS 4 Chanel Servo Controller

ContentHardwaremergCBUS


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

© MERG
© Rob Versluis, rocrail.net

Features


IDs

NMRA Manufacturer ID 70
Product ID 6

HEX


Sources

Development Tools


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

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:

servo-signal.jpggc6-servo-outputwave.jpg
Theoretically. First real time result.

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.