LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about Arrays

Solved!
Go to solution

Hi James,

The flash only happens once because the logic which includes the wait function resides in an event structure. Is there any way around this, to make the flash continuous. See attachment.

By the way, I use Labview 2013.

 

Thanks!

0 Kudos
Message 11 of 31
(988 Views)

You had me stumped here for a sec because I was seeing two event triggers every time the button is pressed. This was causing the highlight to take twice as long to change color.

You need to change the LED switch action to "Switch When Released", or "Switch When Pressed". For some reason you had it set to "Latch Until Released"....

I owe this find to Hooovahh.

 

In order to make the flash continuous, you would need to havea parallel loop that sets it over and over. You could maybe do it with a Timeout case, but then any other event would slow down the flash.

Check out the attached VI.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 12 of 31
(975 Views)

Sorry James,

I cannot open the version you sent. I use Labview 2013.

 

Thanks,

TeamHalli

0 Kudos
Message 13 of 31
(969 Views)

Oh, were you able to open the VI I put earlier..?

Here's the latest in 2013.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 14 of 31
(962 Views)

James,

This is exactly what I was looking for. Thank you very much Sir! You made my day.

By the way, I found someone to convert the VI you sent yesterday.

0 Kudos
Message 15 of 31
(955 Views)

@James.M wrote:

You had me stumped here for a sec because I was seeing two event triggers every time the button is pressed.


Your [clear] button is still "switch until released" while it should be "latch when released". As I explained, that causes the clear event to execute twice in a row. Once this is fixed, you can eliminate the case strcuture in the "clear" event". It is no longer needed.

 

0 Kudos
Message 16 of 31
(945 Views)

Hi,

The requirements have changed with the way the listbox is generated. Instead of the list being pre-populated and highlighting the True boolean, the items on the list are generated based on some logic (which works already)...Just a brief description:

- If any boolean in the boolean list (shown on the front panel) is True, its short name shows up on the alarm list

- Selecting the short name gives its long name description in the alarm description

- The three arrays in the Boolean list (Array 1, 2, 3) have the same long name description except for the temperature valuess. So instead of shown all, each array is prioritized so that only the highest priority/temperature on that array is shown.

 

So the difference with this set up and the one I sent yesterday is that only active alarms are shown on the listbox. So I need to be able to flash all NEW alarms on the listbox and keep old alarms transparent. By new items I mean, any boolean that was not True before the clear button was activated. Here I am not sure which array will be the highlighted cells ...

 

Thanks again for your help.

0 Kudos
Message 17 of 31
(922 Views)

I can't run your VI because you didn't include the Prioritize Alarms VI, but I don't think I need to run it to figure out what you're trying to do.

 

If you have a pre-populated list of alarms that need to be highlights, you can just add those cell numbers to the local variable I gave you (Highlighted Cells) when the list is populated and for all True values. Does this make sense? You would just do this using array operations to check for True values and then add the corrseponding indices to the Highlighted Cells array.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 18 of 31
(910 Views)

@TeamHalli wrote:

 Thanks again for your help.


  • You cannot trigger a valaue changed event by writing to an indicator. You need to write to a signaling value property instead.
  • You can use the timeout event of the event stricture for the blinking. No need for a seperate loop.
  • The "highlighted cells" array can be a shift regsiter. No indicator needed.
  • You don't handle the situation where more than one boolean changes between polls.
  • your clear button still has the wrong mechanical action.
  • Several of your successive FOR loops can be combined into one.
  • ....
0 Kudos
Message 19 of 31
(895 Views)

Hi Altenbach,

 

Can you please elaborate on your bulleted items:

 

  • The "highlighted cells" array can be a shift regsiter. No indicator needed.
  • You don't handle the situation where more than one boolean changes between polls.
  • Several of your successive FOR loops can be combined into one. (I don't know how to simply the FOR loops further)
  • For this item, You can use the timeout event of the event stricture for the blinking. No need for a seperate loop", if I pull the iteration loop into the event, no highlighting occurs.

The missing subVi  and updated VI are attached.

 

0 Kudos
Message 20 of 31
(884 Views)