‎01-28-2011 01:43 AM
Hi all,
I am trying to record data from serial server(which has 16 ports) through com ports ( i am using total 7 ports).
Here I would like to understand VISA function clearly.
Question 1
If I just want to record data ( from server ), do i still need VISA write function to read from COM1?
Or
Can i just use VISA read function only and read the string data from com port?
Question 2
After I record string data, I will save into a text file.
But what i see inside the save file is just a raw string data ( which i cant really read ).
How can i split those string data into different reading ( different record such as voltage reading, ammeter reading and switch on/off)?
Please advise..
Solved! Go to Solution.
‎01-28-2011 04:37 AM
Question 1 - it depends on what's the other end of the serial port. If it is broadcasting data all the time, then a read is all you need. If it needs a command to send you information, then you'll need both. Look at the communication protocol/definition for what you're trying to read back.
Question 2 - you'll need to format it. There are a lot of string manipulation VIs on the string pallette, not knowing how the string is formatted at all to begin with I can't give you more advice than that. An example of how you're writing to file, and what you're doing with the received data might be useful... If the data is coming in in one long string, hopefully there are delimiters, and a scan from string will help you highlight them if you need to. If you're reading each port in turn and just concatanting a string, put a tab constant between them (available on the Strings pallette), or any other delimeter you care to use for that matter. Otherwise, if they're all fixed length field the string subset vi could be a way to go.
‎01-30-2011 07:33 PM
Hi KathrynB,
Thanks for reply.
I will try to look more into it.
One more question here,
I got VISA read error (VISA (Hex 0x3FFF006B) A framing error occurred during transfer.
Why i get this error when i run vi?
Thanks in advance.
‎01-31-2011 04:35 AM
This error is a user defined one by the looks of things (unless you've copied the error code in incorrectly by accident), so I'm not sure any of us can help with that. Again, it may be worth looking at the manuals for whatever item it is that you're talking to and seeing if that has an explanation for this error.
‎01-31-2011 09:34 AM
This is a standard VISA error. You might want to check this thread for some insigth to your problem.
‎01-31-2011 06:58 PM
Hi Mark,
Thanks for the reply and thread help me to get better understanding.
Thanks,
‎05-01-2011 09:33 AM
HEllo there ...
I am using labview and i want to interface it with a pic microcontroller.
My task is to send data serially via labview to the pic .
the main task is to send 3 bytes (8 bits each) from labview to be received from the pic.
I read the VISA WRITE configuration but i just want to know how to configure those 3 bytes in order to send them serially and to be received by the pic.
The bytes are ready to be send but i just want to know how to configure the visa write task in order to send them serially to pic.
It will be better if you can provide me with an example that clarify the task.
Thank You.
Best regards,
‎05-01-2011 09:30 PM
You convert the 3 bytes to a string (you don't say what format they are in now; array, a string, 3 individual wires.) and feed that string to the VISA write.
Look in the example finder for examples on the the serial port.
‎07-12-2011 11:13 PM
Hello anybody help me how to use the VISA Read and VISA write commands for controlling the syringe pump NE-1000