Hello Guest it is April 16, 2024, 04:10:34 AM

Author Topic: Motor position alarm  (Read 1885 times)

0 Members and 1 Guest are viewing this topic.

Motor position alarm
« on: July 27, 2019, 10:01:12 AM »
I've got servo's from DMM with the DYN2 driver. I'm using an ESS with a C25 breakout board. I've got the motors set up and working fine.
In the documentation I got sent it tells me to use Pin 8 of the DMM Driver connected to an input of the ESS to trigger an Alarm.

I've connected the Pin 8 Alarm output to Port 2 Pin 9 of the C25. I've set the pin to Active Low and named it MOTOR ALARM in the ESS pins config tab.

I'm not sure what to set after that to map it to an alarm in Mach 4.

Could someone please help me out ?
Re: Motor position alarm
« Reply #1 on: July 27, 2019, 08:00:46 PM »
Hi,
it depends on what you want the motor alarm to do?

If the alarm is a 'following error' you probably want the machine to stop rather than continue to machine an inaccurate part.
The question is do you want it to Estop, ie crash stop and potentially lose reference OR do you want to Cycle Stop and come
to a graceful halt without loss of reference?.

Either could be achieved.

I would recommend that you connect Port2Pin9 (MOTOR_ALARM) to a general purpose Mach4 input.
On the ESS Input Signals tab assign Input#5 to MOTOR_ALARM. Note that I have chose input#5 with malice
aforethought because on the Mach diagnostics tab there is an LED that corresponds to Input#5 so you can see it,
very handy when you are coding something new.

Now you would put an entry into the Signal Library in the screen load script.

I have written an introductory guide to using the Signal Library (SigLib{} ) which may help:

https://www.machsupport.com/forum/index.php?topic=40051.msg267764#msg267764

In any event you can now put in the in-line function how you wish Mach to behave when it encounters a ISIG_INPUT5:

Code: [Select]
rc = mc.mcCntlCycleStop(
number mInst)

Description:
Stop a Gcode file that is running.

OR, you could Estop with:

rc = mc.mcCntlEStop(
number mInst)

Description:
Disables the control and optionally dereferences all axes

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Motor position alarm
« Reply #2 on: July 28, 2019, 07:50:09 AM »
Thanks Craig, Very helpful information.

I've now got it working.

Am I right in thinking that when the drivers alarm for a position error they stop and need a power down to reset ? If that's the case I'd lose my reference anyway, or am I misunderstanding something ?

regards

Carl.

Re: Motor position alarm
« Reply #3 on: July 28, 2019, 02:15:55 PM »
Hi,

Quote
Am I right in thinking that when the drivers alarm for a position error they stop and need a power down to reset ?

That depends on your servo but I suspect not. Is there not a reset procedure? Something like 'take the Enable line low for two
seconds then reassert'.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Motor position alarm
« Reply #4 on: July 29, 2019, 03:56:28 AM »
Hi,
this is from the DMM manual:

Quote
Once servo drive triggers an alarm, the user should use the DMMDRV program to read out the alarm
condition then inspect the machine, load or operation for cause to the alarm. The problem should be fixed
before re-setting the servo drive and running again. The servo drive main power should be cycled to fully
re-set and clear the servo alarm status.
! WARNING

This however is a separate issue to 'following error'.

The motor alarms referred to are:
Quote
Over Voltage
Over Temperature
Lost Phase
Over Power
Over Current

For any one of these conditions you will have to power cycle to reset. You should indentify the fault and correct it before resetting.

A following error is not a safety critical fault, you wish the machine to stop so you can asses the cause of the following error
but it should not require a power cycle to reset.

Craig.
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Motor position alarm
« Reply #5 on: July 29, 2019, 04:05:26 AM »
Hi,
this is also from the manual:

Quote
The servo drives internal position error decides the status of the On Position signal and the Lost Phase
servo drive alarm.
The On Position signal is triggered (LOW) when the servo position error is within the OnPosRange set in
the DMMDRV program. The Lost Phase alarm is triggered when the servo motor is physically 90° or more
out of position for ~2 seconds.
The servo position error is cleared when the drive is disabled using the ENA input and does not accumulate
when the drive is disabled

If you really cock-up and have the servo 900 out of position for more than two seconds then yes you will have to
power cycle to extract yourself.

Note the last line though.....sounds like you can clear a simple and modest following error by taking ENA low.

Craig
« Last Edit: July 29, 2019, 04:10:23 AM by joeaverage »
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'