04-04-2007 06:51 PM
Hi,
I’m trying to write a data acquisition program for our rolling mill. I’m new to labview and some of it’s methods are still causing me a bit of grief. I have a series of sensor producing 4-20 milliamp current loops. I get the raw data working fine. I’m using some of that data to drive a basic state machine which I want to use to control the data acquisition, reduction and then write the data to a oracle database. This program will run continuously so I need to only collect data when a bar is present and on a pass by pass basis. The attached vi uses two inputs to generate states 0 = idle, 1= new entry, 2 bar in mill, 3 bar finished write data, and then back to idle and so on. My question is how do I put the data into a array so that I can do some reductions like max speed and mid pass load peak. Whatever I’ve tried won’t work concurrently with the main while loop. Any help would be greatly appreciated.04-05-2007 04:19 AM
04-05-2007
12:18 PM
- last edited on
03-19-2024
09:39 AM
by
Content Cleaner
Hello,
I think Jorge makes some great suggestions. I, myself, am still a little unclear on the functionality you are seeking but if you simply mean to build an array of your data, I think Jorge steers you down the right path.
In addition, you might also consider taking a look at the following DevZone article. It describes programming techniques in LabVIEW for state machine design. Moreover, there's a State Machine Toolkit that will automatically generate LabVIEW code for any given state machine logic.
Good luck with your application.
Emilie Kopp | Applications Engineer | National Instruments
04-09-2007 11:48 PM
Hi
Thanks for the replies. Sorry I've not made myself clear. I'm running version 8.2 What I want to do is this the various analogue input will be coming in continuously. That bit is working fine. In a steel mill a piece of steel is passed back and forth through a mill to change it’s shape to whatever is required. I want to record data (max , average and whatnot) for each pass. I want to know how to make a while loop that will collect data for each pass. The vi I attached does the collection fine it also uses the input to work out when a pass starts and when it stop. I can’t work out how to add a data reduction function that will work simultaneously with the pass detection function. I can trigger the start but then it just loops and doesn’t stop. I can guess it’s something simply I missing here, but I’m missing it none the less.
PS I also need to be able to count the pluses coming from the latch vi to count the pass’s.