09-25-2012 02:22 AM
Hi guys,
Im doing a project collecting temperature data through RS232 using serial port. The data is fetch from the port in hex form and will be converted into readable decimal form and also shown in a graph. now the hardware is taken away from me for other purposes and i need to test my VI using my own data.
What should i do to the current VI file?
09-25-2012 06:58 AM
I would use the Diagram Disable Structure to disable the serial port code and put in code (in the new Enabled State of the structure) to simulate the device.
09-25-2012 09:45 AM
If you have a second serial port, you could also do a loopback and create a VI to write/read from the VI you need to test. The advantage being you would not need to edit the VI you are testing.
09-27-2012 01:56 AM
Since the serial port actually feed in the data in hex form , where or how do i create a file consist of my own hex data?should i write the data into a notepad file and read from visa or create command into the current vi?
Any way, you guys did a great help to me.
09-27-2012 04:18 PM
10-02-2012 03:56 AM - edited 10-02-2012 03:58 AM
if i type the the hex data into the text file and read from the labview, what is the hex format i should use? "0xFF 0x EE" or "0xFFEE" or "FF" "EE"
Do i need to do anything to make it readable?
Some example i found on the web shows "error in" and "error out" in the front panel.why it needs to be there?
Im still new to this program and i really hope some kind souls will help me out.
Thanks in advance.
10-04-2012 11:03 AM
Guys please help me.Without this i cant proceed to the next step.
10-04-2012 11:22 AM - edited 10-04-2012 11:23 AM
Give this a try. I recommend typing the hex characters in your file (ex: "FFEEAABBCCDD0123456789"). This little guy will then convert that text into a binary string to be sent to your instrument.
NOTE: The input string is set to Normal display while the output string is set the Hex display.