# Posts by ashwinmudigonda

• ## Estimate for Yaskawa MH12/FS100 robot

I am trying to find the used value of a Yaskawa MH12 with FS100 controller. It is in good working condition. Is asking 15K\$ too much?

• ## Recovering from a shock sensor alarm in PLAY mode

I have an MH12 robot on a FS100 controller. I am trying to use a gripper to pick parts and would like to use the shock setting as a sensor to help me stop an IMOV motion.

I have configured the shock sensitivity settings and call it with the SHCKSET command in the job. This is working as expected. My question is how do I capture the

ALARM 4315
COLLISION DETECT

alarm and set a bit so that I can use it with an IMOV.

• ## How do I move by an incremental distance in the current tool frame?

But these are dynamic points, not fixed.

I have a part. I compute the a pose above the part. And from there I want to explore in the tool frame by an offset.

So I cannot teach a P[1] position.

I changed it to

PR[8,0]=0
..
PR[8,3]=-25
..
PR[8,6]=0

L PR[1] 50mm/sec FINE Tool_Offset,PR[8]

And now it goes in the tool frame, but it goes to PR[1] which is the pick point.

• ## How do I move by an incremental distance in the current tool frame?

I was trying to set the P[1] variable's components, but could not figure out how to. Under the REGISTER _ _ = _ _ I couldn't find an option to set a P variable.

I figured that about the INC and was going to remove it.

• ## How do I move by an incremental distance in the current tool frame?

PR[8] is completely filled in.

PR[8,1] = 0
PR[8,2] = 0
PR[8,3] = -25
PR[8,4] = 0
PR[8,5] = 0
PR[8,6] = 0

L P[1] 50mm/sec FINE Tool_Offset, PR[8]

throws an uninitialized error

• ## How do I move by an incremental distance in the current tool frame?

Thanks.

Could you clarify what the command is trying to do?

What should be in P[1]?

I am getting an "uninitialized data is used" error.

When I tried

PR[8,3] = 25
L PR[11] 50mm/sec FINE INC Tool_Offset, PR[8]

It still moves in the world frame's Z.

• ## How do I move by an incremental distance in the current tool frame?

I am still confused.

I want to move in the tool frame's Z coordinate the way I am able to jog.

What do I do have to put into the PR variable?

Isn't there a parameter in the L motion command to signify which frame to use - Base, User, or Tool?

• ## How do I move by an incremental distance in the current tool frame?

What is the PR[9] in this case?

• ## How do I move by an incremental distance in the current tool frame?

I have an L command

Code
``L PR[8] 50mm/sec FINE INC``

It's moving in the world frame. How do I get it to in the tool frame #2?

Code
``UTOOL_NUM=2``

before the motion command and that didn't help.

• ## Help mirroring input bits on the output side in the background?

I figured that much through the manuals, but what do I add to the ladder?

Find the relay that matches teh input and connect it straight to the relay that matches the output?

I tried to map input 17 to output 17.

I added a rung and set the relay on the left to be 00030 and the one on the right to be 10030, but the ladder won't compile.

I also tried to set the relay on the right to be an OUT.

How would the program look like?

STR #00030
OUT #10030

I tried doing the above in the mnemonic editing window, and could not get it to compile

• ## Help mirroring input bits on the output side in the background?

I need to reflect a set of bytes coming from the PLC on the output. So if IN 500 is on, I need to set OT 500 to be high. How do I do this in the background and not using a job?

I am running a MH50 robot on a DX 200 controller.

• ## Getting a "INTP-311...Uninitialized data is used" error when trying to move

I have a vision system that is communicating to the teach pendant the pose to go to via sockets. I pushed the (x,y,z,w,p,r) into PR[1] and am trying to use the J command to move the robot to it, but it throws an error on that line saying

INTP-311 Uninitialized data is used.

I recorded a position to set PR[1] to some value. That didn't help.
I also tried to assign PR[1] to another PR variable that is a constant. That also didn't help.

How do I initialize this variable?

The details of the variable are

PR[1] UF: F UT: F CONF:FUT 127-1-
X 120.9 mm W 179.8
Y -1133.9 P 31.4
Z 352.9 R -176

SET_POS_REG(1, poseToGo, status)
\$UFRAME = \$MOR_GRP[1].\$NILPOS --For world.
\$UTOOL = \$MNUTOOL[1,1] -- where utool would be the tool the point used.

I am still seeing the same error and the PR variable looks the same.

EDIT 1:
Further digging:

The values of a PR variable that I have recorded and then am able to jog to look like this:

PR[3] UF:F UT:F CONF:NUT 000

When I set this to PR[1] and then run my code it is getting overwritten to FUT 127-1-

This could be the problem. How do I set it to NUT 000?

EDIT 2:
I figured it out:

-- Write this value in PR[1]
poseToGo.config_data.CFG_TURN_NO1 = 0
poseToGo.config_data.CFG_TURN_NO2 = 0
poseToGo.config_data.CFG_TURN_NO3 = 0

poseToGo.config_data.CFG_FLIP = FALSE
poseToGo.config_data.CFG_UP = TRUE
poseToGo.config_data.CFG_FRONT = TRUE

This set the configuration correctly.

• ## How do I use SELECT on the teach pendant ?

I am trying to do a SWITCH...CASE equivalent on a Register. I can't understand the syntax of the SELECT command. It seems different from the Karel SELECT ENDSELECT command. What is its syntax?

• ## Trouble sending arbitrary length strings over socket

That didn't quite work. Here is the code snippet

I tried commenting out the first file attribute too. That didn't work either.

• ## How do I call routines in Karel code from the teach pendant job?

I meant on the teach pendant. I have a PROGRAM A in Karel. On the pendant when I do a CALL function, I see only Program A, not its subroutines.

• ## How do I call routines in Karel code from the teach pendant job?

I have written a few programs that contain routines. How do I call a specific one from a program?

For now, I have moved each routine into a separate program to access them.

Is there a better way?

• ## Trouble sending arbitrary length strings over socket

I am working on writing a socket client on the FANUC side to talk to a Python server. I got the example code to work, but I am having issues with getting a random length string to be passed to and from.

Code
``````tmp_str = 'Connect'
WRITE file_var(tmp_str::126)
WRITE('Wrote: ',tmp_str,CR)

status = IO_STATUS(file_var)

works if my Python server echoes the data back

But if I want the response from my server to be "Connect, 1"

Then the Karel client is stuck on "waiting to read from server..." because it is expecting more bytes. I tried to use BYTES_AHEAD to sniff how many bytes to read, but that function returned 0. However, if I change my READ to

Code
``READ file_var(tmp_str::9)``

it works fine. From the manual I thought the first format specifier was the number of bytes to read. This appears to be the length of the string. How do I know a prori the length of the input string buffer?

• ## How do I declare and define constants in one kl file and access it another?

I am trying to create a single file for all the constants I'll need and refer to them in all the other files.

I created a GlobalVars.kl file that looks like

Code
``````PROGRAM GlobalVars

VAR
maxSize	 : INTEGER

BEGIN
maxSize = 125
END GlobalVars``````

I created a QuickTest.kl that looks like:

Code
``````PROGRAM QuickTest

VAR
maxSize FROM GlobalVars : INTEGER

BEGIN
WRITE('maxSize: ',maxSize,CR)
END QuickTest``````

Both files compile fine, but when I run quicktest.pc, I get:

Intp-311 (Quick_Test, 7) uninitialized data is used.....abort all

How do I accomplish this?

• ## TCP Karel Client not connecting to server

I see. Thanks.