Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2008, 10:11:51 AM
Home Help Search Calendar Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Robot Help and Discussion Center
| |-+  ABB Robots (Moderators: Werner Hampel, Sven Weyer, Jim Tyrer)
| | |-+  Interfacing with serial port on IRB6600
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Interfacing with serial port on IRB6600  (Read 354 times)
richardmcc2
Newbie
*
Offline Offline

Posts: 1


« on: June 24, 2008, 08:49:47 PM »

I've been having trouble interfacing with the serial port on my IRB6600 robot.  I have an ADC (http://www.omega.com/pptst/D1000.html) with serial output that is hooked up to COM1.  The ADC requires a $1RD command to request data from it, so I'm trying to send that string to the serial port, and then read the data value that comes back.   When I try and run this program, it hangs on the line that tries to read the serial port.  Can anyone tell me what's wrong?

Code:
MODULE Controller
VAR iodev com_port1;
VAR string signal;
PROC GetSignal()
OPEN "COM1", com_port1\BIN;
While True Do
WriteStrBin com_port1, "$1RD";
ReadStrBin com_port1, signal;
TPWrite signal;
EndWhile
CLOSE com_port1;
ENDPROC
ENDMODULE
Logged
hzhuang
Newbie
*
Offline Offline

Posts: 2


« Reply #1 on: November 03, 2008, 03:16:00 PM »

First,you should clear the serial buff,uses the ClearBuff function(if I don't remember wrong),

then do not need while true,

after you send "1$RD", waitTime(0.2S)

you shoud use readstrbin to read what reback to you!

GoodLuck
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!