From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

track changes in array

Hello,

I'm trying to make a VI that acquire current measurements from 80 different channels using a DMM, 2 MUX, and 2 switches in a PXI chassis. I have attached a similar example VI here (main VI named question.vi) but it's not the exact VI. The measurement is acquired every 5 seconds for a set amount of time (200 hrs in this example VI). The left subVI outside the while loop creates a scan list in the middle and enable the appropriate channels in the MUX/Switches. It passes the scan list to the next subVI that acquire reading from various instruments and output 80 measurements along with the corresponding channels to the last subVI on the right. The right subVI in the loop will determine which current/channel in the array is "emitting" depending on the values set on the front panel. This VI will then display the reading, enable the light indicators for the channels that are emitting, and finally updates the scanlist for the next iteration.

I'm trying to add a function that will keep track of the channels that are not emitting for about 15 seconds before removing it from the scanlist for the next iteration. In the example VI, I have tried to use the elapsed time on the right but I'm not sure how to do it for 80 different channels.

I have been trying to figure this out for a few days now but cant get it sorted out. Any help is appreciated.

Thanks

0 Kudos
Message 1 of 3
(2,025 Views)

Hi Maxxx,

 

I'm not sure that you would be able to do this with your current architecture.  If you are only sampling every 5 seconds, checking to see if a channel remains above a threshold for at least 15 seconds will be very difficult since the value can change within the 5 seconds.  If you are willing to take that risk, what I recommend is that you use shift registers to pass the data from the previous two loop iterations.  Then use the AND function to see if the channel value remains above the threshold for three iterations, which would be 15 seconds.  

 

I hope this helps!

 

Regards,

 

Dayna P.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 3
(1,966 Views)

Hello Dayna,

 

Thank you very much for your suggestion, I will try that. I just forgot to mention in the first post that it doesnt matter if the value changes, as long as it's above the shorted (max) current for 15 seconds then it can be disposed of. But I will try to see if I can implement your suggestion.

 

0 Kudos
Message 3 of 3
(1,959 Views)