[Solved] Lamp control module

Lillemats1
Posts: 37
Joined: 22.04.2009, 19:46
Location: Sweden

[Solved] Lamp control module

Post by Lillemats1 » 28.03.2016, 19:00

Hi there Rocrailers.

is it any chance that Rocrail support this module to control lights on the layout?

http://www.persmodelrailroad.com/lm.html

Greetings Mats.
Last edited by Lillemats1 on 02.04.2016, 23:07, edited 1 time in total.

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

Re: Lamp control module

Post by rjversluis » 28.03.2016, 20:07

Hi,

if its compatible with DMX or HUE:
http://wiki.rocrail.net/doku.php?id=eng ... d_stations

Lillemats1
Posts: 37
Joined: 22.04.2009, 19:46
Location: Sweden

Re: Lamp control module

Post by Lillemats1 » 29.03.2016, 17:07

Hi Rob.

Thanks for your reply.

It doesn't seem compatible with DMX or HUE.
I have tried different setups without success. :(

Is there any other commandstation that yuo think can work?

//Mats

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

Re: Lamp control module

Post by rjversluis » 29.03.2016, 17:11

Hi Mats,

because the 'protocol' is very easy I could add it to Rocrail.
Do you have the hardware for testing?

Lillemats1
Posts: 37
Joined: 22.04.2009, 19:46
Location: Sweden

Re: Lamp control module

Post by Lillemats1 » 29.03.2016, 17:14

Hi Rob.

Yes, i have the hardware.
If you could do that it would be great. :D :D

Thanks very much.

//Mats

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

Re: Lamp control module

Post by rjversluis » 29.03.2016, 19:59

Hi Mats,

I programmed the basics and could also be OK.
Add a controller of type "lcm" and select the correct serial device.
The library only knows what output objects are and the output value is used for intensity.
The output address is "device address", and the output port is "port". -> http://www.persmodelrailroad.com/lm.html
Good luck.
11.016+
If its OK I will add it to the Wiki.

Lillemats1
Posts: 37
Joined: 22.04.2009, 19:46
Location: Sweden

Re: Lamp control module

Post by Lillemats1 » 29.03.2016, 20:14

Hi Rob.

Thanks very much. :beer:
I will test it tomorrow after work and post a reply on the result.

Its OK to add it to the Wiki.

//Mats

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

Re: Lamp control module

Post by rjversluis » 30.03.2016, 07:25

Hi,

here is the Wiki page:
http://wiki.rocrail.net/doku.php?id=lcm-en

I made a fix for the intensity flag in 11.017.

Lillemats1
Posts: 37
Joined: 22.04.2009, 19:46
Location: Sweden

Re: Lamp control module

Post by Lillemats1 » 30.03.2016, 17:09

Hi Rob.

I have tried it with 2 modules, adress 0 and 1, but it doesn´t seem to work. :?
When i set the address to 0 and the port to 0 there is no action in the controller window.
If i set the address to 1 and the port to 0 it looks like this in the controller window :
18:04:18 address:port:intensity 0:1:0 OFF
18:04:14 address:port:intensity 0:1:64 ON
18:04:14 address:port:intensity 0:1:0 OFF
18:04:14 address:port:intensity 0:1:64 ON
18:04:13 address:port:intensity 0:1:0 OFF
18:04:07 address:port:intensity 0:1:64 ON

but the light would not light up.

Do you need the tracefiles to look into?

//Mats

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

Re: Lamp control module

Post by rjversluis » 30.03.2016, 18:28

rjversluis wrote:I made a fix for the intensity flag in 11.017.

Lillemats1
Posts: 37
Joined: 22.04.2009, 19:46
Location: Sweden

Re: Lamp control module

Post by Lillemats1 » 30.03.2016, 18:37

Hi Rob.

Ok, i try again tomorrow and post a reply on the result.

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

Re: Lamp control module

Post by rjversluis » 31.03.2016, 08:40

Hi Mats,

just test 11.025 or higher.
I changed the device addressing:
http://wiki.rocrail.net/doku.php?id=lcm-en#outputs

Lillemats1
Posts: 37
Joined: 22.04.2009, 19:46
Location: Sweden

Re: Lamp control module

Post by Lillemats1 » 31.03.2016, 16:44

Hi Rob.

Now i have done some testing.
I still can´t turn on the lamps but i can turn them off. :wink:
I think the problem could be the second byte, when bit 6 is 1, you change the intesity of the port but do not turn on the port.
One way could be to send the three bytes followed by byte 1 and 2 where bit 6 is set to 0.

For example, to turn on port 0 on module 0 with intensity 64 it would look like this : 00000000, 11100000, 11000000, 00000000, 10100000

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

Re: Lamp control module

Post by rjversluis » 31.03.2016, 21:09

Lillemats1 wrote:Hi Rob.

Now i have done some testing.
I still can´t turn on the lamps but i can turn them off. :wink:
I think the problem could be the second byte, when bit 6 is 1, you change the intesity of the port but do not turn on the port.
One way could be to send the three bytes followed by byte 1 and 2 where bit 6 is set to 0.

For example, to turn on port 0 on module 0 with intensity 64 it would look like this : 00000000, 11100000, 11000000, 00000000, 10100000
Sorry but this is not conform the protocol.
I added in the monitor trace the HEX bytes which are sen to the LCM. Just check out whats wrong with them compared with the specs.

Lillemats1
Posts: 37
Joined: 22.04.2009, 19:46
Location: Sweden

Re: Lamp control module

Post by Lillemats1 » 31.03.2016, 21:38

Hi Rob.

I did som checking and when i try to turn port 0 on module 0 on with intensity 64 the HEX trace shows [00-E0-C0]
i tried this in a testprogram that i used to test the hardware with the same result.
It looks like you only need to send 2 bytes to turn on or off the port.
If i send HEX [00-A0] the port turns on, if i send HEX [00-80] the port turns off.
If i send HEX [00-E0-84] nothing happens with the port but if i´m after that send HEX [00-A0] the port turns on with lower intensity (set by byte three in the first sending).
When i tried to send the command to turn on the port immediately after the command to set intensity the port gos on with the intensity set by the third byte.

Post Reply

Return to “DIY Hardware”