Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial commands with vision builder 3.5

I need some help setting up a device to control via serial port with Vision Builder 3.5.  I'm very familiar with VB, but new to serial commands.
 
I simply need to turn a relay on for 200 ms and off again each time an inspections fails.  I'm attempting to use a National Control Devices R210 Dual Relay Controller via serial port COM 1.
 
I've read all the available help at the NI site and literature at the device manufacturer site, but to no avail.  Successfullly run the Hyperterminal Loopback test as described.  Checked the COM port availability with MAX. But when adding serial port send commands in the Serial I/O feature, with the show terminal window open, cannot get any activity using the Test command. I must be missing something very basic...
 
Any Help?
 
Thanks
 
Greg
0 Kudos
Message 1 of 4
(3,934 Views)
Do your serial ports appear in Vision Builder (VBAI)? You mention that you checked the COM port availability with MAX but are you able to communicate with the device using the VISA test panel in MAX? Are you able to send commands and accomplish what you would like in MAX but not in VBAI? Are you able to turn on and off the relay in MAX? If not are you able to do it in the Hyperterminal?

I'm sure you looked at this document Knowledge Base
2TEAGDXL: Serial Ports Do Not Appear In IMAQ Vision Builder For Automated Inspection (VBAI) are there any steps that applied to you. Are you getting any errors?

I guess I just need to know more details behind the troubleshooting that you have already done. What problems have you ruled out and why? Where have you narrowed the problem down to?
Vince M
Applications Engineer
0 Kudos
Message 2 of 4
(3,913 Views)

I am able to see my COM 1 port in Vision Builder and MAX. Max says they are functioning correctly. I believe it is configured correctly for the device. And the loopback test tells me it is communicating successfully.

I do not know how to communicate to the device using the VISA test panel.  I have opened it, but don't know to use it to send the commands my device needs to respond.

I can only send raw byte data to this controller, not strings. Or it will accept hex commands.

 

The only commands I need to use are:  254    2    (or FE 02 hex)  to turn on a relay, and   254    0  (or FE 00 hex) to turn it off again. I don't know how to use the VISA test panel to send these commands.

 

Thanks

 

Greg

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

This is actually a bug in VBAI 3.5, which will be fixed in the upcoming release. Even though the test button doesn't work, you should be able to run your inspection and the step will work correctly, the Test button just doesn't work when editing the step.

Hope this helps,

Brad

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