Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: JohnHaine on March 19, 2021, 12:17:47 PM

Title: Mach 3: Programmatic change to config
Post by: JohnHaine on March 19, 2021, 12:17:47 PM
This is maybe a strange question, but I'm wanting to write a macro to add to a screen that will allow me to make repeated measurements on the probed position on executing a G31 - basically I am interested in the variance of the sensed position, or how accurate the probe is.  This is partly to evaluate probes, but more because what I'm actually wanting to do is evaluate the precision of photointerrupters sensing a vane.  At the moment my Mach 3 is set up to trigger on a negative going (i.e. grounded) signal when the probe touches which is fine for the photointerrupter when looking at one edge, but they also display hysteresis so I'd also like to look at the other sense, when the vane moves out of the gap and the signal goes positive.  What I'd really like to do is change the sensing polarity of the digitise signal from within the macro.  Can anyone advise if this is possible please?

John.
Title: Re: Mach 3: Programmatic change to config
Post by: TPS on March 19, 2021, 01:33:25 PM
you can try to Play with:

Code: [Select]

  SetProbeActive(bool) // turns the probe ON or off, 1 for on, 0 for off
  SetProbeState(bool) // sets the low-active on or off, 1 for on, 0 for off


never tested thse functions.
Title: Re: Mach 3: Programmatic change to config
Post by: JohnHaine on March 20, 2021, 02:15:16 AM
Thanks for pointing these out.  The wording is a bit ambiguous on the second, does it mean if you set bool to 1 it's active low, or bool=0 it's active high?  I guess I might need to try it!
Title: Re: Mach 3: Programmatic change to config
Post by: TPS on March 20, 2021, 03:10:36 AM
Code: [Select]

  SetProbeState(True) 'disable Active Low of probe input
  SetProbeState(False) 'enable Active Low of probe Input

Title: Re: Mach 3: Programmatic change to config
Post by: JohnHaine on March 20, 2021, 05:36:23 AM
Thanks!

I'll give that a whirl.

John.
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 04, 2021, 09:56:27 AM
Thanks!

I'll give that a whirl.

John.


Hello,

I am also looking for a way to switch the probe active low status without the need to open "ports and pins" tab. Did you try these commands? Do they work?


Thank you.

Best,
Alessio
Title: Re: Mach 3: Programmatic change to config
Post by: JohnHaine on May 04, 2021, 10:32:54 AM
Hi Alessio, I'm afraid not!  I managed to get the information I needed anyway.  If you try it I'd be very interested to know if it does work!

John.
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 04, 2021, 10:53:18 AM
Hi John, thanks for the reply. So how did you change the probe signal within the macros? Maybe I can use the same principle for my purpose.

Alessio
Title: Re: Mach 3: Programmatic change to config
Post by: JohnHaine on May 04, 2021, 10:54:56 AM
Well actually, I didn't - I just made measurements on one edge (falling edge) of the signal from the opto.
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 04, 2021, 11:08:53 AM
ah ok no problem. I will try those commands and report back if they work. There must be a way to change between pin status from a VB script or OEM command.
Thanks,

Alessio
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 08, 2021, 06:17:17 PM
No unfortunately neither the 2 work

  SetProbeState(True) 'disable Active Low of probe input
  SetProbeState(False) 'enable Active Low of probe Input

and

SetProbeActive(bool) // turns the probe ON or off, 1 for on, 0 for off
  SetProbeState(bool) // sets the low-active on or off, 1 for on, 0 for off

It gives Script Compl Error

Was worth it a try
Title: Re: Mach 3: Programmatic change to config
Post by: JohnHaine on May 09, 2021, 05:13:25 AM
Thanks for trying anyway!  Back to the drawing board I guess...
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 09, 2021, 07:11:04 AM
No problem.
Yes it's easy enough with a 3904 transistor to switch between NO and NC. Did that for the digitizer probe. Was just useful for the few times where I use a 123 block as metal reference for probing. Well VB scripts must have limits too  ;D
Title: Re: Mach 3: Programmatic change to config
Post by: joeaverage on May 09, 2021, 08:46:12 PM
Hi,
Mach4 has up to four independent probe channels, G31.1, G31.2, G31.3 and G31.4.

Craig
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 10, 2021, 06:28:29 AM
Yes I know, that's nice. We were discussing about this possibility in Mach3.
Title: Re: Mach 3: Programmatic change to config
Post by: joeaverage on May 10, 2021, 07:30:26 AM
Hi,
its not possible in Mach3, at least programmatically.

That leaves some sort of hardware switch, eminently possible but far from straight forward.

Craig
Title: Re: Mach 3: Programmatic change to config
Post by: TPS on May 10, 2021, 09:18:55 AM
i have tested:
Code: [Select]
SetProbeState(True) 'disable Active Low of probe input
SetProbeState(False) 'enable Active Low of probe Input

in Ver. 043.022 and Ver. 043.066 and it is working in both.


Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 10, 2021, 09:53:30 AM
Ah ok good to know that I can stop trying it. Yes hardware wise I did it already for the digitizer probe but not the tool offset probe. I just liked the idea of be able to switch it by software too without open the ports and pins page. Anyhow not a big of a deal.

Crag, since it's clear that you are really knowledgeable in everything related to the Mach3/4 situation in general. I wanted to ask you a question. Not on topic with this thread so I hope it's not a problem.
I am currently using USS to control the CNC for the past 2 years. I got it used for cheap so I thought was a good idea at the time. The machine after a lot of optimization runs really nice, but was thinking on switching to an ethernet controller. I am doubting between:
- ESS
- UC300ETH

ESS will be the newer version, compare to USS I know it supports backlash compensation (not sure though what changes compare to the inbuilt Mach3 backlash comp). Moreover it now accepts encoders to have a better spindle synchronization for threading (I use my mill also as lathe, Mill turning). One thing that it's missing is rigid tapping and I like the idea of have this function since I am installing an AC servo motor as spindle.

On the other hand UC300ETH it's meant for UCCNC but there is a Mach3 plugin too. I read that it's really stable and although it can deliver "lower" pulse frequency (still 400KHz), it seams to be able to control more in real time the machine (for instance feed hold doesn't take secs to stop the machine) and it should support rigid tapping too. At least that what they mention of the website. Plus it's cheaper where I leave, which is always nice  ;D

I could not find a table with the pro and cons for both of them and was wondering whether you could gave me an overview of what functions are supported in both the controller. Of course please correct it me, if I reported something wrong.
What is really important for my use (on top of the classical features common to all controllers), it's be able to control 5-6 axis, stable, backlash compensation (if it's way better than the default from Mach3) and rigid tapping (not mandatory but I would like).

Thanks a lot!

Alessio
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 10, 2021, 09:56:44 AM
i have tested:
Code: [Select]
SetProbeState(True) 'disable Active Low of probe input
SetProbeState(False) 'enable Active Low of probe Input

in Ver. 043.022 and Ver. 043.066 and it is working in both.

Damn it did not work for me. I made a button with

SetProbeState(True) 'disable Active Low of probe input

and one with

SetProbeState(False) 'disable Active Low of probe input

and it both of the cases gave me compile error. I am using R3.043.066

I guess I will give it another try. Thanks
Title: Re: Mach 3: Programmatic change to config
Post by: TPS on May 10, 2021, 10:04:00 AM
test it vb script editor
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 10, 2021, 10:18:29 AM
test it vb script editor

Yes you are right! I made 2 macros through VB editor and indeed works. I do not know why did not work with buttons. Anyhow macros are good too! Thanks a lot
Title: Re: Mach 3: Programmatic change to config
Post by: TPS on May 10, 2021, 12:22:21 PM
so if the instruction itselv is running in VB Script Editor, it must also run in button script.

just make sure that you have pressed ENTER after the instruction to have a empty line
under the code.
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 10, 2021, 01:03:35 PM
so if the instruction itselv is running in VB Script Editor, it must also run in button script.

just make sure that you have pressed ENTER after the instruction to have a empty line
under the code.

Yes I believe that too. I must have overlooked something when I tried with the buttons. Was late at night so everything is possible :-). I will give it another try and see.

Thanks!
Title: Re: Mach 3: Programmatic change to config
Post by: joeaverage on May 10, 2021, 03:54:24 PM
Hi,
the ESS has a larger and more powerful FPGA and so has a few features that the USS misses on.

You mention encoder threading and the ESS does that, but to my knowledge is supported in Mach4 only. You can use encoder
threading in Mach3 but it treats the encoder channel as a single pulse per rev input, that is to say, encoder threading offers no advantage
over index threading, at least in Mach3.

Related to encoder threading is spindle PID. When using an encoder and a conventional PWM spindle the PWM is adjusted to control
spindle speed with a PID loop. The loop has a low bandwidth velocity loop so cannot be used as a servo controller, but is quite an
improvement over the open loop situation. Note  this is a  feature that occurs in the Mach4 plugin only and to my knowledge there is
no plan by Warp9 to extend the Mach3 plugin to support spindle PID.

The USS does not have the noise immunity to do plasma, whereas the ESS supports hardware THC in both Mach3 and Mach4 plugins.

I have an AC servo as a spindle motor, and I can use it as a conventional PWM spindle OR a step/direction C axis for rigid tapping. I can
change back and forth programmatically with Mach4, whether the same programmatic switch can happen in Mach3  is doubtful, rather like
this multi-probe problem.

Overall I think the ESS is an advantage over the USS but you will not get the true benefits until you step up to Mach4.

The only feature that the UC300, aside from compatibility with UCCNC, is an analogue input that the ESS lacks.

Craig
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 10, 2021, 05:10:36 PM
Hi,
the ESS has a larger and more powerful FPGA and so has a few features that the USS misses on.

You mention encoder threading and the ESS does that, but to my knowledge is supported in Mach4 only. You can use encoder
threading in Mach3 but it treats the encoder channel as a single pulse per rev input, that is to say, encoder threading offers no advantage
over index threading, at least in Mach3.

Related to encoder threading is spindle PID. When using an encoder and a conventional PWM spindle the PWM is adjusted to control
spindle speed with a PID loop. The loop has a low bandwidth velocity loop so cannot be used as a servo controller, but is quite an
improvement over the open loop situation. Note  this is a  feature that occurs in the Mach4 plugin only and to my knowledge there is
no plan by Warp9 to extend the Mach3 plugin to support spindle PID.

The USS does not have the noise immunity to do plasma, whereas the ESS supports hardware THC in both Mach3 and Mach4 plugins.

I have an AC servo as a spindle motor, and I can use it as a conventional PWM spindle OR a step/direction C axis for rigid tapping. I can
change back and forth programmatically with Mach4, whether the same programmatic switch can happen in Mach3  is doubtful, rather like
this multi-probe problem.

Overall I think the ESS is an advantage over the USS but you will not get the true benefits until you step up to Mach4.

The only feature that the UC300, aside from compatibility with UCCNC, is an analogue input that the ESS lacks.

Craig

Thanks a lot for the thoughtful answer. Appreciate.
yes, I know Mach4 offers better features, but I have done so much in Mach3 to make it like I wanted that makes me worry to move to Mach4 if I do not really need it.
Regarding the AC servo as spindle motor. I thought to drive it as step/dir all the time in the "step-less" that Mach3 offers. Would that be a problem and is it better to drive it as PWM? My current DC motor is driven in PWM so won't be too difficult to use the same for the AC. I just thought speed is better control in step/dir and indeed I have seen video of people rigid tapping by swapping the Spindle motor to C axis, just by using an Index input (1 per rev), but in that case I believe you trust on the inbuilt encoder spindle and it's power to don't slow down while threading or bye bye, something bad will happen since there is no real feedback on the spindle. Is this the case?

Regarding the UC300ETH, I have seen it has an analog port but does it mean that for instance it can create the 0-10V signal to drive a VFD without an additional board?
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 10, 2021, 05:17:14 PM
so if the instruction itselv is running in VB Script Editor, it must also run in button script.

just make sure that you have pressed ENTER after the instruction to have a empty line
under the code.

Hi,
So I have tried and indeed button works too, but in both of the cases the changes are applied to the probe input only after you access the ports and pins window and close it. Then a Estop is automatically triggered and the changes are applied. I have also tried to trigger the Estop manually but that doesn't help, so there is some kind of refresh cycle that it's automatically elicited when you close the ports and pins tab. Do you know if it's possible to trigger the same refresh cycle with a VB command? Thanks
Title: Re: Mach 3: Programmatic change to config
Post by: joeaverage on May 10, 2021, 08:58:55 PM
Hi,
yes you can drive an AC servo with either step/direction OR PWM. In most circumstances there is little in it.

If your controller is providing an analogue voltage , ie PMW output, the servo drive closes its speed loop on that input voltage, thus any
speed reduction by virtue of changing load will be corrected by the servo drive feedback.

If your controller is outputting step/direction then the drive, using the servo encoder, closes the feedback loop.

Both methods result in the speed being controlled by a feedback loop....ergo no difference. Given that the spindle in Mach3, and incidentally Mach4,
is natively PWM it is easier to apply PWM than step/direction, although either is possible.

Step/Direction input allows you to have position control for an indexing spindle for instance, or C axis control for rigid tapping. Quite frankly I think
trying to get Mach3 to do a Caxis properly is going to be trouble.

Quote
Spindle motor to C axis, just by using an Index input (1 per rev), but in that case I believe you trust on the inbuilt encoder spindle and it's power to don't slow down while threading or bye bye, something bad will happen since there is no real feedback on the spindle. Is this the case?

That is a misunderstanding, the servo encoder is an INPUT into the servo drive and it is COMPARED to the step/direction input and the drive attempts to reduce the
error. That IS FEEDBACK, and its fundemental to the way AC servos operate. Thus an AC servo is in feedback control at all times, its just that you, or rather Mach,
does not control the feedback loop, it is enacted entirely by the servo drive. Should the load be such that the servo cannot keep up then the drive will alarm out
and stop. The feedback enacted by a modern servo drive on a matching servo is superb, better I would say, than any general purpose feedback controller can ever
manage. The manufacturer of a servo knows EXACTLY the best way to control it and makes their drives to PERFECTLY match the servo. If you think you can program
a PID loop better than a servo manufacturer then this is the wrong place for you!

Quote
Regarding the UC300ETH, I have seen it has an analog port but does it mean that for instance it can create the 0-10V signal to drive a VFD without an additional board?

This is a misunderstanding also. A controller, be it an ESS OR a UC300 can produce a PWM output signal which is filtered by an A-to-D converter on the BoB to produce an
analogue 0-10V signal. What a UC300 has is an analog input channel. The UC300 measures an analog input, say a voltage from a potentiometer say, and convert that into
a digital number which can be read and manipulated by Mach.

Quote
. Then a Estop is automatically triggered and the changes are applied. I have also tried to trigger the Estop manually but that doesn't help, so there is some kind of refresh cycle that it's automatically elicited when you close the ports and pins tab. Do you know if it's possible to trigger the same refresh cycle with a VB command? Thanks

This is part of the way Mach3 works, any change to the profile results in an Estop and must be manually restarted. Mach4 on the other hand can programmatically change settings in the
profile, with or without a save cycle, and carry on running. Mach4  and its Lua coding language is VASTLY superior when it comes to doing this sort of tricky-dicky  customisations.

Craig
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 11, 2021, 06:33:12 AM
Quote
That is a misunderstanding, the servo encoder is an INPUT into the servo drive and it is COMPARED to the step/direction input and the drive attempts to reduce the
error. That IS FEEDBACK, and its fundemental to the way AC servos operate. Thus an AC servo is in feedback control at all times, its just that you, or rather Mach,
does not control the feedback loop, it is enacted entirely by the servo drive. Should the load be such that the servo cannot keep up then the drive will alarm out
and stop. The feedback enacted by a modern servo drive on a matching servo is superb, better I would say, than any general purpose feedback controller can ever
manage. The manufacturer of a servo knows EXACTLY the best way to control it and makes their drives to PERFECTLY match the servo. If you think you can program
a PID loop better than a servo manufacturer then this is the wrong place for you!

What I meant with "Spindle motor to C axis, just by using an Index input (1 per rev)" I was talking about the index input for the spindle revolution. I guess although you have a closed loop AC servo as spindle motor you still need at least an index input on the spindle itself to  try to rigid tapping and in that case you trust the good closed loop system from the servo to don't keep up with Z and do not loose power. Is it correct?


Quote
This is a misunderstanding also. A controller, be it an ESS OR a UC300 can produce a PWM output signal which is filtered by an A-to-D converter on the BoB to produce an
analogue 0-10V signal. What a UC300 has is an analog input channel. The UC300 measures an analog input, say a voltage from a potentiometer say, and convert that into
a digital number which can be read and manipulated by Mach.

Ok, thanks for the explanation. Had no idea this was possible.



Quote
This is part of the way Mach3 works, any change to the profile results in an Estop and must be manually restarted. Mach4 on the other hand can programmatically change settings in the
profile, with or without a save cycle, and carry on running. Mach4  and its Lua coding language is VASTLY superior when it comes to doing this sort of tricky-dicky  customisations.

That won't be a problem since I would switch the Active low probe input before start a probing operation. Anyhow I guess it's not possible to trigger the same "refresh" cycle by VB script. Not big of a deal. Was worth it a try.
Title: Re: Mach 3: Programmatic change to config
Post by: TPS on May 11, 2021, 07:02:09 AM
never tryed the  SetProbeState() in reality only found it in the attached file.

i do it with a Little Piece of Hardware.
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 11, 2021, 07:19:43 AM
never tryed the  SetProbeState() in reality only found it in the attached file.

i do it with a Little Piece of Hardware.

No problem and thanks for the help.
The word files is really useful, thanks! I will have to start makikng a M6 macro for ATC carousel I am making. That will be quite a challenge  ;D
Title: Re: Mach 3: Programmatic change to config
Post by: TPS on May 11, 2021, 12:46:26 PM
I will have to start makikng a M6 macro for ATC carousel I am making. That will be quite a challenge  ;D

is soon your Hardware (Inputs/Outputs) is clear just start a new thread, and we will seen.
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 11, 2021, 01:11:24 PM
I will have to start makikng a M6 macro for ATC carousel I am making. That will be quite a challenge  ;D

is soon your Hardware (Inputs/Outputs) is clear just start a new thread, and we will seen.

Sure I will. First I need to finish to machine all the motor mount to switch to servos on all the axis. Then it's the time for the ATC...exiting.
Title: Re: Mach 3: Programmatic change to config
Post by: joeaverage on May 11, 2021, 03:26:21 PM
Hi,

Quote
try to rigid tapping and in that case you trust the good closed loop system from the servo to don't keep up with Z and do not loose power. Is it correct?

Yes, the closed loop applies to the servo and servo drive. You signal the drive where you want the servo to be and the servo/servo drive takes itself
there. In some respects its like an open loop stepper, you signal a certain number of steps in a given direction and the stepper drive drives
the stepper to that location....assuming no loss of steps. A servo has feedback so that it is much more certain of arriving at the commanded location,
and if it can't for any reason it will fault 'following error' and alarm out.

You could signal the drive, one pulse = one revolution, but it would be very coarse. All AC servos have the principle of electronic gearing.
It allows that you can signal the drive at one rate, say 1324 pulse per rev, but the servo encoder is 10,000 pulse per rev. Electronic gearing allows
very great flexibility in application of a servo.

Craig
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 11, 2021, 04:52:08 PM
Quote
You could signal the drive, one pulse = one revolution, but it would be very coarse. All AC servos have the principle of electronic gearing.
It allows that you can signal the drive at one rate, say 1324 pulse per rev, but the servo encoder is 10,000 pulse per rev. Electronic gearing allows
very great flexibility in application of a servo.

Craig

Does it mean that you can actually "try" rigid tapping with using this principle without a spindle index input (1 pulse /rev)? Just with the SERVO encoder? That would be really interesting.
Title: Re: Mach 3: Programmatic change to config
Post by: joeaverage on May 11, 2021, 07:37:08 PM
Hi,

Quote
Just with the SERVO encoder? That would be really interesting

Yes, that is exactly how my C axis works.

Craig
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 12, 2021, 07:05:00 AM
Hi,

Quote
Just with the SERVO encoder? That would be really interesting

Yes, that is exactly how my C axis works.

Craig

Amazing, so that can also be attempt with my current USS after I have the AC servo installed. IS there a good thread talking about axis swap and how to achieve it? If I think at Mahc3 I guess you will have to assign same step and dir pins and port to spindle and C axis (C axis set it as angular axis). Then the rest is handled in the gcode. But maybe I am missing something.

My AC servo is 2500 count *4=10000 pulse/rev. What a good electronic gear ration I can use? I was thinking at 2000 pulse/rev

Thanks
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 12, 2021, 12:34:34 PM
Quote
If I think at Mahc3 I guess you will have to assign same step and dir pins and port to spindle and C axis (C axis set it as angular axis)

Sorry, I meant you assign new step and dir pins for the C axis, but you connect them to the same pins used to control the spindle during milling on the AC servo drives.
Title: Re: Mach 3: Programmatic change to config
Post by: joeaverage on May 12, 2021, 04:48:20 PM
Hi,
You may have to do a hardware swap, rather like the probe problem. Whether that is required is determined by the control
modes offered by the servo rather than any limitation in Mcah3.


Most of the time my AC servo runs as in velocity mode with a 0-10V PWM input, easy. My Allen Bradley servo has dual mode,
so by asserting one digital input to the drive it changes from analogue velocity mode to step/direction position mode.
Thus when I want to do a C-axis  move during a job I call a macro that asserts the change-over pin, then write Gcode
of the form:

G1 C3600 Z-10

which results in the Caxis (spindle) doing 10 revolutions while the Z axis descends 10mm for a 1mm pitch helical interpolation move.

Once the Caxis move is complete I can run another macro to de-assert the changeover pin and the spindle goes back to analogue velocity
mode with PWM input. This all happens without any intervention on my part while running the Gcode program.

Note that this dual-mode option is pretty much standard across all modern AC servos. My new Delta B2 series servos for my new build have that feature
as well. I imagine your spindle servo will have the same feature, although I have not read the manual closely enough to be sure.

If your spindle servo has that feature you can swap between the two modes WITHOUT having to switch any wiring. If it does not have that feature
then you will have to do some sort of hardware switch.

Craig
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 12, 2021, 05:49:18 PM
Quote
Most of the time my AC servo runs as in velocity mode with a 0-10V PWM input, easy. My Allen Bradley servo has dual mode,
so by asserting one digital input to the drive it changes from analogue velocity mode to step/direction position mode.
Thus when I want to do a C-axis  move during a job I call a macro that asserts the change-over pin, then write Gcode
of the form:

G1 C3600 Z-10

which results in the Caxis (spindle) doing 10 revolutions while the Z axis descends 10mm for a 1mm pitch helical interpolation move.

Once the Caxis move is complete I can run another macro to de-assert the changeover pin and the spindle goes back to analogue velocity
mode with PWM input. This all happens without any intervention on my part while running the Gcode program.

Ah ok makes sense. I went through the manual. This is a Chinese Servo. They seems decent enough for my application. Model is Ac Servo 220V 110ST-M06030. I have attached the manual but indeed there is a dual mode function. Need to see how to define the pins. Would you mind to post the 2 macros that you use? I guess then I will need to modify the post processor to output those before and after rigid tapping, but that's not a problem.

Thank you!
Title: Re: Mach 3: Programmatic change to config
Post by: joeaverage on May 12, 2021, 06:50:34 PM
Hi,

Quote
Would you mind to post the 2 macros that you use?

My macros are no good to you because they are written in Lua for Mach4.

They are simple though, one macro asserts an output high, and the other de-asserts that output.

Craig
Title: Re: Mach 3: Programmatic change to config
Post by: joeaverage on May 12, 2021, 06:58:14 PM
Hi,

Quote
This is a Chinese Servo. They seems decent enough for my application.

I don't think there is to much issue with these Chinese servos, they seem to operate as they should and while not top quality they are not
rubbish either, entirely suitable for our purposes.

Where I do take issue with these Chinese products is the Chinglish documentation and even more damningly NO  PC based set-up and tuning software.

My advice to users new to servos would be to get a slightly more expensive but better brand like Delta or DMM which have vastly superior
documentation, support and set-up software. Once you learnt how to get the best from that thereafter you'll have no trouble transferring what
you have learnt to the cheaper brands, almost all AC servos are very similar to each other, if you can 'drive' one you can 'drive' others.

Craig
Title: Re: Mach 3: Programmatic change to config
Post by: TPS on May 13, 2021, 02:19:37 AM
depending on your Motion Controller you can run your spindle in step/dir mode as well.
also the servo Controller supports a PZ+/PZ- Signal witch is a single pulse per rev. that can
be used for a index Input. i use this signals on my machines for indexed homing on the Motion axes.
 
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 13, 2021, 07:00:01 AM
Hi,

Quote
This is a Chinese Servo. They seems decent enough for my application.

I don't think there is to much issue with these Chinese servos, they seem to operate as they should and while not top quality they are not
rubbish either, entirely suitable for our purposes.

Where I do take issue with these Chinese products is the Chinglish documentation and even more damningly NO  PC based set-up and tuning software.

My advice to users new to servos would be to get a slightly more expensive but better brand like Delta or DMM which have vastly superior
documentation, support and set-up software. Once you learnt how to get the best from that thereafter you'll have no trouble transferring what
you have learnt to the cheaper brands, almost all AC servos are very similar to each other, if you can 'drive' one you can 'drive' others.

Craig

I agree. Mechanically wise they are good for my purpose, where they lack is support but for me would be like, either this servo or no servo on the spindle so the decision was easy, plus in EU we do not have easy access to most of the deals without add crazy import taxes. I will try to see what I can do with it.
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 13, 2021, 07:02:10 AM
depending on your Motion Controller you can run your spindle in step/dir mode as well.
also the servo Controller supports a PZ+/PZ- Signal witch is a single pulse per rev. that can
be used for a index Input. i use this signals on my machines for indexed homing on the Motion axes.

Yes my plan was to run the spindle in step/dir, but I guess that it's not enough to attempt rigid tapping. The indexinput can be really useful for ATC in case of for example BT30 spindle, or for probing if you want your digitizer probe to be oriented always in the same way when touching the part.
Title: Re: Mach 3: Programmatic change to config
Post by: joeaverage on May 13, 2021, 04:25:41 PM
Hi,
using Mach4 its possible to use either analogue velocity mode OR Step/Direction mode at will.

I can do both, but in truth VERY seldom use Step/Direction, as a free running spindle (analogue velocity) is enough
for my purposes, and analogue velocity mode is SO EASY to use.

I would suggest that unless there is specific reason to employ a more complicated solution then just use plain old PWM
output with the servo in velocity mode, its so simple!

Craig
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 14, 2021, 09:59:42 AM
Hi,
using Mach4 its possible to use either analogue velocity mode OR Step/Direction mode at will.

I can do both, but in truth VERY seldom use Step/Direction, as a free running spindle (analogue velocity) is enough
for my purposes, and analogue velocity mode is SO EASY to use.

I would suggest that unless there is specific reason to employ a more complicated solution then just use plain old PWM
output with the servo in velocity mode, its so simple!

Craig

yes I agree. The step/direction choice was just because I was hoping it could be use for rigid tapping straight away, by relay on the spindle encoder. Since that it's not possible than there is no reason to use it.
Title: Re: Mach 3: Programmatic change to config
Post by: TPS on May 14, 2021, 10:34:49 AM
if you what to use tapping cycle (G84) you must have a spindle index Signal, does not matter wether spindle
in in Step/dir or analog mode.
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 14, 2021, 11:05:34 AM
if you what to use tapping cycle (G84) you must have a spindle index Signal, does not matter wether spindle
in in Step/dir or analog mode.

Yes but then with Mach3 + USS stepper I can only use index input, so 1 pulse/rev, which is probably too low for rigid tapping. If I go with ESS then same thing, since true encoder input is supported in Mach4 only. A possibility is to grab an UC300ETH. That supports true encoder signal in their Mach3 plug-in. The problem then is to find an encoder that can spin up to 7500 rpm (my max spindle speed). Most of the reasonable priced ones are max 6k rpm.
Title: Re: Mach 3: Programmatic change to config
Post by: TPS on May 14, 2021, 11:27:53 AM
IMHO a lot of People do rigid tapping with 1 pulse/rev, i never tryed because my CSLab controller's do tapping only with
Encoder module. try and error will e the only way to figure out.
Title: Re: Mach 3: Programmatic change to config
Post by: rey8801 on May 14, 2021, 11:31:55 AM
IMHO a lot of People do rigid tapping with 1 pulse/rev, i never tryed because my CSLab controller's do tapping only with
Encoder module. try and error will e the only way to figure out.

I will try it for sure. Thanks for the info