07-25-2017 06:59 AM - edited 07-25-2017 07:01 AM
Hello,
I have an analogue output NI-9264 module and I'm trying to manipulate DAQ voltage ranges using the "Read Delimited Spreadsheet" VI.
The data from the file path is being saved into Excel as a CSV (Comma delimited file).
The data that is being passed from CSV is:
Min Voltage,Max Voltage
10,3
5,1
3,2
2,3
1,3
In order to get rid of the heading I have set the input of "start of read offset" to the value '13'.
However when running the VI 0's appear on the top row, which is an undesired result.
How do you remove the first row from the indicator?
Many Thanks
Solved! Go to Solution.
07-25-2017 07:29 AM - edited 07-25-2017 07:44 AM
First you don't change the range, you change the output values (range would define the output range of your device -10V to 10V or 0V to 5V or ...) don't know if your device supports that feature.. signal generators sometimes do 😉
How about read all the file and cut out the first row using the delete from array vi?
next: you didn't used the array output , you passed the fist row data ([0,0] array here) to the DAQ write
(try highligth execution and /or probes to see what is happening)
So use the 2D array output of the read file vi, delete the first row and wire it into the loop (that I would change to a FOR loop) and use autoindexing ..
Maybe your last DAQ write should be a [0,0] ... (just in case 😉 )
07-26-2017 02:42 AM
Hi Henrik,
Feelin' dank.
I really appreciate your advice with that.
I've attached the new VI with Henrik's advice using array w/subset deleted.
So am I correct in thinking that the new VI I've posted will change the output voltages? The first column would be the min and second column max and then it would wait 5ms before changing to the next row. I haven't received my DAQ hardware yet so I can't check it on the scope. I just want to make sure my design has the right philosophy .
Many Thanks
07-26-2017 04:41 AM
Sorry, I can't have a look since I'm stuck with LV2012 on my System...
07-26-2017 05:02 AM - edited 07-26-2017 05:03 AM
Sorry Henrik,
I should have illustrated my block diagram in the screenshot.
The question I was referring to is the one at the top whereby delete from array is being connected directly to DAQmx Write.
I also want to create an index array to manipulate different pins during simulation. DAQmx Create Virtual Channel doesn't seem to like this at the moment.
Many Thanks
07-26-2017 07:50 AM
No, that wont work as expected (as far as I assume)
It's obvious that you need to learn more about the basics of LabVIEW.
How often the loop runs is not defined by the user, it's defined by the number of data doubles in your file.
Thats why I suggest the for loop with autoindexing.
You can still put a (emergency) stop button into your for loop. (rigth click on the border of the loop and choose Conditional Terminal)
Make a copy of vi, remove the DAQ vis and use a indicator as your voltage out. (or a chart )
Now you can test your vi without any extra harbware.
If you hit the lightbulb button, the execution slows down and you can follow the dataflow.