LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Battery Front Panel

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:

  • Each column in the table needs to be represented as a 1D array.
  • Values contain uint16, sint16 and bitfield data
  • bitfield will be represented as boolean arrays in labview
  • boolean and values must be indicators
  • item names and units should be preset

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.

 

 

Download All
0 Kudos
Message 1 of 11
(4,200 Views)

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".



-Matt
0 Kudos
Message 2 of 11
(4,175 Views)

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.

0 Kudos
Message 3 of 11
(4,166 Views)

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.

Message 4 of 11
(4,131 Views)

Why would you want any part of this to be a control? What would be the purpose of that? It looks like are fields are only supposed to display information.

 

Some pointers, dont know if you need them: Are you aware of type definitions or saved controls? Could make it easier for you.

0 Kudos
Message 5 of 11
(4,102 Views)

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.

0 Kudos
Message 6 of 11
(4,078 Views)

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.

0 Kudos
Message 7 of 11
(4,076 Views)

Hi Lisa,

 

your image above looks like you could use tables or multicolumn listboxes to display your items/values/units easily…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(4,072 Views)

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.

0 Kudos
Message 9 of 11
(4,065 Views)

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.

0 Kudos
Message 10 of 11
(4,063 Views)