[IMPLEMENTED ] monitoring Gleisbox status

Märklin Central Station 2

[IMPLEMENTED ] monitoring Gleisbox status

Postby woodyboy » 29.07.2014, 08:57

Is it correct that the booster voltage and current information on the statusbar not is implemented for this command stations. If so, I will try to reveal the secrets for this values. :)
Last edited by woodyboy on 15.09.2014, 18:11, edited 3 times in total.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Booster monitoring Gleisbox/CS2

Postby rjversluis » 29.07.2014, 09:49

Hi Bert,

to get those values from the CS2 seems to be complicated:
1. Find out the channel numbers for voltage and load.
2. Those values must be polled and are not event based... :(
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 - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: Booster monitoring Gleisbox/CS2

Postby woodyboy » 29.07.2014, 12:20

Hi Rob,

Thanks, I'll give it a try for the Gleisbox/MS2. If I've figured out the the algoritm, I will post the results, at least you challenged me for now. 8)
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Booster monitoring Gleisbox/CS2

Postby woodyboy » 29.07.2014, 21:52

Hi Rob,

To my knowledge I determined the channel numbers and values for the MS2 Gleisbox combination. I do not own a CS2 so I can't check the values for the CS2. I used a MS2 and sequential two Gleisboxes. The hash and UID differs of course :wink: but I checked channel numbers are the same.

To get the UID the system uses the ping command at startup and on regular base.
Softwarestand / Teilnehmer Ping (0x18, in CAN-ID: 0x30)


The gleisbox responses to the message request from node 3735 (MS2) for voltage values. The channel number for Voltage is 3.
Code: Select all
DIR      CMD   R   HASH   LEN   D0   D1   D2   D3   D4   D5   D6   D7
------   ---   -   ----   ---   --   --   --   --   --   --   --   --
<==CAN   0         3735    6    47   43   4e   61   0b    3      
<==CAN   0     R   2309    8    47   43   4e   61   0b    3    5   ef


To translate the value 0x05EF to the value on the display, divide the value by 185 (decimal) and add 10 to the result. E.g. (1519/185)+10. Show only the first decimal of the fractional part without rounding.

To get the current value channel 1 shall be used.
The returned value for current has to be devided by 824(decimal). Only the first decimal of the fractional part without rounding is shown.

To get the actual temperature of the Gleisbox channel 4 should be used.
The returned value has to be multiplied by 74/202. Only the integer part of the result is used without rounding.

So I agree, the values are not straight... :roll:

Is this sufficient and possible to implement this?
You do not have the required permissions to view the files attached to this post.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Booster monitoring Gleisbox/CS2

Postby rjversluis » 30.07.2014, 07:11

Hi Bert,

Is this sufficient and possible to implement this?

Is it really a big deal to see those weird values?
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 - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: Booster monitoring Gleisbox/CS2

Postby woodyboy » 30.07.2014, 09:50

Hi Rob,

To my opinion it is better as the current 0V0 0mA display in the statusbar. A realtime update is superfluous, but a every 15 seconds update or so may be nice. It is an indication only, not a high accurate lab measurement. The digits in the spreadsheet are only for determining the right calculation over the spectrum. But if I am the only person who annoys himself about an ignored value on the statusbar, than that should happen. At least it looks like I'm the first who overtakes this. :o
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Booster monitoring Gleisbox/CS2

Postby rjversluis » 30.07.2014, 10:01

Hi Bert,

how did you find out the channels for V/A/T?
You need a query command for that.
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 - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: Booster monitoring Gleisbox/CS2

Postby woodyboy » 30.07.2014, 10:39

Hi Rob,

Several different CAN bus traces with different Gleisboxes. There is no query at startup sequence to determine channels. The only query at start up is the ping command to determine the participants on the CAN bus. In the CAN bus specification there is something written for determining channels, but there is absolute no activity on the CAN bus with that specific command.

At the end in worksheet CAN_U, at "to get the UID ping deelnemer" the startup sequence is written. Selecting to request a value generates direct a system status request without a "Statusdaten Konfiguration" command.
Last edited by woodyboy on 30.07.2014, 10:54, edited 1 time in total.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Booster monitoring Gleisbox/CS2

Postby rjversluis » 30.07.2014, 10:51

Hi Bert,

I don't like this approach:
- No way to determine in software which channels are used.
- Weird 'unusable' values.
- Changes must be polled.
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 - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: Booster monitoring Gleisbox/CS2

Postby woodyboy » 30.07.2014, 11:09

I can't make it better in the way the values are handled by the original firmware from MS2 and Gleisbox. :cry:
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Booster monitoring Gleisbox/CS2

Postby woodyboy » 02.08.2014, 16:40

Dear forummembers,

The research is continued how to determine the values for temperature, maintrackvoltage and current usage.

Interrogating the Gleisbox doesn't yield any information how to determine the channels. The Gleisbox does not response to a "Statusdaten Konfiguration"

Interrogating the MS2 gives an answer, but not the wanted information. :(
Requesting the "Statusdaten Konfiguration" creates the following dialog:
Code: Select all
DIR   CMD R HASH LEN D0 D1 D2 D3 D4 D5 D6 D7
------ --- - ---- --- -- -- -- -- -- -- -- --
<==CAN  1b   0300  5  00 00 00 00 11
<==CAN  00   0300  5  00 00 00 00 01
<==CAN  00 R 8b30  5  00 00 00 00 01
<==CAN  00   0300  5  00 00 00 00 0c
<==CAN  18   0300  0
<==CAN  18 R 8b30  8  47 43 77 c8 01 27 00 10
<==CAN  18 R 3735  8  4d 54 6b e1 02 03 00 32
<==CAN  1d   0300  5  4d 54 6b e1 00    <- start requesting Statusdaten Konfiguration
<==CAN  1d R 0301  8  00 00 00 00 00 01 39 e1
<==CAN  1d R 0302  8  36 30 36 35 33 00 00 00
<==CAN  1d R 0303  8  4d 6f 62 69 6c 65 20 53
<==CAN  1d R 0304  8  74 61 74 69 6f 6e 20 32
<==CAN  1d R 0000  6  4d 54 6b e1 00 04


The disappointing result is in packet 0301. The first and second databytes contains zeros. This means no "Messwerte im Gerät" no "Konfigurationskanäle", in other words there is no way to find an algorithm which channels are used between the MS2 and the Gleisbox. It is an non configurable feature, hardcoded between the MS2 and the Gleisbox.

To overcome the objections to let Rocrail polls the configuration, which I agree it's not the best solution for a monitoring system, my proposal is that Rocrail only handles the CAN messages containing the information. And only if the data origin is a Gleisbox. The parameter handling of the Gleisbox system status is an independant implemention of a possible future implemention for the CS2.

If a CS2 and a Gleisbox are on the same CAN, the CS2 has priority over the Gleisbox to prevent flickering values. To my knowledge a Gleisbox and a CS2 on the same CAN is an illegal configuration.

With a ping command the CAN bus the members are determined. If in the "Gerätekennung" a Gleisbox is recognized, its UID is stored in the data structure. This UID is a prerequisit to handle the CAN message.

Why have I made a separate implementation for the Gleisbox? Well, it is to be expected that the handling of the CS2 system status complete different is from the MS2/Gleisbox configuration. The documentation is very confusing to me and not accurate. The Gerätekenner for the MS2 is slightly different from the documentation and why does the MS2 not describe the configuration channels conform the specs? BTW The range for voltage measurement is a joke. Its no problem to measure 360+ Volt, this also applies to the boostercurrent, 17,9A is observed. So notice the fire departments telephone number :shock:

My proposal is attached. The modifications are marked, search for ***** or insert. I'm not a programmer so maybe I have overseen something. The code works well and is based on the status of the github repository of 2 august. Maybe someone can improve/optimize this functionality and implement the (improved) code in the sources. That frees me at each new version to merge the modifications
You do not have the required permissions to view the files attached to this post.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Booster monitoring Gleisbox/CS2

Postby rjversluis » 02.08.2014, 17:20

Hi Bert,

I merged your support for V/A/T in the trunk.
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 - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: [IMPLEMENTED ] Booster monitoring Gleisbox/CS2

Postby woodyboy » 03.08.2014, 16:13

Thanks for merging.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: [IMPLEMENTED ] Booster monitoring Gleisbox

Postby John Hoek » 11.09.2014, 19:12

Hi Bert

Could you explain how to setup Rocrail to show this information?
I never had a booster before , only the gleisbox. Which is my booster.
John Hoek
 

Re: [IMPLEMENTED ] Booster monitoring Gleisbox

Postby woodyboy » 11.09.2014, 19:43

The statusbar in Rocview shows the status of the Gleisbox. Not from a separate booster. The same information as the MS2 shows in the information menu. There is no configuration required if you use the CAN_UDP_gwV16Q_GFP or later Arduino sketch. The information will also show up on the statusbar if you ask the information by the MS2, but in that case it is static after leaving the menu. The option is default enabled in the sketch.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Next

Return to CS2