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 Sat Jun 15, 2019 9:54 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Jan 25, 2016 6:21 pm 
Offline

Joined: Wed Apr 29, 2009 8:29 am
Posts: 15
Hi,
I would like to be able to change all the scaling parameter of my softmotion drive in my Codesys project (in running mode, and not only config one).
not only the inc/motor turns object, but also the gear ratio.
I have an application where the same motor could be used on different station with different scaling.

I looked into the axis structure parameter and I only found the MSC_Changegearinratio block.
Does someone know how to do this?

Thanks by advance


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Mon Jan 25, 2016 7:58 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3305
Hi,
use SMC_ChangeGearingRatio
and after that a SMC3_ReinitDrive...

BR
Edwin


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Mon Jan 25, 2016 10:48 pm 
Offline

Joined: Wed Apr 29, 2009 8:29 am
Posts: 15
Hi thanks for the answer, but I already tried and it changed only a few parts of the config.
Nominator is a dword and denominator a int!
I need more.
As you can see on the image of my first post, I would like it I change the values in the red square!
Does someone know how to perform this?


Top
   
PostPosted: Tue Jan 26, 2016 6:20 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3305
Example:

Axis.iRatioTechUnitsNum := Direction (+/-1) * motor turns * gear output turns (all left side) * units in application (all right side)
Axis.iRatioTechUnitsDenom := increments * motor turns * gear output turns (all left side)
 
Note: These two values are mathematically reduced, e.g. if iRatoTechUnitsNum=10000 and dwRatioTechUnitsDenom = 200000, it will be…
iRationTechUnitsNum=1 and dwRatiTechUnitsDenom=20

BR
Edwin


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Thu Feb 07, 2019 6:58 pm 
Offline

Joined: Thu Feb 15, 2018 5:03 pm
Posts: 17
Hi,
Edwin
Could you show me the result of Read Actual Axis.iRatioTechUnitsNum and Axis.dwRatioTechUnitsDenom on my project?
Because I try to calculate with the same as your method but the result doesn't correct.

:cry: :cry:


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Fri Feb 08, 2019 5:53 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3305
iRatioTechUnitsNum := -1 * 1 * 2 * 360 = 720
dwRatioTechUnitsDenom := 262144 * 243 * 1 = 63700992

iRatioTechUnitsNum = 5
dwRatioTechUnitsDenom = 442368

BR
Edwin


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


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