Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

NI VBAI TCP Communication With Staubli CS8 Controller

I have a Staubli CS8 controller running the VAL3 programming language. Their documentation is light but I managed to brute force the solution to controlling DIO (Digital Input/Output) commands. I am having trouble brute forcing the SIO (Serial Input/Output) commands. The Staubli appears to only be capable of being the TCP/IP communication Master. I have my laptop's IP address configured in the Staubli controller with the ethernet socket name of "test". With the NI VBAI TCP/IP communication manager set up as slave and the TCP server enabled, the Staubli controller claims it is actively communicating with the NI VBAI socket server, and status is OK. In the VAL3 programming language I believe I have correctly linked the sioLink(siotest,io:test) between the variable name and the actual hardware device port. I try to send serial text strings from the CS8 to the VBAI. But I cannot figure out where to observe the serial communication traffic in VBAI. I have it set up right now to run infinitely and check the TCP port for serial input, but don't see any results. Anyone integrate these two systems yet? I have been using both for quite some time so I'll catch on fast if someone can run me through some quick steps if they have done this before with NI and Staubli. Thanks.
0 Kudos
Message 1 of 30
(10,397 Views)
Dear sprayer,

Have you seen the TCP communication terminal in VBAI? It's available from the tools menu, and is designed to help you debug the TCP communications in your inspection.

Is this tool what you meant when you said you had it check the TCP port for serial input, or are you doing it in the inspection?

I haven't used the Staubli CS8, but I hope the above helps you in debugging the communication.

Best Regards,

~Nate
0 Kudos
Message 2 of 30
(10,364 Views)
Actually the VBAI side of the communication was easy and straighforward. Plenty of help files and info on the NI support site. The Staubli side was more complex with minimal information supplied in the programming manual, and I was having trouble with that. After experimenting further I was able to transfer data between VBAI and the CS8 controller. If anyone else ever tries this here is what you need to on the Staubli side of the communication:

Set up the ethernet socket on the teach pendant:

Create a new socket and call it VBAI (or anything you really want)
Set the Staubli up as the TCP communication SERVER
Set the termination character for " ; " which is Staubli ASCII character 59 (default is ASCII character 13 which I could not generate in VBAI)

Create the Staubli program (VAL3 language ONLY):

Create a new program in your application
You need to create a serial input output variable (In the data sheet add a new SIO variable, call it sioASCII or whatever you want)
Also create a string variable (In data sheet add a new STRING variable, call it sTEXT or whatever)
Now you must link this variable to the actual hardware socket
Then read the socket and output the value to the teach pendant display screen like this:

UserPage ()
CLS ()
sioLink ( sioASCII , io:VBAI)
sTEXT = sioASCII
putLn ( sTEXT )

Run your VB Inspection on infinite loop first, then run the Staubli program and the inspection data will be displayed on the CS8 teachpendant. Yeah, it always looks to easy after you figure it out the hard way.
0 Kudos
Message 3 of 30
(10,355 Views)
Hi sprayer,
 
I am working with CS8 and Stäubli TX60. I would like contact to you to talk about the TCP connection.
My mail is marc.capilla@gmail.com contact me please.
 
Thanks,
 
Marc.
0 Kudos
Message 4 of 30
(10,259 Views)

Hello every one,

 

I wrote this program

 

UserPage ()
CLS ()

sport=" Text "
sString= sport1
putLn ( sString )

 

and i have enterd some text in Hterm(Interface) which is connected to the serial ports and I am getting my output but after pressing 128 characters in my input.

 

I would like to see my output immediately, what i will enter in my interface Hterm. For example If i press 100 it should print on my teach pendent. With above program also its printing but after pressing 128 more characters in my interface.

 

Anyone of you could give some solution for this problem.

 

thanks in advance.

 

shiva.

0 Kudos
Message 5 of 30
(8,325 Views)

Shiva,

 

You have posted in a National Instruments forum, do you have access to LabView rather than HpyerTerminal? We use ethernet rather than serial, but the approach should be similar. What End Of Line (EOL) character have you specified for the Staubli serial socket? I usually choose something non standard like [ ; ] rather than CR, LF or CRLF. Please make sure both HyperTerminal and Staubli are both using the same EOL character. Next, it sounds like it might be a HyperTerminal problem and it is not sending the string until its buffer becomes full.

 

We do what you are talking about all the time via ethernet and LabView (send text to the teach pendant screen). Let me know if you have access to LabView, otherwise I will try some HTerm serial communication tonight after work for you.

0 Kudos
Message 6 of 30
(8,319 Views)
Hi sprayer,

First ofall thank you for ur response

yes am using serial ports and I have to send some numbrrs or parameters through serial ports and I dont have any idea how it wil works with ethernet.. actually end of line I used was null none cr I dont have this option ; in end of line... so it would be great if you could give me a solution. I have tried by keeping both the eol in null and none but it doesn't worked.

Shiva
0 Kudos
Message 7 of 30
(8,302 Views)

Hi Shiva,

 

1. I hit a small setback on HTerm testing, it looks like I am going to have to make or find a RS-232 gender changer to connect our computer directly to the Staubli via the serial communication port.

 

2. I did notice on all our computers with an ethernet card that on initially configuring an HTerm connection you can choose, COM1, COM2, etc, and TCP/IP (Winsock). Please check if you have the TCP/IP (winsock) option, it will allow you to use any networked computer to HTerm to the Stuabli via the ethernet port.

 

3. In your serial HTerm connection, please go to File>>Properties>>Settings>>ASCII Setup. There are a few configurations you can change that might fix the problem. I would start with selecting 'Send Line Ends With Line Feeds' if it is not selected. This might help...

 

-Sprayer

0 Kudos
Message 8 of 30
(8,292 Views)

Almost forgot, when you configure the HTerm connection you can select from 3 types of flow control, XON/XOFF, Hardware, and None. Make 3 connections using the three different flow control methods. I suspect 'None' may solve the problem. If HTerm is waiting for the Staubli to send a Clear To Send signal then this could be causing the problem.

0 Kudos
Message 9 of 30
(8,289 Views)

Shiva, it is simpler for me to show you how we do it via ethernet. See the attached PDF with pictures, please follow these steps.

 

1. CS8 has 2 ethernet ports, 1 for VAL3 program upload and 1 for user. You will need to connect the second port J205 to a hub, switch or router.

2. On the teach pendant go to control panel

3. Go to controller configuration to configure the J205 ethernet port

4. Go down to network

5. Edit J205 as shown

6. Go back to I/O

7. Go down to socket

8. You have to create a new ehternet socket

9. Choose client

10. Edit it as shown - you may want to increase the time out greater than 5 seconds

11. Create a new VAL3 program as shown

12. You will need to create an sio variable (sioASCII), a string variable (sTEXT), and a number (nIteration)

13. Open HTerm and create test

14. Select TCP/IP (Winsock) communication

15. Edit it as shown

16. It will say unable to connect because the staubli program is not running yet.

17. Run the staubli program

18. Connect with HTerm and type 'Check' & ENTER, 'This' & ENTER, 'Out' & ENTER

19. That should do it. If you don't send any text for too long it just gives you the timeout error

 

Let me know how it goes!

 

-Sprayer

0 Kudos
Message 10 of 30
(8,278 Views)