LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display temperature when another instrument sets a trigger

Hi,

I am building an application that will read from two inputs.  One being a particle counter and the other a thermocouple using the USB-TC01.  The goal of this program is to report the two temperatures when the particle counter first reads 1,000 and 10,000 particles.  The counter is set-up to take readings every six seconds, and it is possible to take a reading of say 1,200 counts then the next reading only read out 900 counts. So I want the temperature that is displayed to be from the first time the particle counter reads above 1,000counts. 

 

Attached is my current VI, I had thought about putting the indicators inside an Event Structure that built an array and only reading the first element in that array.  The way I have it set-up now doesn't seem to work.

 

Are there any ideas of how to grab these two temperatures to display them on the front panel?

 

Thanks,

-Tony

 

 

0 Kudos
Message 1 of 8
(2,603 Views)

Realize this is a loaded noob question but any help is appreciated. 

 

My two events are in a sequence structure inside a while loop My particle counter is in the first frame, thermocouple in the second

What will be the easiest way to pull a temperature and place for a given particle count?

 

I tried an event structure in the last sequence of my sequence structure, it doesn't seem to be working

0 Kudos
Message 2 of 8
(2,570 Views)

While there may be better ways, I'd just make a boolean indicator/control (hidden on front panel) for each important temperature display.  When the program starts, set them to true.  When you make the first temp reading for a particle count, set the corresponding boolean to false.  Now in the future, you can check the boolean first to determine if you should update the temperature measurement.  If the boolean is false, a reading was already made so another one isn't needed.

0 Kudos
Message 3 of 8
(2,565 Views)

Thanks for the reply.  But I don't think I explained my test very well.

 

I am using this test to heat oil and measure the temperatures when the particle counter determines it is "smoking"

1,000 counts is considered to be partial smoke and 10,000 counts is completely smoking.

So I need to grab the two temperatures when I pass these count limits.  The biggest problem is that I have multiple cycles between 1,000 and 10,000 counts so my "temperature @ 1,000 counts" keeps getting updated every cycle.

 

I have a similar setup to what you suggested except I set booleans to false and once they read true (ie the counts are >1000) then I should read my temp measurement but when I set it up this way in an event structure the event never occurs, or constantly replaces my temperature for every cycle after that.

0 Kudos
Message 4 of 8
(2,555 Views)

My point was to use a SECOND boolean to determine if you should update the temperature info or keep the current data.  You obviously check to see if the particle count is larger than 1,000 (or 10,000) and you'll get a boolean true or false.  If true, use the second boolean to control whether or not the temp value is updated (ie if it's the first measurement or not).  

0 Kudos
Message 5 of 8
(2,552 Views)

Hello hill341539,

 

It looks like you are trying to pass reference information to an Instrument Assistant and send it to the VISA Close function at the same time. This can be problematic right now since by the time the while loop starts the reference has already been closed. Try deleting the Visa Close from your code. The resource itself is being Opened and Closed by the Instrument I/O Assistant. This application sounds time sensitive so I would consider looking toward more low level coding instead of DAQ and Instrument Assistant since they constantly open and close references during loop iterations which takes a lot of time.

 

Regards,

 

-Travis E

National Instruments
Product Marketer
0 Kudos
Message 6 of 8
(2,543 Views)

Did not think of using a second boolean, now I see what you're saying, I'll give this a shot.

0 Kudos
Message 7 of 8
(2,523 Views)

Travis-E

 

I've used the VISA close function because if I don't about half the time it tells me my visa is correct but cannot be accessed, i.e. it didn't close properly the last time, so I figured if I start the program by closing it I can avoid this problem. This is a big problem when I have to stop the program prematurely (trouble shooting) and I guess the VISA remains open.  This part seems to be working fine, but if there is a better way of doing this I'm open to it.

 

The program is somewhat time sensitive, I measure for 3 seconds then pause for 3 seconds.  So I need to read data every 6 seconds, I don't think I need to be concerned with a few extra milliseconds? I could be wrong.  Even though technically I would want the temp reading from my DAQ assistant to be at the same time as my Instrument reading, over the course of 6 seconds my temperature will only increase less than 1degree C so if my DAQ reading is 1-3seconds after my instrument reading that will be ok.

 

Thanks.

0 Kudos
Message 8 of 8
(2,518 Views)