LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read data and compare with test files!!!

Hi!
I have attached file here with which reads data and save in file in binary format.
My question is I want to compare those datas with test files which also attached here with. If datas are same then test is pass. if not than fails.
Test file is the first file which I read at the first time and save all datas so datas in this file is fixed.
From next run i will have to read data and compare with test file if it's same then pass.
 
thanks
 
Download All
0 Kudos
Message 1 of 6
(3,762 Views)
You can compare files using the operating system (type "HELP COMP" in a DOS window to see how to use the file compare function).

You can also open the two files and perform a segment by segment compare.

I've attached a VI that I use to compare data that I transfer via TCP between computers. (LV 8.0)
0 Kudos
Message 2 of 6
(3,739 Views)
Hi!
thanks for ur reply.
What actually i want to do, I have a test file. I am generating data through DIO.I want to compare those datas with test files data. If channels datas are same then test would be pass or not than fails.
 
 
0 Kudos
Message 3 of 6
(3,727 Views)

The segment of code you posted uses a single analog channel and your test file implies 20 channels of DIO. Are you actually using analog in and if so, how would that correspond to the 20 different digital channels in your text file?

If you are really using DIO, then read the text file, convert the column with the 1/0 to a Boolean array or digital word and compare that directly to what you read with a digital read in DAQmx.

0 Kudos
Message 4 of 6
(3,710 Views)
Hi?
Actually, I am using mux which gives analog output. DIO channel uses as an input, which selects particular channel of Mux. And that particular channel gives analog output. so if voltage is more than 4 volt than it is "1". others "0". so i have that test file. so i want to compare all datas from analog input with test file. if all channels datas are same with analog in, test is pass.
 
thanks
 
0 Kudos
Message 5 of 6
(3,705 Views)
The attached will do that. All it does is read the file as I said and compare that to what is actually acquired.
0 Kudos
Message 6 of 6
(3,698 Views)