05-23-2015 02:50 PM
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
05-23-2015 03:04 PM
05-24-2015 07:21 PM
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.
05-26-2015 09:23 AM
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.
05-26-2015 09:24 AM
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.
05-26-2015 09:34 AM
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
05-26-2015 09:39 AM
In your VI, try doing two reads in a row. I'm thinking the simulator is just sending two lines to the querry.
05-26-2015 09:41 AM
I will try that, thank you.
05-26-2015 12:32 PM
05-26-2015 01:44 PM
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.