1/30/2019 1:56 PM | |
Posts: 21 Rating:
|
Hello specialists! I have S7-1200 CPU1214C DC/DC/DC to control a stepper motor with M542 Leadshine driver. I am using all Motion Control blocks in order to control the axis (it has to move from one sensor to another depending on input order) I am also reading its status by StatusBits(..) and so on. But there is one thing that I miss somehow. I can get ActualPosition from axis, but lets say - that we move axis manually, by hand (due to power lack or something), so it will lose its current position and steps. The position will not change then in StatusBits and remain as it was before. I wonder, what is a practice to prevent a stepper motor from loosing steps/position, so we can acquire a right position in emergency situation like this? How are you managing these problems? Thanks for any tips! |
1/30/2019 2:09 PM | |
Posts: 2826 Rating:
|
This is the "holy grail" (fictional dreams) of stepper motors: reading motor position without encoder feedback.
There is no configuration / software remedy for this situation. The open loop configuration offers no feedback that can be used. My systems require a return to a known position. Having sensors at various position makes it possible for you to do so. Two options: (a) user tells the system which sensor to aim for (b) machine takes safe route to nearest sensor position. The only other option is to make use of an encoder (as you have guessed already). |
This contribution was helpful to
1 thankful Users |
1/30/2019 2:26 PM | |
Posts: 21 Rating:
|
I got it. In this case is it safe to use (in defined conditions - for example - when motor is not in sensor 1 or 2) MoveVelocity block Then if we are in position, we set the bit (which consists of - for example - InVelocity bool output from MC block AND I1.0 (pos 1/2)) that will execute MC_Stop. Would that solution be okay in practice? |
Last edited by: Grzesiuk93 at: 1/30/2019 2:27:32 PM |
|
1/30/2019 2:31 PM | |
Posts: 2826 Rating:
|
YES, if you are sure it is safe. The other option is to use homing. Then this is handled for you. Homing also has many modes. There is automatic, assisted and direct. If the sensor that you use as reference is always the same sensor, then use automatic (it moves by itself) or assisted. If the sensors change as for the situation, then use direct setting. For the most accurate "direct set" homing, the best would be to use a hardware interrupt on the sensor used as reference. |
1/30/2019 2:51 PM | |
Posts: 21 Rating:
|
Do you mean MC_Home block? There are some available Modes, but as far as I see in help there are no modes like automatic, assisted or direct. Or maybe i misunderstood you. My sensor is always the same for referencing. |
1/30/2019 3:12 PM | |
Posts: 2826 Rating:
|
Yeah, I get the namings Siemens use wrong. But yes I was thinking of the modes in the MC_HOME block. A reminder is attached as a PDF. You have several options there to look at. > My sensor is always the same for referencing. These two statements contradict each other. Would you care to explain? Keep in mind that configuring an input to be linked with the motion control, does not mean it cannot be used in normal code. Defining a profile for homing, does not mean you have to use homing. Active homing will work well for you. Passive homing will need you to code the movement, but the referencing ("zeroing") happens in the background when triggered. AttachmentMC_HOMING.pdf (443 Downloads) |
1/30/2019 3:26 PM | |
Posts: 21 Rating:
|
I guess I just misunderstood that function. Could you please explain me what is a Digital input homing switch that we set up in Configuration for Active/Passive homing? At first I thought it is a button that will execute homing, but now I see I might be wrong. Digital Input homing switch says that we have achieved a desired position, is it a signal for MC_Home that function was executed and axis is on the position of DI homing switch (sensor)? |
1/30/2019 3:38 PM | |
Posts: 2826 Rating:
|
Please feel welcome to use the search facility in this forum. Find the full document of small version that I have attached earlier. There are more descriptions on "homing" as a task.
|
Last edited by: #dP at: 1/30/2019 3:39:39 PM |
|
1/30/2019 3:46 PM | |
Posts: 2826 Rating:
|
(more info) |
1/31/2019 8:32 AM | |
Posts: 21 Rating:
|
Thank your for everything now, its all clear to me now. [snip] |
Last edited by: Jen_Moderator at: 1/31/2019 12:46:25 PMDivision of questions into separate topics. |
|
Follow us on