01-05-2017 10:20 AM - edited 01-05-2017 10:46 AM
I am trying to create a front panel for a battery system. I need to create a VI interface to view information from the hardware.
Although the front panel will differ slightly, here is an example of a similar interface where I am basing the structure of the front panel bsc info.png. The top table and boolean list best represents what I am looking to achieve with the VI, although the items will differ.
Requirements:
See BSC Information.vi . I created a cluster and a set of 1d arrays for the various items. The top left 3 arrays refer to unsigned integers and the bottom left 3 refer to signed integers. The 9 boolean arrays on the right represent bitfield data.
Initially I added the item names and units in the info and unit columns, however after realising they were indicators, these values disappeared. I tried to turn these to controls to set the values, but instead it turns the value arrays into controls. I can create controls outside of the cluster, but within the same cluster I am not able to have both indicators and controls.
How can I set the info and unit arrays to be controls whilst keeping the values as indicators?
Or is there a different way I should be approaching this? The item names need to defined and made accessible to link them to the values.
Thanks in advance.
01-05-2017 10:42 AM
Correct me if im wrong, but you have some items in the cluster that you want to act as controls and others you want to act as indicators?
If yes, you can make the cluster a control and then use a local variable or property node to write values to the control. Someone may be able to suggest a better solution to this, but if you dont want the "indicators" to be altered by the user you can capture the event and discard if it is an item that is to be an "indicator".
01-05-2017 10:54 AM
Hi Matt,
I'm not entirely sure if I require controls for the item names or not, they just need to be defined and accesible. But the values must be indicators - as they obtain the information from the hardware.
01-05-2017 12:18 PM - edited 01-05-2017 12:20 PM
I don't have LV 16 to know exactly what controls/indicators you are using and how you programmed them.
It looks like you are using a table. A table is a special display of a 2-D string array, so any numerics need to be converted to strings. If you have 1-D arrays, then you need to build those arrays into 1-D array. If things like names are constant, then you need to program them as constants and use that when you build your 2-D array.
Is this homework? Whenever someone presents a question with so many uncertainties, and lists a well-typed up list of requirements, it sure sounds like a homework assignment. We will help, but will guide you to a solution rather than just solving it for you.
01-05-2017 02:24 PM
01-06-2017 02:46 AM
Hi Per,
Yes the purpose of the VI is to display information. I realise now controls aren't appropriate, but I wasn't sure how to define the item names. The emulator is using modbus protocol to connect to the computer. Each item name refers to a different modbus address, where a value and unit corresponds to that item. I will look into type definitions and saved controls.
Thank you.
01-06-2017 02:50 AM
Hi,
I am using 1D string/ numeric arrays. String for the info/ item names and units and u16 or i16 for the values.
This is actually a work assignment, with the requirements briefed by my manager. I have some experience of LabVIEW but my application is rather limited. The application is to display information from a battery emulator on LabVIEW using modbus protocol.
01-06-2017 03:01 AM
01-06-2017 03:33 AM
Hi GerdW,
I previously put the data into a multicolumn listbox with no problems, but now I've been asked to display all tabular information as 1D arrays.
01-06-2017 03:38 AM
Hi Per,
I tried changing the info array as a type def, but when I enter the values in the type def, although they remain in the array for the type def they do not appear in the vi.