Difference between revisions of "Undocumented User Functions"

From SoftMC-Wiki
Jump to: navigation, search
m
(C Functions)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This sections is intended for expert users or developers. It contains a list of internal functions for debugging, troubleshooting and development purposes.
+
=Undocumented User Functions=
 +
 
 +
 
 +
{{Note/Danger|This sections is intended for expert users or developers. It contains a list of internal functions for debugging, troubleshooting and development purposes.
 
We do not guaranty any kind of backward compatibility. Usage can cause severe deviation in operation.<br />
 
We do not guaranty any kind of backward compatibility. Usage can cause severe deviation in operation.<br />
'''''Use it on your own risk!!'''''<br />
+
'''''Use it on your own risk!!'''''<br /> }}
Each function gets up to 3 optional integer parameters and optional return values. <br />
+
 
 +
 
 +
==User Functions==
 +
Each function gets up to 3 optional integer parameters and an optional return value. <br />
 
'''''Usage''''':  
 
'''''Usage''''':  
 
var = user FUNCTION_NAME(1,2,3)<br />
 
var = user FUNCTION_NAME(1,2,3)<br />
 
?user FUNCTION_NAME(1,2,3)<br />
 
?user FUNCTION_NAME(1,2,3)<br />
Unused parameters shall be zero <br />
+
Unused parameters are zero <br />
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 13: Line 19:
 
! Parameter 2
 
! Parameter 2
 
! Parameter 3
 
! Parameter 3
! return value
+
! Return Value
 
! Description
 
! Description
 
|-
 
|-
Line 42: Line 48:
 
| none
 
| none
 
| VFB
 
| VFB
| axis 1,2,3... return value is that mapped to VFB
+
| axis 1,2,3... return value mapped to VFB
 
|-
 
|-
 
| USER_CAN_SDO_WRITE
 
| USER_CAN_SDO_WRITE
| drive address&value size
+
| drive address and value size
 
| IndexSubindex
 
| IndexSubindex
 
| Value
 
| Value
 
| Error code
 
| Error code
| example: user USER_CAN_SDO_WRITE(0x0101,0x606000,7) will write 7 into object dictioanry 0x6060 with subIndex zero
+
| example: user USER_CAN_SDO_WRITE(0x0101,0x606000,7) will write 7 into object dictionary 0x6060 with subIndex zero
 
|-
 
|-
 
| USER_CAN_SDO_READ
 
| USER_CAN_SDO_READ
Line 56: Line 62:
 
| none
 
| none
 
| Error code
 
| Error code
| example: USER_CAN_SDO_READ(1,0x606100,0) will read from object dictioanry 0x6061 with subIndex zero
+
| example: USER_CAN_SDO_READ(1,0x606100,0) will read from object dictionary 0x6061 with subIndex zero
 
|-
 
|-
 
| USER_SKIP_SYNC
 
| USER_SKIP_SYNC
Line 66: Line 72:
 
|-
 
|-
 
| USER_DELAY_SYNC
 
| USER_DELAY_SYNC
| Delay in uSecs
+
| delay in μs
 
| lCpuClockMzh
 
| lCpuClockMzh
 
| none
 
| none
Line 73: Line 79:
 
|-
 
|-
 
| USER_SET_ES_LOCK_DETECT_TIMEOUT
 
| USER_SET_ES_LOCK_DETECT_TIMEOUT
| Delay in msecs
+
| delay in ms
 
| none
 
| none
 
| none
 
| none
 
| none
 
| none
| ??????
+
| ????
 
|-
 
|-
 
| USER_GET_ES_LOCK_DETECT_TIMEOUT
 
| USER_GET_ES_LOCK_DETECT_TIMEOUT
| Delay in msecs
+
| delay in ms
 
| none
 
| none
 
| none
 
| none
Line 87: Line 93:
 
|-
 
|-
 
| ENCRYPTFILE
 
| ENCRYPTFILE
| File name
+
| file name
 
| none
 
| none
 
| none
 
| none
Line 99: Line 105:
 
| none
 
| none
 
| Generate a number of consecutive tx errors. For debugging purposes.
 
| Generate a number of consecutive tx errors. For debugging purposes.
 +
|-
 +
| MOT_CVEL
 +
| axis handle 1..32
 +
| none
 +
| none
 +
| velocity command in drive units(counts) sent to driver over filedbus
 +
| example: user MOT_CVEL(1,0,0)' returns velocity command in drive units(counts) sent to driver over filedbus
 +
|-
 +
| EC_SET_TX_ERR
 +
| x - number of EtherCAT transmission errors to simulate (will not send x frames)
 +
| none
 +
| none
 +
| none
 +
| example: user EC_SET_TX_ERR(1,0,0)' simulated 1 missing frame
 
|-
 
|-
 
| none
 
| none
Line 106: Line 126:
 
| none
 
| none
 
| none
 
| none
 +
|}
 +
 +
==C Functions==
 +
 +
Usage: Just call it as normal MC-BASIC functions
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Name
 +
! Syntax
 +
! Return Value
 +
! Description
 +
|-
 +
| '''SET_AI_MAX_TRAN'''
 +
| import_c SET_AI_MAX_TRAN(byval as double) as long
 +
| error code (0 - OK)
 +
| Setting max allowed transnational [mm] deviation in AI blending ([[MC-Basic:robot.PASSMETHOD|Polishing]])
 +
|-
 +
| '''SET_AI_MAX_ROT'''
 +
| import_c SET_AI_MAX_ROT(byval as double) as long
 +
| error code (0 - OK)
 +
| Setting max allowed rotational [deg] deviation in AI blending ([[MC-Basic:robot.PASSMETHOD|Polishing]])
 +
|-
 +
| '''RBT_XYZ2ZYZ'''
 +
|IMPORT_C RBT_XYZ2ZYZ(byval as generic location, as generic location) as long
 +
| error code (0 - OK)
 +
| XYZ -> ZYZ
 +
|-
 +
| '''RBT_ZYZ2XYZ'''
 +
|IMPORT_C RBT_ZYZ2XYZ(byval as generic location, as generic location) as long
 +
| error code (0 - OK)
 +
| ZYZ -> XYZ
 +
|-
 +
| '''RBT_TOOL_CALIBRATION_ARRAY'''
 +
|IMPORT_C RBT_TOOL_CALIBRATION_ARRAY(as generic location, byval as long, as generic location) as long
 +
| error code (0 - OK)
 +
| tool calibration function
 +
|-
 +
| '''RBT_TABLE'''
 +
|IMPORT_C RBT_TABLE(byval as generic location, byval as generic location, byval as generic location, as generic location) as long
 +
| error code (0 - OK)
 +
| Frame calibration functions
 +
|-
 
|}
 
|}

Latest revision as of 11:57, 23 April 2018

Undocumented User Functions

DANGER.svgDANGER
This sections is intended for expert users or developers. It contains a list of internal functions for debugging, troubleshooting and development purposes.

We do not guaranty any kind of backward compatibility. Usage can cause severe deviation in operation.
Use it on your own risk!!


User Functions

Each function gets up to 3 optional integer parameters and an optional return value.
Usage: var = user FUNCTION_NAME(1,2,3)
?user FUNCTION_NAME(1,2,3)
Unused parameters are zero

Name Parameter 1 Parameter 2 Parameter 3 Return Value Description
USR_GET_RUN_TIME_ERROR none none none error code Value of last run-error
USR_GET_ASSERTED_ERROR none none none error code Value of last run-error delivered to interpreter from other module.
USR_GET_RECENT_ERROR none none none error code Value of recent error
USER_CAN_GET_VFB axis none none VFB axis 1,2,3... return value mapped to VFB
USER_CAN_SDO_WRITE drive address and value size IndexSubindex Value Error code example: user USER_CAN_SDO_WRITE(0x0101,0x606000,7) will write 7 into object dictionary 0x6060 with subIndex zero
USER_CAN_SDO_READ drive address IndexSubindex none Error code example: USER_CAN_SDO_READ(1,0x606100,0) will read from object dictionary 0x6061 with subIndex zero
USER_SKIP_SYNC number none none none Skip number of syncs for debugging purposes
USER_DELAY_SYNC delay in μs lCpuClockMzh none none Create artificial delay in single SYNC messages
USER_SET_ES_LOCK_DETECT_TIMEOUT delay in ms none none none  ????
USER_GET_ES_LOCK_DETECT_TIMEOUT delay in ms none none none  ????
ENCRYPTFILE file name none none none Encrypt file, this function requires definition in proto.pro
EC_SET_TX_ERR number none none none Generate a number of consecutive tx errors. For debugging purposes.
MOT_CVEL axis handle 1..32 none none velocity command in drive units(counts) sent to driver over filedbus example: user MOT_CVEL(1,0,0)' returns velocity command in drive units(counts) sent to driver over filedbus
EC_SET_TX_ERR x - number of EtherCAT transmission errors to simulate (will not send x frames) none none none example: user EC_SET_TX_ERR(1,0,0)' simulated 1 missing frame
none none none none none none

C Functions

Usage: Just call it as normal MC-BASIC functions

Name Syntax Return Value Description
SET_AI_MAX_TRAN import_c SET_AI_MAX_TRAN(byval as double) as long error code (0 - OK) Setting max allowed transnational [mm] deviation in AI blending (Polishing)
SET_AI_MAX_ROT import_c SET_AI_MAX_ROT(byval as double) as long error code (0 - OK) Setting max allowed rotational [deg] deviation in AI blending (Polishing)
RBT_XYZ2ZYZ IMPORT_C RBT_XYZ2ZYZ(byval as generic location, as generic location) as long error code (0 - OK) XYZ -> ZYZ
RBT_ZYZ2XYZ IMPORT_C RBT_ZYZ2XYZ(byval as generic location, as generic location) as long error code (0 - OK) ZYZ -> XYZ
RBT_TOOL_CALIBRATION_ARRAY IMPORT_C RBT_TOOL_CALIBRATION_ARRAY(as generic location, byval as long, as generic location) as long error code (0 - OK) tool calibration function
RBT_TABLE IMPORT_C RBT_TABLE(byval as generic location, byval as generic location, byval as generic location, as generic location) as long error code (0 - OK) Frame calibration functions