07-19-2013 08:10 AM
Hallo,
I'm struggling with retrieving the value of a vi OUT Parameter of type ASCII string from the basic_serial_write_and_read.vi (http://zone.ni.com/devzone/cda/epd/p/id/2669)
I've assigned a Local Variable type string and assigned this expression to the vi OUT parameter "read string".
When running the sequence however, the Local Variable value is not updated! (?)
I can see the ASCII string being returned from the UUT on the NI I/O Trace tool.
The basic_serial_write_and_read.vi works OK in LabVIEW.
I'm just getting started but can't figure this out. I'd be appreciative of any hints.
Cheers
Kech
Solved! Go to Solution.
07-19-2013 08:14 AM
Step into your VI from TestStand and make sure it is running correctly. Can you attach some code?
07-22-2013 02:18 AM
Attached are the basci_erial_write _and_read.vi and my play.seq TestStand sequence.
When using the ASCII char "@" as string to write value - i get no reply value to the Locals.Local_read Variable, although i see that the UUT replies with a 22 byte long message on the NI I7O Trace tool.
How do i convert the vi - so that the string to write and read string parameter type can be used with hex data i.e. 0x40?
07-23-2013 04:43 AM
Hi,
I've made some progress - with a RS232 loop back test - established that the ASCII string write is being received and passed to the Local Variable Local_read.
When connecting my UUT - i've realised that the write Parameter type/ASCII string needs to be send with the following format so that the UUT accepts it as byte hex code. --> "\x01\x04\x30\xCA"
The hex byte string i expect from the UUT as protocol responce is (Hex dislay in vi = 010D 3050 FFFF FFFF 0300 1500 59).
How do i convert the received ASCII string which i am receiving to a hex-byte code representation i.e. "\x01\x0D\x30\x50\xFF\xFF\xFF\xFF\x03\x00\x15\x00\x59" ?
thanks in advance
Kech