LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS-232 communication using modulus 256

I am setting up communication from my LabView development system to a embedded CPU module (Unit Under Test, or UUT).  This is using RS-232 communication.  Commnads are sent with a one byte ascii character command and a second modulus 256 checksum byte.  Two byte command strings are sent.  Response is one byte ascii response, with up to several bytes of return data based on the command selected.
 
I am using the Instrument Assistant to send these two bytes and parse the data for the return response.
 
I manually calculate out the modulus 256 byte.  This byte is typically in the extended ascii character set.  I cannot enter these commands in the IA without a cut and paste operation for the extended character.
 
The UUT returns a NAK indicating a Not Acknowledged command.
 
I would like to know if using the IA is possible and what details I am missing.
 
The hardware has been checked using the DOS program, therefore the RS-232 pinout and UUT are functional.  A NAK is received, which is also appropriate.
 
The goal is to send commands to the UUT and measure the results.  This would be used in manufacturing on a Windows XP test computer for manufacture of these CPU modules.
 
Any details would be appreciated.
 
Dan Formica
Manufacturing Test Engineer
Sensors, Inc.
0 Kudos
Message 1 of 4
(3,107 Views)
Why not simply use the VISA drivers to talk to the RS232 interface? Then you can assemble your outgoing messages as desired, and parsing serial results is usually not too difficult. The thing to do, as a first step, is write a subVI that simply transmits a command to the UUT and returns the response. This is your basic IO routine and you'll use it to build the next layer of subVIs for sending specific commands and parsing the results. Without knowing more about the UUT it's hard to give specifics, but remember that your goal is to reusable pieces that are built on a common IO layer.

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 4
(3,094 Views)
Mike,
 
I was thinking of that, but was looking for the "automation" of the IA.  I have several projects comming up, with our products that use a RS-232 interface, and was checking out the IA to start. 
 
I have reviewed and ran a program example  "basic serial port read and write" that can be manipulated to send the commands.  So this could be used as a reference for that base VI.
 
I have taken the Basics I + II training, and have been working on this being a modular program.  Obviously, there is quite a bit of test code that needs to use this RS-232 communication VI as a base.
 
Thanks for the input, I just need to get in the right direction.
 
Regards,
Dan.
 
0 Kudos
Message 3 of 4
(3,080 Views)

I second Mike Porters advice.  I'm getting started with an RS232 based acquisition program and the example you used is a great starting point.  It's what I used and it works very reliably.  I have found I can have multiple scans running at different rates on the same RS232 port and the VISA controls handle that great without having to disable one scan while the other runs.

Mike

0 Kudos
Message 4 of 4
(3,071 Views)