Author Topic: Index INI Entries by value read from PLC  (Read 160 times)

PLCHorse

  • Newbie
  • *
  • Posts: 19
    • View Profile
Index INI Entries by value read from PLC
« on: September 11, 2024, 06:38:17 PM »
I'm trying to display a Single message from an INI file that will be selected by a PLC Register: in this case N7:1
I tried initially to use the MessageListByValue - but I found I could not limit this to showing a single message - which I understand it seems intended to display a scrolling list of messages.

I added INI support to the basicLabel following instructions I found on a forum. That works - and I tested it with a basic ini "test.ini" which is a list of entries in the form of [####] then below Value=Testmessage

When I go into my BasicLabel I am trying this on, if I use the IniFileSelection and set it to 1 or 2 or #### for example, then the BasicLabel goes and fetches the Value=message appropriate to the number that I set.

However: when I put the IniFileSelection to N7:1 as I intended: then nothing loads, so I'm assuming it is attempting to go to [N7:1] in the INI instead of using the Number coming from N7:1 to go to [####] in the INI.

I am open to another approach, I'm somewhat new to this.


PLCHorse

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Index INI Entries by value read from PLC
« Reply #1 on: September 11, 2024, 06:47:42 PM »
I also tried
EthernetIPforSLCMicroCom1.Read("N7:1")

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5306
    • View Profile
    • AdvancedHMI
Re: Index INI Entries by value read from PLC
« Reply #2 on: September 11, 2024, 07:52:02 PM »
It sounds like you want to use the MessageDisplayByValue. It only shows one message represented by the value in PLCAddressValue

PLCHorse

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Index INI Entries by value read from PLC
« Reply #3 on: September 11, 2024, 08:25:11 PM »
It sounds like you want to use the MessageDisplayByValue. It only shows one message represented by the value in PLCAddressValue

So, i tried MessageDisplayByValue but it kept generating a scrolling list of messages and the latest message displayed at the bottom. I saw a variable called maximum messages or something like that which was 50, but i could not set it to 1.

My message will be of varying length and may be several lines or a sentence, but it might just be one or two words - these are step instructions for the operator to follow and having old steps on the screen will be a no go.

Im also curious if this is possible because i have some other applications for the INI file using something read from the PLC.

My intended use of this looks like a big message area in the center of the screen. I was also hoping to add some INI options for the font size too so i could format accordingly.
« Last Edit: September 11, 2024, 08:27:04 PM by PLCHorse »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5306
    • View Profile
    • AdvancedHMI
Re: Index INI Entries by value read from PLC
« Reply #4 on: September 11, 2024, 09:38:48 PM »
Make sure you are not confusing MessageListByValue with MessageDisplayByValue. The List gives a scrolling history. The Display only shows the message related to the current value.

PLCHorse

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Index INI Entries by value read from PLC
« Reply #5 on: September 11, 2024, 09:53:56 PM »
Make sure you are not confusing MessageListByValue with MessageDisplayByValue. The List gives a scrolling history. The Display only shows the message related to the current value.

Ahhhhhhhh.
At last i truly see.