LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

iUSBDAQ with labview for weather station...

iUSBDAQ with labview.i am building a weather station!i am using a microcontroller and a Hytec DAQ.I want to read 12 different sensor values.I already know how to read from the Hytec the different values .However i would like to do a checksum and compare it with that of the microcontroller in order to save the data .How can  save each time the 8 bits(data) in a temporary value and than display it again when no error is recorded?What i mean is that the first time i read the 8 bit for a temparature for example i wanna save it in a temporary variable...and so on and so on for the other sensors.At the end the last 8 bit data received contain a number to be compared with the sum of the values received!if it is the same than i can display all the sensors data and save them properly if not that i must drop the values cause they contain an error and wait for another packet to be send!


Does anyonw have any idea if a local variable is safe to be used in this case?
Any suggestions?
I am new in Labview and i appreciate any help!thank you!

Thank you

0 Kudos
Message 1 of 4
(2,807 Views)

Hi Mendya,

 

I'm not sure what you want to do. 

 

If you just need to keep one value which  you read before,it is enough to store this value in front panel object like indicator, or if you need it just for one loop cycle, use shift register. If you need to store more values, use just array and so on.

 

As I'm not clear whit what you need, I can't answer your question. But in general, you can use local variable to store data safely, as long as you don't overwite them from other places (if you don't create race condition).

 

If you are new with LabVIEW, you can start with  onlineTutorials "Getting Started with NI LabVIEW Student Training". Chapter 6 discusses Variables.

 

 

Regards,

Stefo

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 2 of 4
(2,753 Views)

Thank you stefo that helped me a lot:). i used shift resistors as well.

Do u have any idea how to trigger an event when a boolean indicator changes states? this boolean indicator reads data from USB.

 

i already know that event are triggered by user inputs but how can we trigger them programaticaly?

Thank you

0 Kudos
Message 3 of 4
(2,642 Views)

Hi Mandya,

 

You can generate events directly just for controls, not for indicators. In fact it is possible to do it even for indicator via property node -> Value (sgnl), but it is not the best way. Instead, you could generate User Event program programatically.

 

There are couple of examples ready in example finder.

 

Stefo

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 4 of 4
(2,627 Views)