10-21-2022 11:54 PM - edited 10-22-2022 12:31 AM
Hi,
I'm relatively new to the LabVIEW community. I'm developing a vi to read tags from an Ethernet/IP device (AB CompactLogix PLC). The output of the Ethernet/IP read tag function is an array. I need to use each array element as a numeric display on the front panel. I know I could use the array index function to achieve this, but the array size is 128. So I wonder whether there is an elegant way to accomplish this.
Thanks in advance.
Jimmy
10-22-2022 03:21 AM
@jimmythedolphin wrote:
Hi,
I'm relatively new to the LabVIEW community. I'm developing a vi to read tags from an Ethernet/IP device (AB CompactLogix PLC). The output of the Ethernet/IP read tag function is an array. I need to use each array element as a numeric display on the front panel. I know I could use the array index function to achieve this, but the array size is 128. So I wonder whether there is an elegant way to accomplish this.
Thanks in advance.
Jimmy
Is there a "sensible" way to break them up into 2D arrays? Like maybe they can be grouped, and each group have a tab?
10-22-2022 07:46 AM
@jimmythedolphin wrote:
I need to use each array element as a numeric display on the front panel. I know I could use the array index function to achieve this, but the array size is 128.
If I understood correctly, you are trying to create numeric indicators programmatically for each of the array elements. Please correct me if I am wrong.
10-22-2022 12:04 PM
That is correct! This is what I'm trying to do.
10-22-2022 12:07 PM
Bill,
That is a good thought. I can group similar elements into the same column, but I still need to index each element into a numeric indicator. I wonder if it can be done programmatically instead of using the array index function 128 times.
Thanks,
Jimmy
10-22-2022 01:00 PM
It is not possible to create indicators programmatically-- each indicator present in the front panel has to be created manually.
Could you explain why you need every array element displayed in a single indicator? Perhaps we can find a workaround.
Nevertheless, if it is indispensable to have 128 numeric indicators, you do not need to call the index array function every time, just extend it.
10-22-2022 01:04 PM
I think this might be the way to do it, extending the array index function 128 times rather than calling the array index itself for 128times.
I don't need 128 elements to display to a single numeric indicator; each element will correspond to one numeric display on the front panel.
Thanks for the suggestion!
Jimmy
10-23-2022 02:53 AM
You can maybe reshape the array to a 2D array with 8 columns and 16 rows, for example, then display it in a table.
10-23-2022 05:01 AM
If you want 128 elements on the FP, where you set each one up where you want, I would suggest doing something like this:
Some comments:
10-23-2022 10:18 AM
Here's what I had in mind.
Keep the array in a shift register and you can update any element by using "replace array subset" and the 2D indices calculated from the original 1D index.