[solved] cbus dll issueing long messages to canusb4

http://www.merg.org.uk/merg_resources/cbus.php
Post Reply
MikeBr
Posts: 18
Joined: 08.07.2016, 18:33

[solved] cbus dll issueing long messages to canusb4

Post by MikeBr » 06.08.2016, 10:18

I am trying to get Rocrail to issue messages to my Merg accessories via canusb4. Rocrail generate the message but they are in the wrong format, they are DCC messages rather than accessory messages.
The messages start with :SC020... while my Merg units such as canservo8c expect messages starting :SB020...
Have I not setup Rocrail.ini correctly? Can I have access to the source for cbus.dll to see where I am going wrong?
regards
MikeBr
Attachments
rocrail.ini
(4.03 KiB) Not downloaded yet

rjversluis
Site Admin
Posts: 39295
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: cbus dll issueing wrong messages to canusb4

Post by rjversluis » 06.08.2016, 10:30

Hi MikeBr,

just attach the needed files.
The rocrail.ini does not contain your defined accessory: plan.xml

Code: Select all

:SC020...
can you be more precise and refer to the CBUS documentation?

MikeBr
Posts: 18
Joined: 08.07.2016, 18:33

Re: cbus dll issueing wrong messages to canusb4

Post by MikeBr » 07.08.2016, 10:00

Rocrail is sending long event messages but I want it to send short event messages. I have checked the 'short event' box for the cbus controller but this has not resulted in short events.
I want the message to be :SC020N9801010200; but rocrail sends :SC020N9001010200;
I want rocrail to send ASON and ASOF rather than ACON and ACOF
I am using Mergs FliM to setup the events.
I want to use short event messages so that the source node number is ignored and any producer can action the event.
I have been experimenting with turnout Isw2, center top of Main layer.

Regards
MikeBr
Attachments
rocrail.ini
(4.03 KiB) Downloaded 1 time
layout_mk6.xml
plan.xml
(248.49 KiB) Downloaded 1 time

MikeBr
Posts: 18
Joined: 08.07.2016, 18:33

Re: cbus dll issueing wrong messages to canusb4

Post by MikeBr » 13.08.2016, 20:46

Can I have the source code necessary to build the cbus dll, then I can track down why I am not getting the messages I am expecting

Regards
MikeBr


MikeBr
Posts: 18
Joined: 08.07.2016, 18:33

Re: cbus dll issueing wrong messages to canusb4

Post by MikeBr » 14.08.2016, 15:17

Hi Rob,
I have attached the cbus controller dialog, the turnout interface dialog and a log of the actual messages sent to cbus together with a plan.xml and rocrail.ini.
The messages are long accessory messages even though the short message is checked.Have I missed something? If not can you let me have access to the source files please.
Regards
Mikebr
Attachments
cbus_controller.jpg
rocrail.ini
(3.93 KiB) Downloaded 2 times
turnout_interface.jpg
usb_port_log.jpg
plan.xml
(11.86 KiB) Downloaded 1 time

rjversluis
Site Admin
Posts: 39295
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: cbus dll issueing wrong messages to canusb4

Post by rjversluis » 14.08.2016, 15:41

Hallo Mike,

just check this.
Rocrail does not send the frames in ASCII format:

Code: Select all

Frame ASCII format
:ShhhhNd0d1d2d3d4d5d6d7d; :XhhhhhhhhNd0d1d2d3d4d5d6d7d; :ShhhhR; :SB020N;
:S    -> S=Standard X=extended start CAN Frame
hhhh  -> SIDH<bit7,6,5,4=Prio bit3,2,1,0=high 4 part of ID> SIDL<bit7,6,5=low 3 part of ID>
Nd    -> N=normal R=RTR
0d    -> OPC 2 byte HEXA
1d-7d -> data 2 byte HEXA
;     -> end of frame
but that part is the firmware in your interface.

MikeBr
Posts: 18
Joined: 08.07.2016, 18:33

Re: cbus dll issueing wrong messages to canusb4

Post by MikeBr » 15.08.2016, 10:21

Hi Rob,
It's the <opcode> which I think is wrong. Rocrail is sending N90.... and N91.... These opcodes are ACON and ACOF, long messages. For short messages Rocrail should be sending opcodes ASON(98) and ASOF(99)
I think the messages should be S<data>N<ASON><data> and s<data>N<ASOF><data>
Regards
Mike

rjversluis
Site Admin
Posts: 39295
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: cbus dll issueing wrong messages to canusb4

Post by rjversluis » 15.08.2016, 10:44

Hi Mike,

OK, I corrected this.

MikeBr
Posts: 18
Joined: 08.07.2016, 18:33

Re: cbus dll issueing wrong messages to canusb4

Post by MikeBr » 16.08.2016, 10:11

Hi Rob,
thanks for the fix. My merg servos now respond to Rocrail commands.
Thanks again Mike

Post Reply

Return to “mergCBUS”