Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting rs232 hardware to NI smartcamera 1742

I use a NI SmartCamera 1742 for inspection and I need it communicate with a conveyor via rs232. Is this even possible to make a direct connection between the camera and conveyor or do I have to put a computer between to which I connect the conveyor? I can see in the manual that there are two lines in the cable from the smartcamera called RS_232TXD and RS_232RXD, can these be used for the direct communication between the camera and conveyor and how?
 
Best regards
Simon
LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 1 of 12
(5,500 Views)

Hi,

Yes, you can use the RS 232 line to communicate directly with your device. To be able to use the built-in serial port of the camera, make sure the CONSOLE switch is turned off. If not, switch it off, and reboot the camera. When it's on, the serial port outputs device information, such as the IP address and firmware version during start up and is not available for applications. The NI 17xx reads this switch only when powering up or restarting and will only display device information during start up.

When the CONSOLE switch is in the OFF position, you can use the 17xx serial port and NI-Serial driver software to send and receive serial data. The NI-Serial software is installed when you install NI-IMAQ. When using the NI-Serial driver, keep the CONSOLE switch in the OFF position during normal operation.
Refer to the Connecting to Serial Devices section of Chapter 2, Power and I/O, for more information about using serial communication with the NI 17xx.

If the CONSOLE switch is OFF and you're using Vision Builder AI, you can use the standard Serial step to send and receive commands with the camera serial port.

-Christophe

0 Kudos
Message 2 of 12
(5,490 Views)
When I keep CONSOLE switch turned ON I can see the boot information but when I keep CONSOLE switch turned OFF I can't see standard serial step output , what's the reason?
0 Kudos
Message 3 of 12
(5,468 Views)

Make sure the serial settings of the smart camera match the ones of your hyper terminal application.

If you're programming the smart camera in LabVIEW, use the VI named "VISA Configure Serial Port" to specify the baud rate and other parameters of the serial port of the smart camera.

If you're using VBAI, target the smart camera, then select the menu Target>>Target Options and go to the Serial Port  tab to set these options.

Make sure they match the serial options of the software you're using to read the serial data on the other side.

Also, make sure you have the right cable (but if it works with the console switch turned on you probably do). Some software require a straight cable (transmit connected to transmit, received connected to received), while some other require a null modem cable (transmit connected to receive).

Hope that helps,

-Christophe

0 Kudos
Message 4 of 12
(5,456 Views)

Thanks your quick response.

I did check all what you mentioned, I also make sure I've installed NI-Serial RT on 1742.

But still no output :(,

Any other reason ?

0 Kudos
Message 5 of 12
(5,442 Views)
I've upgrage image as below mentioned:
 
 
this upgrade has solved a issue relate to serial I/O step.
 
Is it possible that my problem is another NI bug?
 
Thanks
John
0 Kudos
Message 6 of 12
(5,432 Views)
I am waiting here.:)
 
Hope your answer.
0 Kudos
Message 7 of 12
(5,384 Views)
Hello John,
The update that you installed did indeed have a fix for the NI-Serial driver. I think what you are seeing is actually a different manifestation of the same bug. Though the original issue typically happened when an Acquisition step was running, the underlying cause was a bug in the serial driver.
 
If you run into anymore problems please let us know and we will take a look at it.
 
Regards,
 
Jack J.
Vision Product Support Engineer
National Instruments
0 Kudos
Message 8 of 12
(5,368 Views)
Hi Jack,
 
In my inspetion I use serial I/O step to output my OCR result and it can't work.
 
For easy testing I only put a serial I/O step into a test inspection and send out constant AscII code, When I run this test inspection it still can't output anything from serial port.
 
So mybe you can make a inspection that can output something from serial port and mail to me then I can test it on my 1742 camera.
 
Anyhow I want to solve this problem as so as possible because it has past several days since it occured.
 
Thanks
John
0 Kudos
Message 9 of 12
(5,359 Views)
Hello John,
 
Here is a very simple Inspection that tests the serial port. In this inspection we will repeatedly transmit "Frame Index = xxx" where xxx is the frame index of the frame currently captured.
I tested this with hyperterminal with the following settings:
Bits per sec: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow Control: None
 
These are the same settings I selected in the smart camera as well (Target>>Target Options>>Serial Port)
 
When I ran the inspection, I could see the data in hyperterminal. On thing to be sure about is that you run the inspection (Run Inspection in Loop button) and not just the state (Run State in Loop button).
 
Please let me know what you see.
 
Regards,
 
Jack J.
Vision Product Support Engineer
National Instruments
 
0 Kudos
Message 10 of 12
(5,311 Views)