LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to acess data from data stream

Hello,
 
My research group recently purchased the MiniAmp MSA-6 and MC6-6-2000 transducer from AMTI. I am currently using NI Labview 8.2.1 to control the signal conditioner through the provided ASCII commands. Once the start command is given data will be continuous until the stop command is received. Would the Write to Text file.vi be the best way to record this information?
 
If so how would I be able to use this information in a feedback loop to control an actuator? For example, I will start the signal conditioner and start the actuator, once the signal conditioner reads a specific load, I want to send the stop command to the actuator.
 
Thank you in advance,
Jena
0 Kudos
Message 1 of 6
(3,618 Views)
Hi Jenna,

The Write to Text file would certainly work to record ASCII data to a file.

As far as stopping when a specific load is reached, you could simply use a comparison function along with a case structure, where if the load equals your specific load, the comparison would send a "true" into the case structure which would have the code to stop the actuator.
Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
0 Kudos
Message 2 of 6
(3,592 Views)

Thanks Eric,

If I am writing my ASCII data to a text file, how would I use/access the values from that ASCII file to use in the comparison and case structure function. Is there a way to specify the exact column to read in the text file? Can this be continuously read until the specified load is reached?

Thanks

Jena

 

0 Kudos
Message 3 of 6
(3,580 Views)
Don't understnd what you want to do. You are reading this data from something and then you want to write it to a file, read it back and then use that data for soemthing else? Why not just do the comparisons you need when the data is read. You can save the data to file if you want but it doesn't make any sense to write something just to read it immediately back.
0 Kudos
Message 4 of 6
(3,578 Views)

I am controlling an actuator through serial communication and controlling a signal conditioner through another serial communication. The signal conditioner can be controlled with ASCII commands to start and stop the reading of data. At the start of a test, I will start the signal conditioner and then start the actuator. The signal conditioner will read the continuous data and load being placed onto a 6 DOF load cell. In the signal conditioner manual it says that once the Start command is received, data will be continuous until the Stop command is received. From my little knowledge of serial communication, I think that this data will be sent continuously through the String Read indicator. I would like to use this data to control when the actuator stops but am unsure of how to access it. Is there a way to access this data? Or do I need to access this data through a text file?

 

Thanks

Jena

0 Kudos
Message 5 of 6
(3,574 Views)
Hi Jena,

with this "string received" you can do whatever you like:
- write to a text file
- convert to a number (you should know the format of the string from the manual) to do comparison to limits or some plotting
- you may even compare this string with a given one to check for certain values

To convert strings to number you will find several functions in the string palette. Pick the appropriate one...
To do comparisons you have a full palette of functions...

Why are you "unsure of how to access it"? You already have the string in an indicator Smiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(3,568 Views)