Keyboard Shortcuts
Likes
- Jmriusers
- Messages
Search
WHERE USED doesn't find sensors located in setSensorState statements
#logixng
I have LogixNG statements using? Digital Formula: setSensorState("69-RWKE",getSensorState("69W-R")).? ?When using WHERE USED to find either of these sensor terms, these instances don't show up.? I assume this is also true for the other getX/SetX functions.? Is this a capability that can be added to WHERE USED in a future release??
?
--
Jim Moomaw Portland, OR - Willamette Model Railroad Club (WMRC) - NMRA, Pacific NW |
Re: LogixNG Table example: yard ladder Table?
#logixng
Dave,
?
So many thanks for your patience and willingness to help, I mostly appreciate that!
I will forthright implement your advice re. file allocation.
?
Erik |
Re: Looking for ideas to mirror SE8C signals between two panels
I was finally able to do some testing of this and it doesn't appear to be working.? It works in the same way that the Logix did that I wrote in that transitions from green -> red -> green and yellow -> dark -> yellow work but red -> yellow -> red and green -> dark -> green?don't work. This was tested on the real layout and didn't work so to make it easier for me to debug/test I recreated the issue locally.? Here is what I added to the FollowSE8C : FollowSE8c().set("LH4","LT1556", "LT1557") Here is the logix that I wrote to enable me to drive the similar sequence that JMRI would generate when talking to a real SE8C. Basically just created a few internal sensors that when they change state send the desired turnout command ? IX:AUTO:0001C1 ?56 Throw ? ? ? [x] ?R1 ?IF ?Sensor "IS56Throw" state is "Sensor Active" ? ? ? [x] ?R2 ? ?OR Sensor "IS56Throw" state is "Sensor Inactive" ? ? ? ? ? ? ? ?THEN ? ? ? ? ? ? ? ? ?When Triggered True, Set Turnout, "LT1556" to Thrown ? ? IX:AUTO:0001C2 ?56 Close ? ? ? [x] ?R1 ?IF ?Sensor "IS56Closed" state is "Sensor Active" ? ? ? [x] ?R2 ? ?OR Sensor "IS56Closed" state is "Sensor Inactive" ? ? ? ? ? ? ? ?THEN ? ? ? ? ? ? ? ? ?When Triggered True, Set Turnout, "LT1556" to Closed ? ? IX:AUTO:0001C3 ?57 Throw ? ? ? [x] ?R1 ?IF ?Sensor "IS57Throw" state is "Sensor Active" ? ? ? [x] ?R2 ? ?OR Sensor "IS57Throw" state is "Sensor Inactive" ? ? ? ? ? ? ? ?THEN ? ? ? ? ? ? ? ? ?When Triggered True, Set Turnout, "LT1557" to Thrown ? ? IX:AUTO:0001C4 ?57 Close ? ? ? [x] ?R1 ?IF ?Sensor "IS57Closed" state is "Sensor Active" ? ? ? [x] ?R2 ? ?OR Sensor "IS57Closed" state is "Sensor Inactive" ? ? ? ? ? ? ? ?THEN ? ? ? ? ? ? ? ? ?When Triggered True, Set Turnout, "LT1557" to Closed?? ? When I generate the following loconet traffic that should cause red -> yellow -> red changes but it doesn't.? What I see is red -> yellow but then it does not change back to red. 21:20:45.615: Requesting Switch at LT1556 to Thrown (Output On). 21:20:45.615: Requesting Switch at LT1556 to Thrown (Output On). 21:20:45.695: Requesting Switch at LT1556 to Thrown (Output Off). 21:20:45.713: Requesting Switch at LT1556 to Thrown (Output Off). 21:20:50.881: Requesting Switch at LT1557 to Thrown (Output On). 21:20:50.881: Requesting Switch at LT1557 to Thrown (Output On). 21:20:50.961: Requesting Switch at LT1557 to Thrown (Output Off). 21:20:50.979: Requesting Switch at LT1557 to Thrown (Output Off). 21:20:54.213: Requesting Switch at LT1556 to Thrown (Output On). 21:20:54.234: Requesting Switch at LT1556 to Thrown (Output On). 21:20:54.311: Requesting Switch at LT1556 to Thrown (Output Off). 21:20:54.329: Requesting Switch at LT1556 to Thrown (Output Off). I think this is the same issue that the logix is seeing in that the FollowSE8C code is setting up propertyChangeListeners but the property/turnout value is not changing in this scenario?so it doesn't appear that the listener is being triggered.? In the trace above LT1556 goes to thrown (RED) and then it is commanded to go to thrown (RED) again.? It never goes closed (GREEN) . Is there a way to subscribe to all messages not just changes?? Is there something weird about our configuration of the SE8C that isn't generating the expected sequences? On Wed, May 21, 2025 at 9:51?PM billybob experimenter via <jawhugrps=[email protected]> wrote: On 5/21/2025 8:40 PM, cengel_74 via wrote: --
?Chris |
¿ªÔÆÌåÓýHeath, LogixNG has the actions Publish and Subscribe for MQTT. Subscribe let you listen on one or many topics and Publish let you publish a message. You can use wildcards to subscribe on many topics at once. When you subscribe to topics, you can use other LogixNG actions like Digital Formula to parse the topic in the messages you receive to decide what you should do about it. Daniel
On 2025-05-29 02:57, Heath @
Human[c]ity Junction wrote:
|
I have MANY MQTT controlled relays on my layout, they control the track power to each block on the layout.
?
I want to create a LogixNG script that will toggle each relay, one at a time, so that the system knows the state of the MQTT device. Is there a way to automate this, or do I have to create a script to togge each one, one at a time.
?
Other option, is there a way to query the state of the MQTT devices and just have it report back it's state so that the sensors know the position of the relays. I suspect it could be done in software, buy I am currently just manually toggling each relay so JMRI can detect it's setting.
?
Thanks
--
Heath @ Human[c]ity |
Re: EngineDriver Beta v2.40.199 now available from the Play Store
#enginedriver
v2.40.199 was automatically downloaded to my Samsung Z6 Fold, but due to ongoing health issues, I am still unable to do much testing (only your web site is available to me).? However, I do have a couple of questions: Where are Function Preferences (and other engine related data?) stored between ED sessions? And why can't I find that data via the Files app?
|
Re: Simple way to move any loco between two points (automated)?
Nags, Yes. Dave Sand ----- Original message ----- From: "Nags via groups.io" <snowy999=[email protected]> Subject: Re: [jmriusers] Simple way to move any loco between two points (automated)? Date: Wednesday, May 28, 2025 4:58 PM On Tue, May 27, 2025 at 08:13 AM, Dave Sand wrote: Ramping will depend on momentum. As I've been going through AbstractAutomaton I came upon 'waitMsec'. With a warrant script it changes throttle value when starting or stopping using elapsed time. Can I replicate this in the script with this command. i.e.? self.throttle.setSpeedSetting(0.1) ??????? print 'train shoud be moving' waitMsec(2000) self.throttle.setSpeedSetting(0.2) waitMsec(2000) self.throttle.setSpeedSetting(0.3) ? -- H.O. Australia (Layout in Progress) Digikeijs DR5000 LocoNet JMRI v5.10 DecoderPro/Warrants/CPE/SML/LogixNG Java: OpenLogic jre-17.0.12.7 ? Windows 10 |
Re: Trains list and Schedules disappeared
#operationspro
toggle quoted message
Show quoted text
From: [email protected] <[email protected]> on behalf of Dan Boudreau via groups.io <daboudreau@...>
Sent: Tuesday, May 27, 2025 9:22:04 PM To: [email protected] <[email protected]> Subject: Re: [jmriusers] Trains list and Schedules disappeared #operationspro ?
Fran,
?
I would recommend that you restore one of your backups.? If "Auto backups" was enabled in the Settings window, the program should have created a set of backup files for you each time you started OperationsPro.
?
Dan
|
Re: Simple way to move any loco between two points (automated)?
On Tue, May 27, 2025 at 08:13 AM, Dave Sand wrote:
Ramping will depend on momentum. As I've been going through AbstractAutomaton I came upon 'waitMsec'.
With a warrant script it changes throttle value when starting or stopping using elapsed time. Can I replicate this in the script with this command.
i.e.?
self.throttle.setSpeedSetting(0.1)
??????? print 'train shoud be moving'
waitMsec(2000)
self.throttle.setSpeedSetting(0.2)
waitMsec(2000)
self.throttle.setSpeedSetting(0.3)
?
--
H.O. Australia (Layout in Progress) Digikeijs DR5000 LocoNet JMRI v5.10 DecoderPro/Warrants/CPE/SML/LogixNG Java: OpenLogic jre-17.0.12.7 ? Windows 10 |
Re: Logix, can I view Timers that have been activated but the time has not expired yet?
#logix
On 5/28/2025 3:56 PM, eddane2550 via groups.io wrote:
Thanks in advance for your help._In Logix_, I do not think so. To a large extent, Logix does some things that are not well understood by current JMRI coders. (That is why a developer or two came up with the LogixNG scheme instead - it apparantly is MUCH easier to make JMRI internal changes than with Logix.) Why do you want this type of feature? Is it because of the annoying "... WARN - timer already active on request to start delayed sensor action - ..." messages in the JMRI Console Log? If so, I have found that including a "Reset Delayed Set Sensors" action or a "Cancel Timers for Sensors" action, before any of the other actions in the conditional, in the Logix "Actions" where I will later be setting a "Delayed" Set Sensor" operation, will, someimes, resolve that WARN message. Sometimes it seems to help. Other times not. Oh well. LogixNG I have no idea about... (I don't use LogixNG for a wide variety on reasons, including that "debugging" it is very difficult for me, and that the .XML for a given LogixNG implementation of a set of conditionals is HUGELY larger than XML for the equivalent implementation in Logix. Just my opinion, though. YMMV!) |
Re: LogixNG Table example: yard ladder Table?
#logixng
Erik
Do they automatically go there? ?Does "profile:" and "preference:" match for all of your profiles? ?They do not match for the "Mijn_JMRI_Spoorweg.jmri" profile. ?Also, the roster.xml file and most likely the roster directory are at?C:\Users\Erik Arckens\JMRI\. I recommend that you use "Preferences -> File Locations" and set the "User File Location" the same as the profile location. ?That is where other people will expect to find user data. ? I am in the process of looking at your files. The first problem was that path to the CSV file. <fileName>preference:Mijn_JMRI_Spoorweg.jmri/yard-ladder-example/yard-ladder-cmri_dutch.csv</fileName> With standard locations and putting files at the preference/profile directory level, the path is much simpler <fileName>preference:yard-ladder-cmri_dutch.csv</fileName> I will have more feedback later. Dave Sand ----- Original message ----- From: "Erik84750 via groups.io" <e.arckens=[email protected]> Subject: Re: [jmriusers] LogixNG Table example: yard ladder Table? #logixng Date: Wednesday, May 28, 2025 12:44 PM On Wed, May 28, 2025 at 07:00 PM, Dave Sand wrote: As I mentioned earlier, you user files location is?C:\Users\Erik Arckens\JMRI\. ?I suspect most of your user data, including roster, other xml data files, etc., are located here. No Dave, I store all .xml files in each profile's directory. So I guess I have been right in that aspect. But your explanation for the storage location of the .csv files now makes sense to me, thank you very much for your time spent! ? I still have some questions about the yard-ladder-example.xml: ? I try and get to use c/mri to assign sensors and turnouts, but not very succesfull to date (in stead of the internal allocation). ? My goal is to have four sensors (connected to a c/mri node) -functioning as buttons- and three 1-bit turnouts (on/off) also connected to that node. The hardware is present, and the node is equipped (programmed) with the in- and outputs configured in the node. ? I made a table that had been exported into a .csv file, and modified your NG code for that table. I add below the .xml and the .csv: would you be able to have a look at the configuration please? The .xml is stored in my corresponding profile folder, the .csv is stored under C:\Users\Erik Arckens\JMRI\ ? Thank you for your attention and time! Erik ? ? Attachments:
|
Logix, can I view Timers that have been activated but the time has not expired yet?
#logix
Thanks in advance for your help.
?
? Would like to be able to see sensors that in Logix, I have I have executed "Delayed Set Sensor", but the wait time has not yet been reached.? Can this be done?
--
Thanks....? ?Ed Dane |
Re: DCC-EX Voltage/current meter
#dcc-ex
¿ªÔÆÌåÓýI would suggest using a resistor to prove the calibration of the value. Yes, it sounds like values are in mA as you are seeing. But it may also be just the analog value which for an UNO is 0 to 1023 as I recall. You¡¯d need a resistor good for a couple of watts, I use 10 and 25 watt for testing circuit breakers. ? Somebody who knows the circuit and the code could tell what the value really is meaning. ? -Ken Cameron, Member JMRI Dev Team
? ? |
Re: DCC-EX Voltage/current meter
#dcc-ex
Is it me, or does the DCC-EX documentation suggests those values should be returned the other way round¡?
?
?
?
?
|
Re: DCC-EX Voltage/current meter
#dcc-ex
On Wed, May 28, 2025 at 11:38 AM, Daniel Mcmillan wrote:
am I missing out on anything by running it on an Uno?I've no idea of specifics, just reflecting what I've seen on the Discord group, that "some" features are disabled to get EX-CommandStation to fit and run on an UNO. I'm sure someone on the Discord group could tell you if they chose to. ?
If your UNO setup is doing what you need it to, you've no need to change.?
?
--SteveT |
Re: DCC-EX Voltage/current meter
#dcc-ex
Thanks Steve. ? When you say that DCC-EX really needs more oomph than an UNO can provide, am I missing out on anything by running it on an Uno? ? I have it connected to my laptop running only via JMRI (tablet throttles via JMRI¡¯s wi-throttle server)? and don¡¯t use any of the additional features that EX can potentially provide. I run an end to end layout, max two Locos at any one time and program CVs on the B-side output of the motor shield using JMRI¡¯s decoder pro. ? Would I see any benefits/additions by upgrading to a Mega in my situation do you think? |
Re: Ad Hoc Changing Block Alternate Colour - Means of Showing Cab Allocation with DC Cab Control
Colin, The updated demo is attached. When the cab selection is changed, the unallocated layout blocks get the new cab color. ?When the NX route is allocated, the colors have already been set so there is no delay. ?When the NX route is deallocated, the layout blocks get the current cab color so all of the unallocated blocks have the same cab color. The?cab-colors.py script has the list of cab colors. ?This script is used by two other scripts. The?set-cab-color.py script sets the alternate color for the unallocated blocks. ?This is called by the "Select Cab" LogixNG. The?set-block-cab.py script sets the alternate color for the blocks that become unallocated. ?This is called by the "Set Block Cab" LogixNG. ?This LogixNG also has the start of the logic for the MERG actions to do the cab to track assignments. Dave Sand ----- Original message ----- From: "colin smith via groups.io" <colinsmithwork=[email protected]> Subject: Re: [jmriusers] Ad Hoc Changing Block Alternate Colour - Means of Showing Cab Allocation with DC Cab Control Date: Wednesday, May 28, 2025 11:42 AM On the demo: Tried, gets there but appearance while so doing is somewhat clunky. Even on this modern laptop and modest demo size panel there's a noticeable intermediate (last-used) allocated colour state at NX route acceptance. Unallocated > old allocated colour > pause > new allocated colour. ? On your potential problem where an operator selects a cab then cancels a route with a different cab before including elements of that route in a new one: Ah, concept meets real (as opposed to ideal) operator. Concept found to be not as clean as anticipated! Yes your suggestion would work. ? One other though occurs, is to set the cab after the NX process rather than before it. i.e. Operator clicks cab button after rather than before. No particular preference, just another idea. Your earlier state numbers/needed block colours: 1). Unoccupied default (one of 2). I already am choosing alternate unallocated blocks being different colours to make boundaries most obvious. 3). NX allocated default (say white as now). 4). NX allocated cab specific (one of five). Applied when cab button is clicked. Clicking the cab button causes the cab specific allocated colour to be applied to those reserved blocks displaying the default allocated colour. This would also be a good place to select cab relays. ? Once I've got to grips with logixNG and to some extent scripts I might have a go doing it like that. Your examples contain a lot of experience to make it so efficient and are teaching me more with every line! ? My hardware is MERG CBUS and block relays would be a pattern of turnout events sent to CANVOUT modules with universal software. I will try that myself when ready. |
Re: DCC-EX Voltage/current meter
#dcc-ex
Excellent, thank you, Daniel!
?
Yes, it does seem that the <JI> works with the UNO. I will take a look at updating JMRI to use <JI>.
?
--SteveT |