That seemed to get my status to 0.
Thanks!
That seemed to get my status to 0.
Thanks!
Thanks. I didn't have that. I had it installed. Now I can confirm that I see R648 'User Socket Msg' in the STATUS section.
I am still not able to make a connection with the python server. My test client code looks like this:
PROGRAM kc
%STACKSIZE = 4000
%NOLOCKGROUP
%NOPAUSE=ERROR+COMMAND+TPENABLE
%ENVIRONMENT uif
%ENVIRONMENT sysdef
%ENVIRONMENT kclop
%ENVIRONMENT bynam
%ENVIRONMENT fdev
%ENVIRONMENT flbt
%INCLUDE klevccdf
%INCLUDE klevkeys
%INCLUDE klevkmsk
VAR
file_var : FILE
tmp_int : INTEGER
tmp_str : STRING[128]
status : INTEGER
entry : INTEGER
loop1 : BOOLEAN
BEGIN
--SET_FILE_ATR(file_var, ATR_IA)
--SET_VAR(entry, '*SYSTEM*','$HOST_CFG[1].$SERVER_PORT',8000,status)
--WRITE(' VAR status = ',status,CR)
-- Connect the tag
MSG_CONNECT('C1:',status)
WRITE(' Connect status = ',status,CR)
MSG_DISCO('C1:',status)
WRITE('Disconnect status=',status,CR)
--loop1 = TRUE
END kc
Display More
On the Python side, the server looks like this:
import socket
import sys
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_address = ('192.168.2.5',8000)
print "Starting up on %s port %s" %server_address
sock.bind(server_address)
sock.listen(1)
while True:
print "Waiting for connection..."
connection, client_address = sock.accept()
print "Connection from ", client_address
Display More
I see on the pendant:
Connect Status = 67206
Disconnect Status = 67216
What am I doing wrong?
Under Setup->Host Comm->Client, I see my C1 tag defined.
C1: SM 192.168.2.5 [DEFINED]
Under Setup->Host Comm->Server, I see a S1 tag defined (that I did not)
S1: SM *** [STARTED]
$HOST_CFG[1].$SERVER_PORT is defined to be 8000
I disabled firewall on Windows.
I wrote another Karel program that uses MSG_PING command with '192.168.2.5' and the status was 0. So the Fanuc can ping the Python server's PC.
My FANUC is configured to be a static IP on 192.168.2.10
I wrote a simple python server to listen for connections and echo messages. It is running on 192.168.2.5 on port 8000.
I went through the client tag set up from the KAREL manual. Tag C1 looks like:
C1 SM 192.168.2.5 DEFINED
System Variable $HOST_CFG[1] looks like:
$PROTOCOL 'SM'
$PORT '8001'
..
$SERVER_PORT '8000'
My test client code looks like:
PROGRAM kc
%STACKSIZE = 4000
%NOLOCKGROUP
%NOPAUSE=ERROR+COMMAND+TPENABLE
%ENVIRONMENT uif
%ENVIRONMENT sysdef
%ENVIRONMENT kclop
%ENVIRONMENT bynam
%ENVIRONMENT fdev
%ENVIRONMENT flbt
%INCLUDE klevccdf
%INCLUDE klevkeys
%INCLUDE klevkmsk
VAR
file_var : FILE
tmp_int : INTEGER
tmp_str : STRING[128]
status : INTEGER
entry : INTEGER
loop1 : BOOLEAN
BEGIN
SET_FILE_ATR(file_var, ATR_IA)
SET_VAR(entry, '*SYSTEM*', '$HOST_CFG[1].$SERVER_PORT',8000,status)
WRITE(' VAR status = ',status,CR)
-- Connect the tag
WRITE('Connecting...',CR)
MSG_CONNECT('C1:',status)
WRITE(' Connect status = ',status,CR)
loop1 = TRUE
END kc
Display More
I am able to load the program, and run it, but it throws an error:
INTP-320 (KC,29) Undefined built in
and that line points to MSG_CONNECT('C1:',status).
On the user screen I see
VAR status = 16006
Connecting...
What am I doing wrong in the communication setup?
I wrote my first hello_world program following the instructions here: http://www.onerobotics.com/posts/2013/int…el-programming/
I got ktrans to translate it to a .pc file.
After jumping hoops, I got KAREL option enabled on the pendant.
I put the file on a USB stick, and then on the pendant, MENU->FILE->File->PC->HELLO_WORLD and tapped F3 (LOAD)
I said YES.
I see LOADING
and then LOADED UD1:\HELLO_WORLD.PC
Now I don't see HELLO_WORLD in the main menu screen where I choose SELECT PROG.
I am not able to find it when I try to add a CALL function in a test program.
Where is the file and how do I run it?
---
when I go to menu, and choose SELECT PROG. and tap MORE, I see a list of files. I see HELLO_WORLD in that list, and when I tap ENTER on it, I see
HELLO_WORLD is selected. But that's it. It doesn't run.
Never mind. I figured it out. The manuals from FANUC are bad.
I had to choose the USB as the media source, and then follow the rep's steps to AUTH and INSTALL KAREL.
Then I couldn't figure out how to get out CTRL START mode. Turns out I had to tap on the FCTN button and choose the cold start option.
Hopefully this will help someone else flailing through these steps.
Nation: shouldn't that be R632?ashwinmudigonda: which controller is this? R-30iB?
Yes. It is a R-30iB Plus.
I got the FANUC rep to give us a PAC, but when I try to install in the CTRL START mode, I get OPTN-033 Image not backed up
I tried to write a simpler hello world and got errors trying to load the program in HandlingPro.
----
I tried following the instructions in this page - http://www.onerobotics.com/posts/2013/int…el-programming/
i was able to compile the hello_world to a .pc file.
I was able to find it on the pendant after copying it onto a USB drive and inserting it into the controller.
However, when I choose LOAD, I get
The KAREL option is required.
When I check the STATUS, I do see
KAREL Cmd. Language J650
KAREL Run-Time Env J539
on the pendant.
Am I missing something?
I am trying to write a TCP client in Karel to talk to a simple python server. I went through the manual and configured a client on $HOST_CFG[1]. I typed the example client from the manual into Notepad++(I couldn't copy paste)
PROGRAM loopcl
%STACKSIZE = 4000
%NOLOCKGROUP
%NOPAUSE=ERROR+COMMAND+TPENABLE
%ENVIRONMENT uif
%ENVIRONMENT sysdef
%ENVIRONMENT kclop
%ENVIRONMENT bynam
%ENVIRONMENT fdev
%ENVIRONMENT flbt
%INCLUDE klevccdf
%INCLUDE klevkeys
%INCLUDE klevkmsk
VAR
file_var : FILE
tmp_int : INTEGER
tmp_str : STRING[128]
status : INTEGER
entry : INTEGER
loop1 : BOOLEAN
BEGIN
SET_FILE_ATR(file_var, ATR_IA)
SET_VAR(entry, '*SYSTEM*'. '$HOST_CFG[1].$SERVER_PORT',80000,status)
-- Connect the tag
WRITE('Connecting...',CR)
MSG_CONNECT('C1:',status)
WRITE(' Connect status = ',status,CR)
loop1 = TRUE
IF status = 0 THEN
WHILE loop1 = TRUE DO
WRITE('Opening file...',CR)
OPEN FILE file_var('rw','C1:')
status = IO_STATUS(file_var)
IF status = 0 THEN
FOR tmp_int = 1 TO 100 DO
tmp_str = '0123456789012345'
WRITE file_var(tmp_str::10)
WRITE('Wrote 126 bytes',CR)
IF status <> 0 THEN
WRITE('Loop test fails',CR)
loop1 = FALSE
tmp_int = 100
ELSE
WRITE('Read 126 bytes',CR)
READ file_var(tmp_str::10)
status = IO_STATUS(file_var)
WRITE('Read status ', status,CR)
ENDIF
ENDFOR
WRITE('Closed file',CR)
CLOSE FILE file_var
ELSE
WRITE('Error opening file',CR)
loop1 = FALSE
ENDIF
ENDWHILE
WRITE('Disconnecting...',CR)
MSG_DISCO('C1:',status)
WRITE('Done.',CR)
ENDIF
END loopcl
Display More
We have HandlingPro evaluation version. I was able to load and compile simple programs. I tried to load the Karel_Client.ls program, and got error messages (see attached). I am not sure what they mean. Clicking on them does not help.
Could someone point me in a direction on how to debug?
I wrote my first code, and was able to step through it. I turned the Key to Auto, put the switch on the pendant to Off, and hit start on the controller when I saw
"S/W Reg. expires in 57 days"
and the robot stops.
If I hit the Reset button the pendant, the error reappears in about 2 seconds.
How do I get around this?
I figured that was the case, and also went ahead with a Taylor series implementation. Thanks.
I am trying to use basic trig functions, and I am not able to see PSIN, PCOS,... under the CALL options for programs, macros, Karel, or anything.
I don't have the "System design tool" option installed. I do see how to activate the trig functions in the manual for that module.
Are these functions available with another module. I have the Motion Interface and Motion Package add ons.
Thanks.
I see
KAREL Cmd. Language
KAREL Run-Time Env
I am assuming that indicates it is installed.
What do I need on my PC to write and compile KAREL compatible programs?
Hello.
I am tasked with getting a Fanuc up and running, and I am trying to learn the basics.
I see that Karel is an optional add on, and is required for some of the features I desire.
How do I check on the pendant if the option is installed? I am running R-30ib Plus controller.
Thanks! that helped. The variable was wrapped in a FOLD. I was able to modify it.
It is a STRUC called Pallet and it has a property called prePickOffset that is set to 300mm. I need to drop that value down to 100. I believe it is a user defined STRUC
I see in the config.dat there is STRUC variable with a bunch of properties that is being used in the .src files. How do I modify that on the pendant?
I am new to Kuka. What is BCO? From what little I have gathered the robot executes a BCO routine every 90 days by going to a certain location and using a tuning fork (?) to verify its location. Where is this routine? What is the position variable I have to look into to modify?