MpAxisBasic in combination with virtual axis

Hello, Im using a virtual axis in combination with MpAxisBasic. I’ve got one machine at a costumer who is acting strange. When the Z-axis is moving down and a failure is there the axis will stop.

The actual encoder position is -109mm
After a restart the axis should move to position of a safe height of 5mm.

The position is directly showing 5mm when moveabsoluut command is there without moving, as you can see in the trend in the picture above.
Im reading also the actual encoder value with MC_BR_ReadCyclicPosition, this is showing the real actual encoder value.

When disabling the axis the real encoder value is showing up again.

Only after emergency stop it’s getting back normal, cause after emergency stop we home first again.
Does someone recognize this problem, I’ve tried to reproduce this on another machine with the same program but I can get it reacting in the same way. Only at that costume it’s acting like that. Even two other axis’s at the same costumer acting normal.

I would try to check the drive log in mappCockpit to see if the command sequence is what you expect it to be. And maybe compare it with another axis where this works without issue.

I looked at the logger but i don’t see anything strange.

At 13:08:59 a MoveAbsoluut is started to position -118. At AxisStopping a error occures what is causing a power down.
At 13:09:22 the error is been resetted.
At 13:09:27 the axis is been powered on again.
When state is AxisStandstill a MoveAbsolute command is given to position 5.
0.4 s later the MoveAbsoluut is saying finished. But the axis didn’t move. I think i have to look at the “ControlOutputs.SetSpeed” from the virtual axis. But it is for sure shit that the axis is not taking the real position but the position it asumes it should be. After power down again the real position is showing again.

Äh, short question: Am I halucinating or is there a “Command PowerOff” in between those lines? :slight_smile: (13:09:00:562000)

That is probably not such a good idea while the axis is in DiscreteMotion…

Have a look at the PLCOpen state diagram (GUID: e0fe3001-54ae-4779-aacc-f8a23729602d)

Best regards.

Hello Marcel,

your right. But when someone accessing the lightscreen i take away the “Power” and MoveAbsoluut input from MpAxisBasic. A bit later the STO will go down of the drive.

I’m a bit confused now because the topic is ‘virtual axis’, but here we are talking about ‘STO’ and ‘encoder’.
Just to make sure: When a (real) axis is switched on, the set position (e.g. before the position controller) is always displayed, when the axis is switched off, the real actual position is displayed.
And if the Z-axis is carrying a suspended load, then these two positions will of course not be identical (without an integral part of controller settings).

1 Like

Hello Christoph,

im using the Virtual Axis to position with frequency drives with motors with encoders. In case of any alarm i take away the “power” of the MpAxisBasic.

In case of passing the light curtain the STO will go down after a small delay, on a emergency stop the STO will go directly. Should it be better then to try to stop first. After my opinion ErrorStop is ok at an alarm, but something acting strange after going from Errorstop to Standstill to Discrete Motion again then the virtual axis is not giving a “set speed” on the control outputs and MpAxisBasic is giving MoveDone without moving.

Hi Rene,

what position is shown after the axis is just powered on (without any movement command) ?
All movement commands just move the set point generator not the real axis. The position controller afterwards will move the real motor (if possible and if there is one).

Hello Christoph,

i think this picture is showing what you are questioning:

The trend is showing that it’s directly jumping to position 5.

yep, but here we see the situation after an already finished movement, not just a powering on. (you will either have to use mappCockpit or change the program so that no movement command will be sent).

Hello Rene,

you have mentioned that a virtual axis and an encoder is used, so I assume you have a PureVAx with General purpose interface. Is that correct?

If so the axis needs to get the encoder position, please check if it is set correctly in the configuration.
image

You also mentioned that other axes of the same type work correctly. Please check if there are any differences in the configurations of the working and non-working axis.

If you cannot solve the problem, please contact your local Support and send them the detailed problem description, a SDM system dump and the AS-project.

Hello Martin,

The encoder is now connected over a variable DINT, I can change it to I/O channel DINT, but i don’t think it will change a lot, when this is wrong configured I asume I should have more problems then now only after a unexpected “power down” at an alarm.

Getting the position from a variable or I/O channel should not make a difference.

Please check ALL configuration settings and compare them to a working axis, especially the controller settings.
image

Hi Rene, what is the status of your topic, have you find solution? can you update us and mark reply with solution? thanks Jaroslav

Hello Jaroslav, I don’t have the solution yet. The machine is at a costumer and have not the posibility in this moment to go over there. On an other machine i cannot reproduce it, so it’s difficult. But for sure the story will continue, I will check the posible solutions and come back if I found what it was!

Thanks already!

Ok marked as a unsolved. Please update us when you figure out solution for your issue.