Welcome to the forum   
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post in this topic Go to first unread post in this topic
Offline walter__  
#1 Posted : 29 November 2016 16:32:36(UTC)
walter__

Belgium   
Joined: 30/12/2013(UTC)
Posts: 19
Location: Antwerp
We have created our own DCC controlled light switch, and it works fine when controlled from PC by sending an "ON" instruction over CAN.
The lights stay on as expected and we can turn them off again same way.
On the CS2 we see the actions happen, but we cant (or dont know) how to do it from CS2
we can define the module, and like with an "uncoupler rail" we can keep the lights on while holding the button.
the time-out setting cant be lower than 100 ms, and should be 0 for permanent use (as used from PC).
hope someone alredy used this, so all help is welcome.

Tks, Walter
Offline clapcott  
#2 Posted : 29 November 2016 20:14:19(UTC)
clapcott

New Zealand   
Joined: 12/12/2005(UTC)
Posts: 2,435
Location: Wellington, New_Zealand
I would need more information about what you have your PC doing.
It sounds like you may be trying to use DLC=8 when DLC=6 should be sufficient.

However I do wonder if there is a bit of misunderstanding about what On and Off means.

In summary there are four commands NOT two

1) Activate the On pulse ... - Press the Green button down - D-Byte4=1, D-Byte5=1
2) Deactivate the On pulse . - Release the Green Button .. - D-Byte4=1, D-Byte5=0
3) Activate the Off pulse .. - Press the Red button down . - D-Byte4=0, D-Byte5=1
4) Deativate the Off pulse . - Release the Red button .... - D-Byte4=0, D-Byte5=0

If you are using the Activate/Deactivate of either the On or Off pulse, to actually mean On and Off then you will have your symptom (like an un-coupler')
Further there is an inherent timeout value with the CS2 user interface. i.e. whereas holding the green button down on a 6021 for a 6083 would hold an un-coupler energised for as long as your finger was held down, the CS2 will timeout and send the "2) Deactivate the On pulse - Release the Green Button" regardless.
Peter
thanks 2 users liked this useful post by clapcott
Offline walter__  
#3 Posted : 30 November 2016 12:22:35(UTC)
walter__

Belgium   
Joined: 30/12/2013(UTC)
Posts: 19
Location: Antwerp
Thanks for your reply Peter,

Quote:
I would need more information about what you have your PC doing.

The program on PC, there I use a single button to act as ON/OFF for the lights, its not organized as the standard keyboard RED/GREEN combination (16 points on a keyboard) but 4 rows of 8 buttons giving up to 32 lights to command per keyboard.

Quote:
It sounds like you may be trying to use DLC=8 when DLC=6 should be sufficient.

With the DLC=6, CS2 automatically sends a byte 5 OFF after timeout (after button release)
So I do use the DLC=8 command CAN-ID 0x16 to switch ON/OFF the light decoder outputs from PC as follows

Byte 0..3.= 0, 0, 0x38, 163 ... DCC basic Button address for pair/impair
Byte 4....= 0 or 1 ............ for Pair/Impair button
Byte 5....= 0 or 1 ............ for OFF/ON
Byte 6,7..= 0, 0 .............. for permanent

I did build the custom light decoder on these specs using AtTiny 2313, and this works perfect.

So far we have not found how to set up a single (light) button on CS2 that can provide us this DCC ON/OFF function, as I don't use individual activate/deactivate, perhaps that's why we will not be able to test with CS2 direct unless the button is hold.

If there is a way to set up a single ON/OFF button on CS2, I still can change software for the light decoder accordingly.

Hope this shines some light on what we are looking for Cool

Walter
Offline clapcott  
#4 Posted : 30 November 2016 21:46:47(UTC)
clapcott

New Zealand   
Joined: 12/12/2005(UTC)
Posts: 2,435
Location: Wellington, New_Zealand
I think I understand now.

And No,
I too am unaware of how it is possible to set up a CS2 keyboard item to act as a single button with a specific On/Off toggle
(i.e. prevent the GFP from always turning off after a period)

Peter
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

| Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.352 seconds.