[solved] cbus dll issueing long messages to canusb4

http://www.merg.org.uk/merg_resources/cbus.php

[solved] cbus dll issueing long messages to canusb4

Postby 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
You do not have the required permissions to view the files attached to this post.
MikeBr
 

Re: cbus dll issueing wrong messages to canusb4

Postby 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?
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBUS - CANGCx ] - [ G: CBUS - CANGCx ]
rjversluis
Site Admin
 

Re: cbus dll issueing wrong messages to canusb4

Postby 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
You do not have the required permissions to view the files attached to this post.
MikeBr
 

Re: cbus dll issueing wrong messages to canusb4

Postby 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
 


Re: cbus dll issueing wrong messages to canusb4

Postby 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
You do not have the required permissions to view the files attached to this post.
MikeBr
 

Re: cbus dll issueing wrong messages to canusb4

Postby 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.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBUS - CANGCx ] - [ G: CBUS - CANGCx ]
rjversluis
Site Admin
 

Re: cbus dll issueing wrong messages to canusb4

Postby 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
MikeBr
 

Re: cbus dll issueing wrong messages to canusb4

Postby rjversluis » 15.08.2016, 10:44

Hi Mike,

OK, I corrected this.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBUS - CANGCx ] - [ G: CBUS - CANGCx ]
rjversluis
Site Admin
 

Re: cbus dll issueing wrong messages to canusb4

Postby MikeBr » 16.08.2016, 10:11

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


Return to mergCBUS