12-28-2011 02:51 AM
Hi Every1,
New in labview programming. Need some help on my project.
Currently I have a txt file which contain something like this:
1 0 1 0
0 1 0 1
1 1 0 0
0 0 1 1
How do i read the text file and output to the USB- 6501 through 1 line digital output with a time interval of 1s.
The digital output from the line I shd get 1 0 1 0 0 1 0 1 1 1 0 0 0 0 1 1.
Any help is appreciated. Thanks.
Solved! Go to Solution.
12-28-2011 03:02 AM
Hi,
Use palettes in file I/O to read the text file. See the vi attached. Hope this is what u r looking for...
12-28-2011 03:35 AM
Hi Subbzz,
Thanks. I will go and take a look. what version is the vi? I am using version8.5.
12-28-2011 05:45 AM
Sorry, it was in 11.Check this its in 8 now..
12-28-2011 08:06 PM
Hi Subbzz,
This VI is able to convert the data to a string. Thanks.
How can i output this string 1 bit by 1 bit with interval of maybe 1s to one of the output digital line in USB6501 through DAQ assistant?
12-28-2011 11:38 PM
Hi andy,
check the below vi.... in this the data in the string is converted into an array. You can use this array and index the element accordingly for your requirement...
let me know it worked or not!!
12-30-2011 01:35 AM
Hi Subbzz,
Follow your advice and use the indexing and it work out fine. Thanks for your help. 🙂
12-30-2011 02:17 AM - edited 12-30-2011 02:18 AM
I don't understand why it has to be so complicated. Try this as a start (VI is LabVIEW 8.0):
12-30-2011 02:43 AM
Hi altenbach,
Thanks for your much simplified version. It works exactly the same as my previous version.
Still quite new in labview, not very sure of the function of some block. Thats y lead to such complicated version. 🙂