¿ªÔÆÌåÓý

Date

Locked PanelPro. Get JMRI to control turnouts on Digitrax

Rolf
 

This has worked before, but now doesn't. Digitrax is set up and turnouts work from the command station (DCS50 Zephyr). JMRI panel is ready, and works on mouse click to change the turnout's graphic. Turnouts are?named ?like?T1, T2, etc, defined in the turnout table as IT2, IT2, etc. Connection between JMRI and Digitrax is on COM4 with a USB cable to the Digitrax PR3 Extra, with its green LED blinking once a second, mostly on.? Everything seems right.
The connection between IT1 in JMRI and switch address 1 on Digitrax doesn't seem to be there.

What am I missing?

Thanks !?? :)


Locked Re: arduino CMRI turnout control #arduino #cmri

emmanuel ALLAUD
 

¿ªÔÆÌåÓý

Hi Marky,

first off a few tips: it is best to only attach the servo when you want to move it, otherwise it will consume power to stay in place probably making some noise. Moreover it is "prettier" to make them move slowly (say if the extreme positions are 10 and 40, do write(11) then write(12)... increment every few milliseconds or so).

Here is a link to a complete sketch (not working with CMRI though) that does just what I say above: look in the RRduino.ino file in the void process_turnouts() function. HTH

Anyway your sketch is correct as it is but show us when you try to have several.

BTW how do you power the servos, not from the arduino power right?

Bye

Emmanuel

Le 23/06/19 ¨¤ 15:04, whmvd a ¨¦crit?:

I'm confused, Marky. Where does? JMRI enter into this?
Wouter

On Sun, 23 Jun 2019 at 13:56, Marky <thrashbash31n@...> wrote:
Hi everyone,?

first of all , like to say i'm a newbie at this , so please bear with me.

I'm working on connecting 5 x?90 sg servos from one arduino , which in theory is possible? (via output pins 3,5,6,9,10,11), i'm currently running a sketch which operates one turnout successfully, but when i try to add additional servo's, the arduino isn't recognizing the signal from my PC (i'm getting the RX & TX leds on the arduino)

The thing i would like to know is, how to add additional turnouts to my sketch, as i've tried turnout2 and thats not working.


The sketch i'm running is here:

#include <CMRI.h>
#include <Auto485.h>
#include <Servo.h>

#define CMRI_ADDR 1

#define DE_PIN 2
int turnout1 = 0;

Auto485 bus(DE_PIN); // Arduino pin 2 -> MAX485 DE and RE pins
CMRI cmri(CMRI_ADDR, 24, 48, bus); // defaults to a SMINI with address 0. SMINI = 24 inputs, 48 outputs
Servo turnOut1;

void setup() {
  turnOut1.attach(9);
  turnOut1.write(2);
  bus.begin(9600);
}

void loop() {

   cmri.process();
   turnout1 = (cmri.get_bit(47));
   if (turnout1 == 1){
      turnOut1.write(10);
      turnOut1.write(9);
   }
   else{
      turnOut1.write(2);
   }
}
many thanks


Locked NCE Consist not loading from station

 

I am running JMRI on MacOS with NCE/USB and all is good so far. Created a consist on my NCE Starter Cab and the train moves as expected. Now I use the NCE Consist tool and do a Get on the consist and the status remains 'waiting' forever. What might be wrong?
Thanks
Bill


Locked Re: Hanging when creating blocks from layout editor and auto trains questions

 

Steve,

Try making each ray of the turntable be a separate block.


Dave Sand

On Jun 23, 2019, at 3:01 AM, bluetobits <steve.lomax@...> wrote:

Hi. Dave
Sorry about forgetting the custom icons. I'm running JMRI from google drive so I can work files on 2 machines. all the files are a bit over the place. Another thing to add to the list!
The area I was trying to address was indeed the lower rays of the turntable. .I tried deleting all the ray track and re-creating them to try to cure the issue and sometimes it works, most times it doesn't. In the version before this one I re-named many of the blocks from within the block table and created new blocks. The turntable is manual. The sensors are used as momentary switches which trigger my home grown turntable in much the same way as my turnouts. It's all handled in hardware from the JMRI dcc++
--
Steve 009 in UK


Locked Re: arduino CMRI turnout control #arduino #cmri

Robert Schworm
 

Read this link ?- - -sending turnout data to arduino


I think this should result in a output pin on the arduino that can be directed to your relay.

For the relay, are you using a ac source with back to back diodes to throw a half wave voltage to a tortoise to cause it to swing back and forth?
Bob
?
Thanks.
?
Regards,
?
Bob
Phone / Fax - 440-838-0508


On Sun, Jun 23, 2019 at 9:49 AM Marky <thrashbash31n@...> wrote:
The Arduino is using the cmri protocol to talk to jmri, sorry I should have stated that earlier
--
Regards,
Marky
Sprog v3 command center??
Arduino aux outputs


Locked Re: arduino CMRI turnout control #arduino #cmri

 

No problem - probably just my ignorance in all things CMRI showing. I'm sure the experts wouldn't have been confused!
Wouter


On Sun, 23 Jun 2019 at 14:49, Marky <thrashbash31n@...> wrote:
The Arduino is using the cmri protocol to talk to jmri, sorry I should have stated that earlier
--
Regards,
Marky
Sprog v3 command center??
Arduino aux outputs


Locked Re: arduino CMRI turnout control #arduino #cmri

 

The Arduino is using the cmri protocol to talk to jmri, sorry I should have stated that earlier
--
Regards,
Marky
Sprog v3 command center??
Arduino aux outputs


Locked Re: Hanging when creating blocks from layout editor and auto trains questions

 

On Sun, Jun 23, 2019 at 07:09 AM, <haltz@...> wrote:


Still newbie. Steve (or anyone else), how do I go about finding Steve's layout
file? I see the Files icon on the left but then what?
The OP should have created a folder within the "Problems being worked on" folder for his files and provided a link or file name in his post.
Unfortunately he just created a folder in the general files area.
/g/jmriusers/files/Steve%20UK%20009

All the files the OP uploaded should be removed by the OP when the issue is resolved and all files in the files area are subject to deletion at the discretion of the moderators.

--
Peter Ulvestad

JMRI Users Group Moderator - ( )
Tam Valley Group Moderator - ( )
Sprog-DCC Group Moderator - ( )
Edmonton Model Railroad Association -


Locked Re: Hanging when creating blocks from layout editor and auto trains questions

 

Still newbie. Steve (or anyone else), how do I go about finding Steve's layout file? I see the Files icon on the left but then what?


Locked Re: arduino CMRI turnout control #arduino #cmri

 

I'm confused, Marky. Where does? JMRI enter into this?
Wouter


On Sun, 23 Jun 2019 at 13:56, Marky <thrashbash31n@...> wrote:
Hi everyone,?

first of all , like to say i'm a newbie at this , so please bear with me.

I'm working on connecting 5 x?90 sg servos from one arduino , which in theory is possible? (via output pins 3,5,6,9,10,11), i'm currently running a sketch which operates one turnout successfully, but when i try to add additional servo's, the arduino isn't recognizing the signal from my PC (i'm getting the RX & TX leds on the arduino)

The thing i would like to know is, how to add additional turnouts to my sketch, as i've tried turnout2 and thats not working.


The sketch i'm running is here:

#include <CMRI.h>
#include <Auto485.h>
#include <Servo.h>

#define CMRI_ADDR 1

#define DE_PIN 2
int turnout1 = 0;

Auto485 bus(DE_PIN); // Arduino pin 2 -> MAX485 DE and RE pins
CMRI cmri(CMRI_ADDR, 24, 48, bus); // defaults to a SMINI with address 0. SMINI = 24 inputs, 48 outputs
Servo turnOut1;

void setup() {
  turnOut1.attach(9);
  turnOut1.write(2);
  bus.begin(9600);
}

void loop() {

   cmri.process();
   turnout1 = (cmri.get_bit(47));
   if (turnout1 == 1){
      turnOut1.write(10);
      turnOut1.write(9);
   }
   else{
      turnOut1.write(2);
   }
}
many thanks?

Regards,
Marky
Sprog v3 command center??
Arduino aux outputs


Locked arduino CMRI turnout control #arduino #cmri

 

Hi everyone,?

first of all , like to say i'm a newbie at this , so please bear with me.

I'm working on connecting 5 x?90 sg servos from one arduino , which in theory is possible? (via output pins 3,5,6,9,10,11), i'm currently running a sketch which operates one turnout successfully, but when i try to add additional servo's, the arduino isn't recognizing the signal from my PC (i'm getting the RX & TX leds on the arduino)

The thing i would like to know is, how to add additional turnouts to my sketch, as i've tried turnout2 and thats not working.


The sketch i'm running is here:

#include <CMRI.h>
#include <Auto485.h>
#include <Servo.h>

#define CMRI_ADDR 1

#define DE_PIN 2
int turnout1 = 0;

Auto485 bus(DE_PIN); // Arduino pin 2 -> MAX485 DE and RE pins
CMRI cmri(CMRI_ADDR, 24, 48, bus); // defaults to a SMINI with address 0. SMINI = 24 inputs, 48 outputs
Servo turnOut1;

void setup() {
  turnOut1.attach(9);
  turnOut1.write(2);
  bus.begin(9600);
}

void loop() {

   cmri.process();
   turnout1 = (cmri.get_bit(47));
   if (turnout1 == 1){
      turnOut1.write(10);
      turnOut1.write(9);
   }
   else{
      turnOut1.write(2);
   }
}
many thanks?

Regards,
Marky
Sprog v3 command center??
Arduino aux outputs


Locked Re: Hanging when creating blocks from layout editor and auto trains questions

 

Hi. Dave
Sorry about forgetting the custom icons. I'm running JMRI from google drive so I can work files on 2 machines. all the files are a bit over the place. Another thing to add to the list!
The area I was trying to address was indeed the lower rays of the turntable. .I tried deleting all the ray track and re-creating them? to try to cure the issue and sometimes it works, most times it doesn't. In the version before this one I re-named many of the blocks from within the block table and created new blocks.? The turntable is manual. The sensors are used as momentary switches which trigger my home grown turntable in much the same way as my turnouts. It's all handled in hardware from the JMRI dcc++
--
Steve 009 in UK


Locked Re: Hanging when creating blocks from layout editor and auto trains questions

 

Steve,

You have a custom icon in the JMRI install location: program:resources/icons/misc/VsensorTrigger.gif. Custom components should be in the "user files location" so that JMRI installs don¡¯t remove custom components. Use Help >> Locations >> Open User Files Location to open the file manager. Create the resources/icons directory path for your custom icons. Be sure to include them when uploading the panel xml file.

Is there a particular piece of track that is having problems. I was able to make several changes with no issues.

Sometimes issues can be resolved by using the Layout Editor Tools >> Check menu items to eliminate potential issues, especially non-contiguous blocks.

I have not worked with turntables, but it seems to me that each ray should have its own block.


Dave Sand

On Jun 22, 2019, at 5:48 PM, bluetobits <steve.lomax@...> wrote:

Sorry should have included: PanelPro 4.15+R5fb3e69, Java 1.8.0_161, Win 10, DCC++,

--
Steve 009 in UK


Locked Re: Hanging when creating blocks from layout editor and auto trains questions

 

Sorry should have included: PanelPro 4.15+R5fb3e69,? Java 1.8.0_161, Win 10, DCC++,?

--
Steve 009 in UK


Locked Hanging when creating blocks from layout editor and auto trains questions

 

Hi again.

JMRI seems to hang when adding new track, or creating or changing a track's block designation to my layout from within panel editor.? The console shows nothing amiss other than the occasional message when running auto trains like " cannot allocate xxx sector will stop train in www" or "cannot determine turnout position" . I think I may have a corrupted layout file?
May I also ask a couple of questions; I am trying to teach myself how to get trains to auto run. How do I set ia train to stop when a sensor is triggered? within a block which has a danger signal at it's exit portal. And then continue when the signal is clear? I have set up blocks, sections and transits then allocate trains to run the transits.?
I have included my latest layout file in the files section.
Many thanks.? ?
--
Steve 009 in UK


Locked Re: OpenLCB - Lights - Help - Tests for build 3335 failed.

 

Hi Tim,

Nothing to be concerned about, we're just talking micro-seconds and that could be a Red Herring, perhaps the order in xml played more of a? part.
Note that I'm testing without an actual OpenLCB network using the CAN Simulation so I may well get different results than real-life hardware.

If it does cause a future issue it may be worth splitting your xml into multiple xml files, each loaded after a little gap?

Perhaps create a test xml file with 1,500 OpenLCB lights, all with 3 FastClock Controllers, and see how that scales up following the latest proposed OpenLCB Light tweak?
I'll have a look at creating one of these for both OpenLCB and MERG CBUS ( as a comparison ) over the weekend,

Steve.


Locked Re: OpenLCB - Lights - Help - Tests for build 3335 failed.

 

¿ªÔÆÌåÓý

Hi Steve,

?????? I am a member of the Columbia Gorge Model Railroad Club in Portland, Oregon. There are videos on youtube if you are interested.

?????? Right now I have about 500 lights that are hooked up and ready to add to the Lights Table. There is probably another 500 that have not been connected. Also, we are going to use the lights table to schedule some animation on the layout.

?????? I plan to update the club to a Buildxxxx after I'm confident the Lights and everything else is working. Then not update until 4.18 (?) production release.

?????? So I'm a little concerned about your "taking longer" comment on higher addresses(?).

?????? Tim

On 6/21/2019 9:38 AM, steve young via Groups.Io wrote:

Hi Tim,

The status of the Light was sometimes being set quicker than the OpenLCB Light initialisation routine could cope with, causing it to go into an infinite loop condition if actioned pre-initialisation.

I'm definitely no OpenLCB expert so I'm unaware of what happens in that process, I just know that we can't allow calls to set the Light state before it's done!

Perhaps when creating manually, there will be less going on compared to the middle of an xml load so will initialise quicker?

Steve.


Locked Re: OpenLCB - Lights - Help - Tests for build 3335 failed.

 

Hi Tim,

The status of the Light was sometimes being set quicker than the OpenLCB Light initialisation routine could cope with, causing it to go into an infinite loop condition if actioned pre-initialisation.

I'm definitely no OpenLCB expert so I'm unaware of what happens in that process, I just know that we can't allow calls to set the Light state before it's done!

Perhaps when creating manually, there will be less going on compared to the middle of an xml load so will initialise quicker?

Steve.


Locked Re: OpenLCB - Lights - Help - Tests for build 3335 failed.

 

¿ªÔÆÌåÓý

Thanks, Steve

?????? I think I understand, but why does it not seem happen during the creation and running of the lights, but after save and reload? Of course, as a user this is my view.

Tim

On 6/21/2019 7:41 AM, steve young via Groups.Io wrote:

Hi Tim,

Many thanks for testing with a developer version and for uploading your xml, I found it in this folder??/g/jmriusers/files/ProblemsBeingWorkedOn/Updated%20Lights%20-%20Testing
All attachments in emails sent to the group are stripped from the message.

In OpenLCB CAN Simulation I was able to produce an issue with constant on-off messages in some of the OpenLCB lights using your xml file.
The status was being set before some OpenLcb specific code had finished initialising the Light.
( Red Herring alert for future dev. The higher address ranges seemed to take longer to initialise ?? )

I've added a further check to stop an OpenLCB Light status being set before being fully initialised via Github ref 7120??
With this in place I was able to load your panel with no issues, and have checked that Lights are being set at the right times.

I'll message here when an updated version with the fix is available,

Steve


Locked Re: OpenLCB - Lights - Help - Tests for build 3335 failed.

 

Hi Tim,

Many thanks for testing with a developer version and for uploading your xml, I found it in this folder?/g/jmriusers/files/ProblemsBeingWorkedOn/Updated%20Lights%20-%20Testing
All attachments in emails sent to the group are stripped from the message.

In OpenLCB CAN Simulation I was able to produce an issue with constant on-off messages in some of the OpenLCB lights using your xml file.
The status was being set before some OpenLcb specific code had finished initialising the Light.
( Red Herring alert for future dev. The higher address ranges seemed to take longer to initialise ?? )

I've added a further check to stop an OpenLCB Light status being set before being fully initialised via Github ref 7120?
With this in place I was able to load your panel with no issues, and have checked that Lights are being set at the right times.

I'll message here when an updated version with the fix is available,

Steve