link Linux file names to Dynamic factorytalk view list

wjethro

Member
Join Date
Mar 2020
Location
Los estados unidos
Posts
5
Long time reader here but don't post much as I usually find the answers I need in the forum search. I am trying to create a dynamic selection list on a Panelview plus standard 7 panel. Is there a way to have a dynamic list of variables that is referenced from a Linux system?

For more detail:

I have a Ubuntu 18 OS that a user creates and runs programs for a certain process. All of these program files are saved in the same folder and have the same file extension. The PLC is a 1769-L30ERM that controls outside automation processes. I can control processes by passing tags back and forth on the network at appropriate times ie. Start and Stop and Fault bits. A particular customer wants to be able to add new progams in the Linux system which would be new programs with the same extension as the previous programs and then be able to select them from the RA HMI. The way I am currently achieving this is through a string match. The program in Linux and the String entered in the tag must match and then the programs work together. Is there a more operator simple way to do this with Linux and RSLogix? Thanks for any input.
 
Do you want

  • the Linux box to push (write) and populate the list to the Panelview, triggered by an action or event on the Linux box UI
  • OR
  • the Panelview to pull (read) and populate the list from the Linux box, triggered an event on the Panelview
  • or both?
I don't know Panelview at all; I wonder if it might be easier to keep the list on the PLC and use pylogix to put it there.
 
By "programs", do you mean "recipes"?

The PanelView won't be talking to your Linux system. You would point the PanelView to tags in the PLC and have your Linux system interface with the PLC. All the work should be done between your Linux system and PLC, the PanelView should just be displaying.

It sounds like you might be wanting to write new "recipes" from you Linux system to your PLC, the operator can select these new recipes from the HMI. The basic idea, assuming that I understood correctly, would be to create a UDT for your recipe, then declare an array of your UDT. Selecting from the PanelView, the operator would scroll through the array selecting which one they want to run. You Linux system would update the array with new recipes as you need to.
 
I think

  • the Linux basenames are the recipe strings
    • E.g. Load_Line_1.prg
  • The contents of each file comprise a "program."
  • Having the system execute the "program" in any Linux file, which file's basename is selected by the HMI, is already working
    • It sounds like the HMI selection method involves typing in the basename, perhaps without the extension
  • So the issue is automatically taking an updated list (ls; Python module glob) of the *.prg files in that directory of the Linux system, and loading that list into a view/select widget on the HMI, for a more convenient selection by the operator.
Am I close?


Does Panelview software have any programming capability (e.g. VBA)? Or an API e.g. can its widgets be written to? Can a view/select list even have a dynamic stable of strings?
 
I think

  • the Linux basenames are the recipe strings
    • E.g. Load_Line_1.prg
  • The contents of each file comprise a "program."
  • Having the system execute the "program" in any Linux file, which file's basename is selected by the HMI, is already working
    • It sounds like the HMI selection method involves typing in the basename, perhaps without the extension
  • So the issue is automatically taking an updated list (ls; Python module glob) of the *.prg files in that directory of the Linux system, and loading that list into a view/select widget on the HMI, for a more convenient selection by the operator.
Am I close?


Does Panelview software have any programming capability (e.g. VBA)? Or an API e.g. can its widgets be written to? Can a view/select list even have a dynamic stable of strings?


This is a good assessment. The programs on the Linux machine controls different systems than the PLC controls. It might be easier to put it as the PLC runs the Load process and the unload process. Once the system is loaded the Linux subsystem receives a run command from the PLC. Once the Linux process is complete it sends an unload tag to the PLC. The PLC then runs the unload portion of the process. The Linux sub-sytem process has user defined variables that are saved to a program name. The program name can be changed by the operator and I am currently doing this with a string match tag in the PLC. The operator can input a string on the HMI and it is passed to a tag value in the PLC. I have the logic add the end values to complete the program (like the .cc) Each time the Linux subsystem is told to start, the program string tag is passed and if it has a match that Linux program tag is loaded and runs.

Running a python script that assigned the program.cc tags in from a certain folder on the linux system to the PLC variables would work if that is possible, I have never done something like that.

My reading into the Recipe's on Rockwell seemed like a dead end because my understanding was that the Recipe tags were not available to be passed to other displays. This particular system will be integrated to other PLC systems that must be able to set and read the tag values.

As I mentioned I have the string match working between the PLC's and the Linux system but the operator must enter the "Linux_Program" into the HMI. It would make it easier for the operator if there were a way to create a list of "Linux_Programs_1" strings from the Linux programs. This is easy for me if I hard coded the system to pass the string tag but the customer wants to be able to add "New_Linux_Programs_50.cc" that the PLC would automatically pull up. Does that make better sense? Any ideas would be appreciated. I am looking into the .py script idea. Thanks
 
Last edited:
Do you want

  • the Linux box to push (write) and populate the list to the Panelview, triggered by an action or event on the Linux box U


I essentially would like to push the file names from the Linux folder to a PLC tag that matched the Linux value so the operator could pull down a multichoice list of these program names. This would allow the PLC to run the load process, pass the selected program name so Linux could run its process, and then allow the PLC to run the Unload process. Thank you
 
Last edited:
There is probably a better way to do it, but here goes.


Say there were N Linux programs, blah_00.cc, blah_01.cc, ..., blah_34.cc.


Python/pylogix could, I think, easily transfer all N into an array of strings (of length say N*10, or what honor dictates) on the PLC. This array is ALLPROGRAMS.



There is a second array of say 5 strings on the PLC, HMIPROGRAMS, and integer tag IBLOCK and ITOLOAD.



The panelview has a screen that has a display for 5 strings, a [previous 5] button, and a [next 5] button. When that screen is initially displayed (I don't know the terminology), it sends a 0 to IBLOCK in the PLC.


The PLC sees IBLOCK = 0 and moves the first five strings from ALLPROGRAMS, ALLPROGRAMS[0] through ALLPROGRAMS[4] into HMIPROGRAMS[0] trough HMIPROGRAMS[4].


The panelview displays the 5 strings in HMIPROGRAMS in this screen's 5 strings.



If the operator hits the [next 5] button, somehow IBLOCK becomes 1 on the PLC, which causes strings ALLPROGRAMS[5] through ALLPROgRAMS[9] to be moved to HMIPROGRAMS, which are then displayed on the Panelview screen (automatically, I assume?).


I assume the rest is obvious: [previous 5] somehow decrements IBLOCK, etc.


Either each string displayed is a button, or a button is next to each string, and that button sends a number between 0 and 4 to the PLC integer ITOLOAD.


When the PLC detects ITOLOAD is between 0 and 4, it makes the string HMIPROGRAMS[ITOLOAD] the next program to run. Maybe it also assigns -1 to ITOLOAD, which it ignores after that, but also to be ready for the next assignment to ITOLOAD by the HMI.

The ALLPROGRAMS array on the PLC could be dispensed with, and a 1Hz or 2Hz pylogix script/task could poll IBLOCK and load HMIPRGRAMS from the Linux host when it changes; that way neither the PLC nor the HMI are always only consumers of, and never responsible for, the program names, and the files in the Linux directory is the only source for those data.



So, that is what someone ign'nt of Panelview might try. Although it seems odd to me that that kind of recipe system does not already exist. The python part is trivial; the PLC part is trivial; I suspect the Panelview part is also trivial to someone who knows how to use Panelview.


I also found this post - https://www.plctalk.net/qanda/showthread.php?p=47763#post47763 - in another old thread, but I don;t think it is what you are looking for.
 
Last edited:
Just the names, or is there other data, as well?

I am passing only the names. Other override data for the programs is being handled elsewhere as a DINT. I originally was going to create a Struct with all the necessary data but it became more tedious than necessary for the production process this is used for.
 
Thanks drbitboy. I agree each process separately is easy to accomplish. It is getting them to work together with RSlogix is the challenge. I will run with your suggestion. I appreciate your time.




Glad to help, let us know how it goes.


Are you using pylogix, or summat else? I found it robust and straightforward, so this design where the PLC is at the center, and Linux and Panelview only communicate with and through the PLC, and not with each other, should work out well, even if it feels like a bit of a kludge.
 

Similar Topics

Hi, I'm having an issue with a mircologix not transmitting out. The current setup is a mircologix 1400 connected to a Guardian 100 Radio...
Replies
1
Views
70
Buona sera, Ho dei problemi nell' interfacciare PLC S5 con HMI 2a Gen. Siemens (ad esempio KTP400) tramite IBH Link S5++. il mio obbiettivo è solo...
Replies
0
Views
58
I have inherited a system that uses a Parker ACR9000 motion controller with the Ethernet PowerLink option that it uses to control five Parker...
Replies
5
Views
161
Please help me, I have solve many week but still not solve it. I found trouble of factory talk studio when I set tag by browse address of OPC...
Replies
0
Views
80
I've been trying to get some data out of IO-link devices, just for my own curiosity. Tools: Siemens ET200SP CPU Siemens CM 4x IO-Link Keyence...
Replies
3
Views
153
Back
Top Bottom