I tried the code...when i declare the stringvariable[] what do i declare that as? i tried Char already...
Posts by TickTack
-
-
With this stringvariable the char1 would return a "s" correct?
-
So in the code posted above, say I wanted to transfer 5 bytes at a time, would the SIGNAL Index, be the number of characters at a time per loop? And StrLen is the total length of string? So would it go through the loop until Index is equal to StrLen?
DECL INT Index
DECL INTstrlenIndex=5
strlen=25SIGNAL Char1 $OUT[1] to $OUT[8] ; THROUGH CHAR5
............
SIGNAL Index $OUT[9] to $OUT[16] ; what's the purpose of this?FOR Index = 5 TO strlen(Variable[])
Char1 = variable[Index]
Char2 = variable[Index]
Char3 = variable[Index]
Char4 = variable[Index]
Char5 = variable[Index]$out[]= true
Wait for $IN[] = true -
since i have 2 characters that have 25 bytes each, is there a way to use a looping pointer to break that up into 1 byte, so i can set the same Outputs 25 times?
-
Oh Okay, I see what you mean now. Thank you!
-
Thank you, that seems useful for this application, the only thing that concerns me is that I'll have to use too many bits.
each item i want to send across.
8bytes
8bytes
3bytes
25bytes
25bytes
4bytes
4bytesIll be using 616 bits just to send 7 strings, is this common for kuka? I would think it be a lot easier to use explicit messaging to get these across?
-
If i use SIGNAL char1 $OUT[1] to $OUT[8], then I would have 25 of them per string that I want to get across. When you are using this is char1 the binary value of the actual character?
-
I understand the I/O mapping, I don't see where I can use character strings. Goal is to declare a variable in kuka, set the characters, then retrieve it. ex. Description=this is part description.
-
I looked through the manuals, Most I had but I really needed the work visual 4.0, thanks for that one.But I don't see anything about static mapping as mentioned.
-
That may be the better way to go about this then, is there any literature on this ?
-
I have 500 Output bytes and 496 Input bytes. I only have about 30 that is being used.
There was an suggestion you had mentioned about static mapping, would I be able to send over Character strings using that method? -
Now that I'm on site, the KRC4 EthernetIP is version 2.0.1
&ACCESS RVP
&REL 11
&PARAM EDITMASK =
&PARAM TEMPLATE =
&PARAM DISKPATH =
DEF TestExMsg( )DECL STATE_T state
INT offset
INT handleCHAR part,type,desc,desc1,matlenth,consumable,width,surfac
INT CmID
INT CmDLen
CHAR Buffer[4096]
CHAR infostring[150]COPEN(:LD_EXT_OBJ1,handle)
WAIT FOR (handle>0)
Loop
offset=0
SWRITE(infostring[],state,offset,"part=%s type=%s desc=%s desc1=%s matlenth=%s consumable=%s width=%s surface=%s", part,type,desc,desc1,matlenth,consumable,width,surface) ; is this correct synax?part=P0001 ;Do I delare these here?
type=IBEAM
desc=12x55 ibeam profile
desc1=2 needed
matlenth=50
consumable=130
width=12
surface=6
offset=0CWRITE(handle,state,WMode,%s,infostring[])
WAIT FOR(state.Ret1==#DATA_OK)endloop
HALT
ENDHere is what I've been working on so far...
-
Id like to make sure I'm getting the correct info, when I look at my Ethernet/IP in work visual do I look at REV number, because everything should already be set up correctly from Kuka...
-
KSS 8.3.16
Options are : Remote service V1.2.0
SafeSingleBrake v1.01EthernetIP rev. 1.1.2.930
Im not close to the controller but that is all from the latest work visual project.
-
Oh okay, I would be able to adapt to that, is that information found anywhere in the integrators manual at all?
-
Yes sorry, I have the ethernet set up installed on KRC4, everything is in place to do the MSG command besides the code.
-
Using a KRC4 controller, I am trying to cast information "strings" and retrieve them using a MSG command in AB PLC. I have a previouse machine that used Motoman code using the SET command to send them across. I am trying to convert the motoman SET to the kuka language. I believe this is the correct commands in KRL needed to do this but not 100% sure. I would be sending 9 different Attributes with a 25 character max for each one. Below is not the code I have thus far, its just a example of the CAST TO and SWRITE
INT tmpInt
DECL STATE_T Stat
INT Offset
INT i
INT nHandle; Header
INT CmdID
INT CmdLen
; Command structure
INT ARID, ErrCode, Slot, SubSlot,Index, Transaction, DataLen
; User data
INT UserData
CHAR Buffer[4096]
CHAR TmpStr[150];-----------------
;-- COpen (...) --
COPEN (:LD_EXT_OBJ1, nHandle)
Wait for (nHandle>0)
loop
SWRITE(TMPSTR[],STAT,Offset,"CmdId=%d CmdLen=%d TNum=%d ARID=%d Slot=%d SubSlot=%d Index=%d DataLen=%d", CmdID, CmdLen, Transaction, ARID, Slot, SubSlot, Index, DataLen)
; --- Prepare Read Response
ErrCode=4
DataLen= 4
CmdLen = DataLen + 28
UserData=4
Offset=0
CAST_TO(Buffer[],Offset,CmdID)
CAST_TO(Buffer[],Offset,CmdLen)
CAST_TO(Buffer[],Offset,Transaction)
CAST_TO(Buffer[],Offset,ARID)
; CAST_TO(Buffer[],Offset,Slot)
; CAST_TO(Buffer[],Offset,SubSlot)
; CAST_TO(Buffer[],Offset,Index)
; CAST_TO(Buffer[],Offset,DataLen)
; CAST_TO(Buffer[],Offset,UserData)
; CAST_TO(Buffer[],Offset,ErrCode)
CWrite (nHandle,Stat,WMode,"%1.40r",Buffer[]) -
In search of the touch sense document.
I'm trying to find all of the touch sense variables used to make a working program.
I haven't been able to find openly on the web.
I have a kRC4 -
-
Thanks but no, Im looking for how to set up your own external axis, like a kinematic system.
I can't seem to find where abb stores their manuals openly.