CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sun Dec 16, 2018 4:59 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Oct 03, 2018 8:18 pm 
Offline

Joined: Thu Feb 15, 2018 5:03 pm
Posts: 6
I 've some issues when i try to change my TCP of robot using 'SMC_SetKinConfiguration', so the Done signal of this block is set to true
but when i 've used 'MC_GroupReadActualPosition' block to read my current configuration of kinematics, it's doesn't change

Anyone Can tell me what i missing or the block is inapplicable :cry: :cry:

Here's my partial Code

VAR
Kin_Config : TRAFO.Kin_ArticulatedRobot_6DOF_Config;
ReadKin_Config: TRAFO.Kin_ArticulatedRobot_6DOF_ReadConfig;
SMC_SetKinConfiguration: SMC_SetKinConfiguration;
END_VAR
Kin_Config(ArmState:=TRAFO.Kin_6DOF_J0_State.ARMSTRAIGHT,ElbowState:=TRAFO.Kin_6DOF_J2_State.ELBOWSTRAIGHT
,HandState:=TRAFO.Kin_6DOF_J4_State.HANDDOWN);
SMC_SetKinConfiguration(AxisGroup:=Unibot,Execute:=TRUE,ConfigData:=Kin_Config.Config);
IF SMC_SetKinConfiguration.Done THEN
;
END_IF
MC_ReadPosition_MCSCoord(Enable:=TRUE, AxisGroup:=Unibot, CoordSystem:=SMC_COORD_SYSTEM.MCS);
IF MC_ReadPosition_MCSCoord.Valid THEN
ReadKin_Config(Config:=MC_ReadPosition_MCSCoord.KinematicConfig);
END_IF


Top
   
PostPosted: Fri Oct 05, 2018 10:47 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3019
Hi,

SMC_SetKinConfiguration is an administrative function block. That means that it will not cause a movement. Instead, it will only _set _ the configuration of the robot. This configuraiton will be used for future movements.

Example:
1) A scara robot currently is in configuration “elbow left”.
 MC_GroupReadActualPosition returns configuration “elbow left”

2) SMC_SetKinConfiguration(“elbow right”) is called
 No movement is done, MC_GroupReadActualPosition still returns “elbow left”, as the robot did not move.

3) MC_MoveDirectAbsolute is called with a target position in MCS.
 The scara now moves the TCP to the given target position, but now in configuration “elbow right”.
 During the movement, MC_GroupReadActualPosition first returns “elbow left”, then “elbow right”


Note 1: the configuration is only used if a target position is commanded in MCS (or WCS/PCS), not in ACS.
Note 2: a movement between different configurations is only possible with MC_MoveDirectAbsolute/Relative, not with MC_MoveLinearAbsolute/Relative or MC_MoveCircularAbsolute/Relative. Reason: the movement is going through a singularity of the robot.

BR
Edwin


Top
   
PostPosted: Sat Oct 20, 2018 7:08 pm 
Offline

Joined: Thu Feb 15, 2018 5:03 pm
Posts: 6
Thank you, for your answer
Edwin

but MC_GroupReadActualPosition still doesn't change follow my configuration during movement or synchornize motion state, for example
>> i set the ArmState:=TRAFO.Kin_6DOF_J0_State.ARMSTRAIGHT but the MC_GroupReadActualPosition change the value itself, maybe ArmState:=TRAFO.Kin_6DOF_J0_State.ARMFORWARD ,so it's not my configuration. :cry: :cry: :cry: :cry:
**********************************************************************************************************
i have another problem with the value of ''Machine coordinate System''(MC_COORD_REF) in MC_GroupReadActualPosition,
'A'(Angle of rotation around z-axis [deg]) value and 'C'(Angle of rotation around z’‘-axis [deg]) value always vary while there's no movement, for example, C value vary between -180 and 180
How can I set 'A' and 'C' value to be static.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited