11-06-2009 03:35 AM
Hi,
We are in the process of proposing a batch mixing/formulation process. The weighing scales required for this is already in our possession. These scales communicate via RS232 as follows
2400, 4800, 9600 or 19200 baud
8 bits
Odd parity
1 stop bit
As we are attempting to minimise the project cost, we are thinking of using a single DIO card with ~16 IOs, which should be enough to control all of the hardware.
Is it possible to read serial data using a single IO input in LabVIEW (we have v8.2)? The RS232 output from the scale is continous (no handshaking), so I envisage simply connecting the GND pin and the RX pin to one of the inputs.
As I am inexperienced in LabVIEW, I am not sure how to interpret the constant stream of logic values (and check parity etc). Is this possible? Any thoughts or comments?
Best regards,
Simon Thomas
11-06-2009 03:47 AM
Simon Thomas wrote:simply connecting the GND pin and the RX pin to one of the inputs.
I think that will be ok. But why not connecting the TX pin also ? You may need it in the future.
Use the VISA functions in LabVIEW to communicate.
There are examples installed with LabVIEW.
Also search for "VISA" in this forum.
Ask if you need further help
11-06-2009
04:47 AM
- last edited on
04-05-2024
02:02 PM
by
Content Cleaner
You'd be better off getting an RS-232 interface, then you can use standard serial port software, rather than writing your own. USB/RS232 ports are available cheaply now, and some PCs still have serial ports.
As an example of USB/serial converters, see https://www.ni.com/en-us/shop/model/usb-232.html
In the UK it sells at under 100 pounds. I'm sure that this is less than the cost of writing your own driver.
Rod,
11-06-2009
03:08 PM
- last edited on
04-05-2024
02:02 PM
by
Content Cleaner
Rod wrote:
You'd be better off getting an RS-232 interface, then you can use standard serial port software, rather than writing your own. USB/RS232 ports are available cheaply now, and some PCs still have serial ports.
As an example of USB/serial converters, see https://www.ni.com/en-us/shop/model/usb-232.html
In the UK it sells at under 100 pounds. I'm sure that this is less than the cost of writing your own driver.
Rod,
I would have to agree with Rod here. USB to Serial converters are available for as little as $10 each online.
I have used them in several Labview programs recently.
One of my Labview program has eight of these connected to one computer and it operates flawlessly.
The drivers make then look like a standard serial port to Labview, Max, and VISA so they are simple to use.
The hardest part is keeping them all straight as to what adaptor is what comm port.
11-08-2009 10:05 AM
You can't connect RS-232 lines from your scales to DIO lines of any IO card since they work at different voltage levels!!!!!!
You need at least a MAX 232 converter IC in between!
But like previous posters said: RS232 to USB is the best way to go.
Just in case you're from Europe: buy here
11-08-2009 11:13 AM
I did not realized what Simon wrote.
Of course Alain is right.