Hi everyone,
Turns out the issue was that i hadnt swithced on the inerrupt, as soon as i recitfied this it all worked perfect, i cant beleive it was such a simple mistake. Thankyou again for all fo your help!
Thanks
Sam
Hi everyone,
Turns out the issue was that i hadnt swithced on the inerrupt, as soon as i recitfied this it all worked perfect, i cant beleive it was such a simple mistake. Thankyou again for all fo your help!
Thanks
Sam
Thanks for looking over that,
I've looked too and i cant beleive i havent actually turned the interrupt on!
That seems strange however as the program still stops when the sensor is triggered in the sub program, i'll try uploading the changes when i'm back on site this afternoon.
Thanks again!
Sam
Hi Panic Mode,
I only sent images as i didnt have my laptop, as i said a the end of my post.
I've added the actual files now.
The routine must have access to the variable because it goes to the position the variable is preset too, but the its as if the interrupt isnt updating this variable fromt the preset value?
Thanks for all of your input guys
Sam
simply assigning value does not solve the problem completely but it does prevent one error message (invalid value). this initial value is really arbitrary - it will be changed when you run search. this also allows value to be saved when robot is shut down.
but ... without anything assigned, if you did not run search (or if you rebooted since last search), there would be no value in the variable.
I'll try adding a value and seeing what happens, I thought it would need a value however thats why I run the search program before calling the array.
Yeah I will, I’ve attached two images of the smart pad, I tried $pos_int & $pos_act and neither world . It’s driving me mad! I’m away from my laptop, I’ll send files asap!
I’ve tried to search the variable but it just states ‘object is not available’
It definitely seems as though them interrupt isn’t saving the position, this is the interrupt prog:-
Def Palletfound ()
Interrupt off 9
$advance = 0
Palletfoundpos = $pos_int
Brake
Resume
End
Sorry Skyefire I didn’t see your post until after I’d posted, the error I get is still the same however!
Hi Guys,
So I tried initialising the value of 10000 in the config.dat and I don’t get the error anymore however the robot tries to drive to the 10000 position instead of the position saved from the interrupt??
I’ve tried putting the search routine before and after the for loop and I get the same problem
Thanks
Sam
simply assigning value does not solve the problem completely but it does prevent one error message (invalid value). this initial value is really arbitrary - it will be changed when you run search. this also allows value to be saved when robot is shut down.
but ... without anything assigned, if you did not run search (or if you rebooted since last search), there would be no value in the variable.
Also you can check your palletfoundpos VAR with VARSTATE before
I'll try adding a value and seeing what happens, I thought it would need a value however thats whyi run the search program before calling the array and i still get the error?
Thanks i'll try this too but i dont know what VARSTATE is?
Hi panic mode,
Thanks for getting back to me so fast! I do have it declared in .dat but i dont have a value assigned to it so this could be the issue, for reference, these are programs below, copied form orange edit not full .src just up until error.
.src File
DEF PLACEBOARDS( )
DECL INT ARRAY
SPTP HOME
stackheight=1
searchpallet()
LOOP
FOR stackheight = 1 TO 100 STEP 1
test[stackheight]=palletfoundpos
test[stackheight].z=test[stackheight].z+(stackheight-1)*offset
endfor
.dat file
DECL INT stackheight
DECL REAL offset=12.1500
POS palletfoundpos
Thanks
Sam
Hi Guys,
I'm trying to do similar and am having issues. I am palletizing and at the moment I am starting from the same point all of the time which I have taught the robot called 'Xrefpos', when the pallet is complete (signal from PLC) stackheight is reset back to '1' and all works fine, see below.
FOR stackheight = 1 TO 100 STEP 1
test[stackheight]=Xrefpos
test[stackheight].z=test[stackheight].z+(stackheight-1)*offset
I want to change it so at the start of the program it searches for the pallet and starts from the position at which the program is interrupted. The interrupt program stores the position as:-
Palletfound = $pos_int
What i'm trying to acheive is:-
FOR stackheight = 1 TO 100 STEP 1
test[stackheight]= Palletfound (Instead of Xrefpos)
test[stackheight].z=test[stackheight].z+(stackheight-1)*offset
I have the interrupt program working fine and once out of the interrupt program and back into the main program i can get the robot to go to the interrupt position, so that position is stored, the issue is i get 'palletfound value invalid,' once the find pallet program has compelted and it goes to the array start is when i get the error. The only difference i see is that Xrefpos is an E6POS and Palletfound is $POS_INT? I've tried using $POS_ACT but that didnt work either??
Findpallet () ; search pallet prograg
LIN Palletfound ;robot goes to stored position
PTP Home ;goes to home position
FOR stackheight = 1 TO 100 STEP 1
test[stackheight]= Palletfound (Instead of Xrefpos) ----- Error occurs HERE
test[stackheight].z=test[stackheight].z+(stackheight-1)*offset
I've been really dropped in it and need to get this working so any help would be greatly appreciated!
I'd upload photos but I dont know how too? I dont know what im supposed to enter in the source and link?
Thanks
Sam
Hi Guys,
I realised my issue was down to a mapping problem on workvisual, for some bizarre reason i only had 58 DWORDS mapped not 63, as soon as i fixed that i can now read the value of X_Ofs!
So now i will try to program the offset. I'm using the base frame in this instance and i want to offset the placeboards position, so i'd do the following?
I already have the below programmed and reading fine.
SIGNAL X_Ofs_From_PLC $IN[2017] TO $IN[2048]
DECL REAL X_Ofs = 0.0
and
(In the .SRC file):
X_Ofs = (X_Ofs_From_PLC/100.0)
Now I will add the below to config.dat?
DECL FRAME MyOFFSET ; add it at the bottom section of the $CONFIG.DAT
MyOFFSET.X = X_Ofs
MyOFFSET.Y = Y_Ofs
MyOFFSET.Z = Z_Ofs
MyOFFSET.A = A_Ofs
MyOFFSET.B = B_Ofs
MyOFFSET.C = C_Ofs
Whereby each of the X/Y/Z offsets are signals being sent from the PLC?
And to offset the position i want to offset i'd use the below in the program .src file?
LIN MyOFFSET: Placeboards ; if offset is in the base frame
Thankyou again for all your help, i've learnt so much here.
Thanks
Sam
Brute-force approach: create a quick program in the PLC that flips that DWORD between 0 and 1 on a 0.5 or 1-sec interval. Then page through the $INs until you find the bit that's flashing. Then do the same for 0 and 256, which should identify the first bit of the second byte, then 65536 for the 3rd byte, and 16777216 for the first bit of the 4th byte. That should eliminate any confusion about addressing.
If you can't get any $INs to change state, then there's something more basic wrong. But usually in that case, you'd be getting error messages. I would try mapping the $INs as simple bits, rather than using the WoV word/dword stuff, and see if any values (even wrong ones) can be transferred.
My issue is the way the birdge works, i'm sending signals already to the robot and its sending DWORD, so to get it to work i have to use one fo the DWORDS thats already being sent but not being used. This is because the process image of this particular bridge only can only be set to receive 0-32 of a certain data type and i need it to be DWORDS for the amount of inputs i'm sending, i think.
I'll give this a try now though.
Is the syntax i wrote in the previous comments correct?
When i press add image it just says source and link?
Can you see the digital inputs screen? And look if some bits change the state?
The last time I did it, I had to create a group of this signals (32 bits used in config.dat) in work visual and define as DINT, the same in beckhoff. It Enable you receive negative numbers.
I have them grouped as DWORD on the bridge side and hten mapped to 32 inpits on the KUKA side. No inputs in the range that i have mapped are chanign thought. this seems to be the issue. The PLC is showing that it is sending the value but KUKA does not seem to be receiving. There are comm's between the two as i am sending other signals fine.
How do i add images in here?
Hi,
I am transferring one DWORD which is 32bits, mapped to
I wrote this in the .DAT FILE
SIGNAL X_Ofs_From_PLC $IN[2017] TO $IN[2048]
I wrote the exact detail in my last reply?
I tried declaring the beliow in the confg.dat file
SIGNAL X_Ofs_From_PLC $IN[2017] TO $IN[2048]
DECL REAL X_Ofs = 0.0
and
(In the .SRC file):
X_Ofs = (X_Ofs_From_PLC/100.0)
then monitoring X_Ofs and it never chages from 0.
Ive sent a number of diferent values from the plc and it doesnt change?
Thanks again
Sam
Hi,
So this didnt work, i'm not sure how to isnert images on here so i'll explain.
I wrote this in the .DAT FILE
SIGNAL X_Ofs_From_PLC $IN[2017] TO $IN[2048]
DECL REAL X_Ofs = 0.0
(In the .SRC file):
X_Ofs = (X_Ofs_From_PLC/100.0)
All i'm looking to do at the moment is monitor the variable and see if it changes when i change it at the PLC side. When i monitor the variable it never changes from '0'.
I'm sending the signal as a DWORD from Beckhoff PLC which according to Workvisual is received as USINT in KUKA. Monitoring the Beckhoff outputs, the DWORD is reading 100, but monitoring the variable i get '0' and monitoring the inputs that are grouped together to form the DWORD $IN[2017] TO $IN[2048] I dont see any changes at all?
I'm only monitoring SIGNAL X_Ofs_From_PLC just to check that data is being received.
When I monitor X_Ofs it only ever reads 0.0 also, but presumably that is becasue we have set it to 0.0 in the INI? I dont quite understand why we have to do that?
This is my first time transferring anything other than boolean so apologies if i'm missing basic stuff.
Thanks
Sam
Hi Guys,
Thanks so much for the response! I'll try this today, apolgoies on the delay ive been on holiday.
On this specific project I'm using an odler EL6695 which only allows me to assign 32 DWORDS, so i'm covnverting a word to DWORD in beckhoff to fill the 32nd DWORD to allow me to address it in workvisual.
I'm hoping in doing this i can use the 32 bit signal as below instead of SIGNAL X_Ofs_From_PLC $IN[1] TO $IN[16]....?
SIGNAL X_Ofs_From_PLC $IN[1] TO $IN[32]
DECL REAL X_Ofs = 0.0
(In the .SRC file):
X_Ofs = (X_Ofs_From_PLC/100.0)
Thanks again and i will report back.
Thanks
Sam
Hi Skyefire,
This looks like exactly what I am trying to do! Where would I declare the variables ‘X_ofs’ ? And what type of variables are they, INT?
Im transferring data between Beckhoff PLC/HMI & KUKA KRC4, using EL6695 EtherCAT bridge. Have everything working in EXT and just need to offset placing position on a pallet depending on size of product to be placed.
Thanks!
KRL does not accept variables inside the {} of a STRUC type variable. As such, what you want to accomplish needs to be a multi-step process: