LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Integrate Serial with DAQ onto same storage file

Hello all,

 

   I have a Vi that is acquiring two serial variables (capacitance and resistance) via VISA, and I have another two variables (displacement and voltage) from an NI DAQ device (USB-6002). Everything is working well however, I am trying to get them both to write to the same file. The DAQ device is working great, writing to TDMS file, then to .csv. It is writing them to columns 1 and 2 on the spreadsheet. The serial data however, I am unable to get it to write to any file. I try saving as a .csv, no luck. Tried TDMS file and also, no luck. I have had LV core 1 and core 2 training but not the experience yet. I would like to get my serial data to at least save to a file and then, eventually, I would like it to save it to the same file as data acquired by DAQ device, using columns 3 and 4. Any and all help would be greatly appreciated.

Thank you,

 

Brent

0 Kudos
Message 1 of 11
(3,383 Views)
What is different between the daq file saving function and there serial one? What happen when you try? Wrong data? No data? Errors?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 11
(3,370 Views)

If you run just the serial portion, do you get an output?  It sounds like you're trying to write to the same file from two points and wanting it to fill up different columns from each point. 

0 Kudos
Message 3 of 11
(3,308 Views)

I am unable to use DAQ assistant with the serial, I must use VISA. The device is supposed to use GPIB however, I have a Prologix serial to USB device and the only way I am able to get it to work is simply using serial.

0 Kudos
Message 4 of 11
(3,258 Views)

No Sir, when I run the serial and try to save it to file, I am getting nothing. I think I may now know why it isn't working, but I am still testing.

0 Kudos
Message 5 of 11
(3,256 Views)

I don't know if this should be added here or not. One of my serial devices is an old old old NI Instrument Simulator. When I use MAX I am able to query and it gives me something rather odd. When I query using the command *IDN?\n, it displays "1: Write Operation (*IDN?\n)  Return Count: 6 bytes 2: Read Operation Return Count: 7 bytes 00062\r\n". Then when I press query again it says "3: Write Operation (*IDN?\n) Return count: 6 bytes  4: Read operation Return 62 bytes  National\sInstruments\sGPIB\sand\sSerial\sDevice\sSimulator\sRev\sB.1\n. It flip-flops each time I query with this command, between the two results mentioned previously. It isn't a problem on the VISA Test Panel however, it does that same thing in the Vi. Would you happen to know why it changes from one to the other like this? Thank you

0 Kudos
Message 6 of 11
(3,250 Views)

In your VI, try doing two reads in a row.  I'm thinking the simulator is just sending two lines to the querry.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 11
(3,245 Views)

I will try that, thank you.

0 Kudos
Message 8 of 11
(3,242 Views)
What you do or don't get from the IDN query shouldn't be relevant to your original question. You would do this query only one time and before you start your acquisition.

You have not posted any code or a snippet of the block diagram so how can anyone say what is wrong with your file writes?
0 Kudos
Message 9 of 11
(3,224 Views)

What you do or don't get from the IDN query shouldn't be relevant to your original question I get that. That's why I stated I wasn't sure if this was the right place to ask this. Judging by the response of the other reply, I think he got that as well.

 


You have not posted any code or a snippet of the block diagram so how can anyone say what is wrong with your file writes? It isn't really a Vi or anything, it is more a question of simply writing to a spreadsheet. I mentioned above that I think I have resolved that and it has been resolved. I found some very nice Youtube videos that showed me what I was doing wrong. So, the only thing that remains is the fact that, when I query my NI Simulator, it must be queried twice, to get the ID info. Every time I query it, it must be done twice, to get the NI info that is supposed to be read from the simulator. Using the Serial Vi in LV help>examples, when I query it, all I get is the numeric, "62", for example. It doesn't display all the other NI info for that device.

0 Kudos
Message 10 of 11
(3,217 Views)