LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Logging: Where do I start?

I finally figured it out!
 
I went back and checked the cable.  Apparently, someone pulled on it and one of the connections on the hub was broken.  No wonder why nothing worked.  Strangely enough, I could view the tags in RSLinx but not in LV.  Hmm...
 
So I repaired the hub and finally figured out how to import the variable.
 
To test everything, I set up a simple VI with a gauge and a numeric indicator.  The gauge monitors test pressure and the numeric indicator shows the test ratio (which is what the PLC sorts the parts by).
 
Unfortunately, it only takes one reading and doesn't refresh when I run it.  I clicked "Run Continuously" and it went fine.
 
Now, my only question is this:  How can I log these four variables:
TEST_RESULT_A
TEST_RESULT_B
TEST_RESULT_C
TEST_RESULT_D
to Excel?
 
Here's the dilemma:  The cycle times change depending on the product we're making.  So, I'd like to log every time a certain variable switches to value "1."  It's a square wave when viewed on a graph.  There's a robot on the machine that grabs parts and places them in a flow test unit, waits for the test to complete, and sorts them based on conformity.  When the robot arm lifts the parts out of the test unit, a certain varible switches from 0 to 1.  I want to log at that precise moment. 
 
Any help on this would be appreciated.

Message Edited by Squirrell on 09-04-2007 08:39 AM

0 Kudos
Message 11 of 12
(2,342 Views)
Hi Squirrell,
When you talked about "precise moment", are we talking about hardware timed or software timed?
If it's hardware timed, unless your hardware logs the time stamp signiture of a certain data point, it's not going to happen in LabVIEW.
If we are talking about LabVIEW here, we can consider keep pooling the data in a seperate while loop until you detect a value change, and record that timing using the timing VIs provided in LabVIEW.  After that, record your result using Write to Spreadsheet.vi or something similiar.
Now, do you have LabVIEW DSC? If you do, you can also put a dead band on the value you are reading and have the alarms being logged into the database automatically.  If your OPC server provides a time stamp of the data acquired, that data can also be logged, and you can then convert the data into spreadsheet.
Hope this information helps!

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 12 of 12
(2,032 Views)