Appendix B
06/2005
Danaher Motion
188 Rev
E
M-SS-005-03
Group Point Properties
Following modal-only and read-only group properties of the point data-type exist:
DEST DEST_JOINT
Target
point of the movement.
START START_JOINT
Starting
point of the movement.
HERE
POSITIONFEEDBACK or PFB
Actual point of the robot (feedback).
SETPOINT
POSITIONCOMMAND or PCMD
Actual point of the robot (group).
S
INGLE
E
LEMENT
A
SSIGNMENT
Syntax for assigning a single element of a structure:
<
variable_name
>-><
structure element
> =<
expression
>
In Functions
Structures can be passed to functions and subroutines both by reference and by value. Also,
an entire array of structures can be passed (by reference) to a function or subroutine.
Structures can also serve as returned values of functions. However, the structure type of an
argument or a returned value must match function declaration.
Dim Shared ARG1 As Type_1
Dim Shared ARR_ARG[4][5] As Type_1
Dim Shared ARG2 As Type_2
FUNCTION MyStructFunc(BYVAL Par1 AS Type_1, Par2 AS Type_2) AS Type_1
…
MyStructFunc = Par2 -> Error - structure type mismatch
MyStructFunc = Par1 -> Structure types match
END FUNCTION
SUB MySub(Arr_Par[*][*] AS Type_1)
…
END SUB
ARR_ARG[2][3] = MyStructFunc(ARG1, ARG2) -> Structure types match
ARR_ARG[2][3] = MyStructFunc(ARG1, ARG1) -> Error - structure type
mismatch
CALL MySub(ARR_ARG)
or
Common Shared ST As STRUCT
Common Shared LongVar As Long
FUNCTION MyFunc(BYVAL Par1 AS LONG, Par2 AS LONG) AS STRUCT
…
MyFunc->LongElm2 = 10
MyFunc->JointElm = {12.3, 5, 43.29}
END FUNCTION
FUNCTION NoParamFunc AS STRUCT
…
END FUNCTION
ST = MyFunc(ST->LongElm1, LongVar)
ST = MyFunc(ST->LongElm1, ST->LongElm2)
-> Error – structure element passed by reference
? MyFunc(ST->LongElm1, LongVar)->LongElm2
-> Error – addressed through function call
LongVar = NoParamFunc->LongElm2
-> Error – addressed through function call