Keyboard Shortcuts
Likes
- Jmriusers
- Messages
Search
LogixNG POM
#logixng
I am using the POM function in LogixNG.
Currently setting a CV = to an IM value.
Works good.
Now I'd like to ADD an IM value to the CV.
In the snip I started out trying to just add a constant (50) but that didn't work.
I think I need to use the Formula tab but not sure of the syntax.?
--
Many thanks in advance! Vinny DeRobertis ~ Apex, NC New York & Hudson Valley RR Windows 7 Pro / Java 11 / JMRI v5.10 Command Station: Digikeijs DR5000. Booster: Digikeijs DR5033 (4) Samsung A7 10.4" Tablets
Fully Kiosk/Engine Driver v2.37.187
DCC/DMX Gateway: Pricom LLS. LocoNet Input Modules: Digikeijs DR4088LN DCC Output Modules: Digikeijs DR4018 / Yamorc YD8116. Sensors: Model Train Technology: DETECTOR-HO. Turnout Motors: MTB MP1 |
Re: How do I import openpyxl?
If openpyxl.py is *NOT* in the "standard" Python dist library
(under Linux that would be /usr/lib/python3/dist-packages/), you will have to add its path to sys.path: import os import sys sys.path.append("/path/to/the/directory/containing/openpyxl.py") At Wed, 21 May 2025 13:08:12 -0700 "Nick Brownsberger via groups.io" <nbrownsbe@...> wrote: -- Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364 Deepwoods Software -- Custom Software Services -- Linux Administration Services heller@... -- Webhosting Services |
Re: How do I import openpyxl?
Nick, I don't have an answer, but it might be lot easier to export the spreadsheet as a CSV file. ?There are several Jython scripts that work with CSV files that could provide useful examples. Dave Sand ----- Original message ----- From: "Nick Brownsberger via groups.io" <nbrownsbe=[email protected]> Subject: [jmriusers] How do I import openpyxl? Date: Wednesday, May 21, 2025 3:08 PM I want to run a Jython script inside of ?jmri so I can manipulate turnouts, etc. However, the script doesn't recognize openpyxl when I try to import it. I need openpyxl to access an Excel spreadsheet. How do I import openpyxl? ? Thanks in advance, Nick |
Re: LogixNG some help requested
#logixng
Erik, Look at the example at? This combines LogixNG with a bit of Java code. Dave Sand ----- Original message ----- From: "Erik84750 via groups.io" <e.arckens=[email protected]> Subject: Re: [jmriusers] LogixNG some help requested #logixng Date: Wednesday, May 21, 2025 12:21 PM Great! The more I delve into these LogixNG programming the more sophisticated it reveals to be. |
Re: Audio Icon on Web Panel - Java
This sounds like your browser on the tablet has a ¡°only play sounds from top panel¡± option set.
This is commonly desired so that when you have multiple windows open only the top one will be playing the annoying advertising sounds. What browser are you using? JMRI has _no_ _idea_ what window is on top in your browser, so this is not something that JMRI can fix. Bob On May 21, 2025, at 1:29?PM, Vinny DeRobertis via groups.io <vinny.derobertis@...> wrote:¡ª Bob Jacobsen rgj1927@... |
Re: Audio Icon on Web Panel - Java
I'll start fresh.
Tablet1 only has Fully Kiosk browser running.
Panel A is on top on Tablet1.
Panel A has AudioIcon1.
?
Pressing AudioIcon1 plays Sound1 on Tablet1.
?
Issue 1: When I make any other panel on top on Tablet1, Sound1 stops. I'd like Sound1 to keep playing on Tablet1 regardless of which panel is on top on Tablet1.
?
Issue 2: When I run the script from the JMRI computer, it only works when Panel A is on top on Tablet1. I'd like the script to work regardless of which panel is on top on Tablet1.
?
? |
Re: LogixNG some help requested
#logixng
Great! The more I delve into these LogixNG programming the more sophisticated it reveals to be. |
Re: Edit dialog boxes do not open with full width
¿ªÔÆÌåÓýVince, ? The user-interface.xml getting some odd values in there is a typical cause. Since removing the user-interface.xml which holds things like last size didn¡¯t really work, my guess would be the screen size is not being reported right somehow. There might be debug that you could turn on that would show it thinking ¡°this tool is X wide, the user preference is Y wide, but the screen says it¡¯s only Z wide¡± and that would confirm what going on. ? But in your screen settings things like magnify or scale might impact this. Also, some hi-res screens run on low res settings can also confuse things sometimes. ? Others may have clues on this. ? -Ken Cameron, Member JMRI Dev Team
? ? |
Re: LogixNG some help requested
#logixng
Erik, Go to chapter 5 and search for else_if () Dave Sand ----- Original message ----- From: "Erik84750 via groups.io" <e.arckens=[email protected]> Subject: Re: [jmriusers] LogixNG some help requested Date: Wednesday, May 21, 2025 10:16 AM Strange, I cannot find this "if-else-if-else"? |
Re: LogixNG some help requested
#logixng
Erik, There is also the if-elseif-else structure. ?I have not tested to see which is better for this scenario. Dave Sand ----- Original message ----- From: "Erik84750 via groups.io" <e.arckens=[email protected]> Subject: Re: [jmriusers] LogixNG some help requested Date: Wednesday, May 21, 2025 9:50 AM Yesss!!! Thank you Dave, this is of great help! ? Indeed, two pushbutton switches for each turnout: sensor_001 and sensor_002 (in your example: sen1 and sen2). ? "Many" makes a lot of sense, good to learn. |
Re: LogixNG some help requested
#logixng
... I actually meant @Nigel_Cliffe for the "thanks", and now I see your post @Dave_sand too, kudo's to you too :). |
Re: LogixNG some help requested
#logixng
Yesss!!! Thank you Dave, this is of great help!
?
Indeed, two pushbutton switches for each turnout: sensor_001 and sensor_002 (in your example: sen1 and sen2).
?
"Many" makes a lot of sense, good to learn. |
Re: LogixNG some help requested
#logixng
Erik, If "copy/paste" means getting the text of a LogixNG, use the Browse option from the Select menu. Dave Sand ----- Original message ----- From: "Erik84750 via groups.io" <e.arckens=[email protected]> Subject: Re: [jmriusers] LogixNG some help requested Date: Wednesday, May 21, 2025 8:27 AM I may have figured out a few things. But sadly no copy/past from a LogixNG thread possible? ? If Then Else Execute on change If Sensor sensor_001 goes from Active to Inactive Then Set turnout Turnout_001 to state Straight Else_If Sensor sensor_002 goes from Active to Inactive Then Set turnout Turnout_001 to state Divert ? Correct? ? The sensor_001 and sensor_002 never can be inactive at the same time due to their wiring (single pole ON-ON switch). Better were two pushbuttons but this is what I have on hand. ? Alternative would be not an Edge Detection ("..goes from..") but simple 'active' or 'inactive' state. ? Correct? ? |
Re: LogixNG some help requested
#logixng
¿ªÔÆÌåÓýThere is a copy/paste system within the LogixNG editor, but its not a matter of "copying text code".??
Your sample code seems different to the original posting.? In the original posting, you said there were two turnout outputs for the actual turnout.? ?
I'd use the "Many" construct for what you are doing (based on your second posting):??
?! A
? ? ? ? ? ? Many
? ? ? ? ? ? ? ? ! A1
? ? ? ? ? ? ? ? ? ? If Then Else. Execute on change
? ? ? ? ? ? ? ? ? ? ? ? ? If
? ? ? ? ? ? ? ? ? ? ? ? ? ? Sensor sen1 is Inactive
? ? ? ? ? ? ? ? ? ? ? ? ! Then
? ? ? ? ? ? ? ? ? ? ? ? ? ? Set turnout Turn1 to state Closed
? ? ? ? ? ? ? ? ? ? ? ? ! Else
? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ! A2
? ? ? ? ? ? ? ? ? ? If Then Else. Execute on change
? ? ? ? ? ? ? ? ? ? ? ? ? If
? ? ? ? ? ? ? ? ? ? ? ? ? ? Sensor sen2 is Inactive
? ? ? ? ? ? ? ? ? ? ? ? ! Then
? ? ? ? ? ? ? ? ? ? ? ? ? ? Set turnout Turn1 to state Thrown
? ? ? ? ? ? ? ? ? ? ? ? ! Else
? ? ? ? ? ? ? ? ? ? ? ? ? ?
------ Original Message ------
From "Erik84750 via groups.io" <e.arckens@...>
Date 21/05/2025 14:27:36
Subject Re: [jmriusers] LogixNG some help requested
|
Re: Virtual sound setup
#esu
¿ªÔÆÌåÓýI purchased a LokPilot 5 Basic 21MTC (#59029) and have had some time to investigate its capabilities using both DecoderPro (5.10)/NCE PowerHouse (2021 eprom) and LokProgrammer (5.2.12). My LP5Basic came with firmware version 5.0.2 which LokProgrammer updated to version 5.1.6. The results below were the same before and after update. |
Re: LogixNG some help requested
#logixng
I may have figured out a few things. But sadly no copy/past from a LogixNG thread possible?
?
If Then Else Execute on change
If Sensor sensor_001 goes from Active to Inactive
Then Set turnout Turnout_001 to state Straight
Else_If Sensor sensor_002 goes from Active to Inactive
Then Set turnout Turnout_001 to state Divert
?
Correct?
?
The sensor_001 and sensor_002 never can be inactive at the same time due to their wiring (single pole ON-ON switch). Better were two pushbuttons but this is what I have on hand.
?
Alternative would be not an Edge Detection ("..goes from..") but simple 'active' or 'inactive' state.
?
Correct?
? |
Re: Edit dialog boxes do not open with full width
Yes, even though it appears I now have a workaround for the problem, I'm definitely interested in poking around some more to get to the bottom of this. I tried the experiment you mentioned with my "working" My_JMRI_Railroad profile (renaming the user-interface.xml file, moving out the .bak files, just in case). Both monitors plugged in. I tried editing a turnout and I get a skinny window. Save it and re-edit, skinny window again.
?
I won't have a lot of time today, but I'm now at least somewhat motivated to see if I can help. I'll try some more experiments, including comparisons with the files in my older X86/Java 11 system, to see if I can gain any insights. Might be an opportunity for me to accidentally learning something while sniffing around in the UUID folder.
?
Will report back when I have something potentially interesting.
?
Vince |