Hello Guest it is April 28, 2024, 06:00:47 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TomL21

Pages: « 1 2 3 4 5 6 »
21
VB and the development of wizards / Need help: VB macro compile error
« on: July 25, 2013, 06:39:06 PM »
I'm in the last stages of a Mach3 retro on a machine that I had running ok under the Industry Controls version of Mach3.  Everything is pretty much up and running except the tool changer.  I edited the m6start macro that I used in Industry Controls  to work in Mach3, there are some very slight differences.  Also in the conversion the a axis became the c axis.  The macro runs fine from the VB window, both stepping through with F7 and running with the play button.  However when I call an M6 from Mach I get a compile error in the message window.  Any ideas?  This was a running macro.  The changes made were removing a door interlock, changing a to c, changing an m code for enabling position control of the spindle, changing "codesingle()" to "code()" in all instances.  I think that's it for changes.

Any help is greatly appreciated.  Thank you.

TOM

22
dspMC/IP Motion Controller / Re: Need Help! DSPMC Setup
« on: April 26, 2013, 11:34:50 AM »
Update:

Moved the brake control back to the servo drive.  Switched the servo drives over to speed control vs torque control.  I'm actually getting much better motion now, I can have less following error at higher accelerations and velocities, very good!  And because the servo is in speed control mode a zero signal means zero speed, so the drive will essentially maintain position without input from the dspmc.  This also provides some overlap with the brake and servo power so the z axis doesn't drop 2 inches when Reset is hit.  The only issue now is why when estopped the servo drive holds the brake output on (which means brake is off) cause the z to descend in an estop condition.  For now I just won't estop the drive, the servo enable signal from mach/dspmc kills the servo in that state anyways.  I have an email into delta on that one.

So, with that hurdle hopefully tackled, onto getting this tool changer program working!

I still think that being able to delay the PID loop in the dspmc is a great option to have tho, if it's capable of it.

23
dspMC/IP Motion Controller / Re: Need Help! DSPMC Setup
« on: April 25, 2013, 09:52:28 PM »
If it's doable that would be perfect!!

24
dspMC/IP Motion Controller / Re: Need Help! DSPMC Setup
« on: April 25, 2013, 07:15:05 PM »
When setting up the brake it would be nice if the brake would stay on just a little after the drive enable comes on and if the brake would come on instantly the moment the drive enable goes off/estop/limit switchkicks in.

The question I have is when an e-stop condition is detected, is there a time lag between the PID drop out and the drive enable drop out?

Mike

It seems that it is nearly instantaneous off and on.  On doesn't seem to be an issue, I need a bit of time from output off to pid off.  Would be nice to have either option as I can see both being needed.  Hopefully it's something doable in the firmware, otherwise I'll have to find another way.

25
dspMC/IP Motion Controller / Re: Need Help! DSPMC Setup
« on: April 25, 2013, 05:01:02 PM »
Right.

And I don't think the controller is doing it wrong, just not the way I need it to.  The drive electronics allow for an adjustment of overlap time to compensate for latency in the relay and the brake itself.  With the current setup there is no overlap, which allows the z axis to drop.

26
dspMC/IP Motion Controller / Re: Need Help! DSPMC Setup
« on: April 25, 2013, 04:32:51 PM »
Output energized is brake off.  So the second one is what I did.  43 is actually the brake, I was using 44 to test the macros as nothing is attached to it, less risk :)

27
dspMC/IP Motion Controller / Re: Need Help! DSPMC Setup
« on: April 25, 2013, 04:28:41 PM »
Still get the Z Axis drop.  Some one out there has to have experienced this before, anybody?!?!

Rufi, the servo drive usually has a setting to advance or delay the on/off of the brake output with respect to the servo being on or off.  On these deltas the offset can be as much as 1 sec.  Is there any way that there can be an output selected to be a "brake" or otherwise special output that turns off with a set advance of the pid loop.  Or add an option to have the PID loop shut off a bit late compared to the outputs in an estop/reset/error event?  This would solve the issues.  It could even be only on one axis, doesn't have to be all 8, or a selectable number of axes.  I don't know what this would entail in the plugin/firmware, I'm sure its not as easy as it sounds, but I'd think would make for a better solution.

Should I not have the servos in torque mode as was suggested earlier?  I had a much harder time getting any motion in speed mode, but I wonder if that would work better as the Z shouldn't drop as it would be trying to maintain zero speed rather than zero torque.  Thoughts/experiences on this?

28
dspMC/IP Motion Controller / Re: Need Help! DSPMC Setup
« on: April 25, 2013, 04:13:08 PM »
Ok, will try that.

Just had this one in and working, basically the same thing using an If statement.  I still get the Z axis drop when the pid goes off tho, not good.

1000
If GetDSPData(35) = 1 Then SetDSPData(43, 1) Else SetDSPData(43, 0)
GOTO 1000

29
dspMC/IP Motion Controller / Re: Need Help! DSPMC Setup
« on: April 25, 2013, 03:13:42 PM »
Getting closer now, had to take a break from the machine for a bit due to changes in my day job.  Back at it now.  I'm getting closer with the axis tuning, but still not quite perfect.  The spindle working as an axis is buttery smooth, I love it.

Still working on this Z axis brake issue.  Trying to write a DSPMacro to turn the output on when the pid is on and the output off when the pid is off.  It does not seem to be working for me though.  I tried simple and best I could get was a flash on the output led when I hit the Run/Stop button in the macro loader.  I've gotten a little more complicated in the macro and can get the output to stay on but only when I hit the Run/Stop button.  With the autorun on I get no changes in state of the output when I hit reset in Mach or arm/disarm the pid like I would expect to see.  Looking for some suggestions from seasoned DSPMacro users.

This is what I currently have loaded in the dspmc:

SetDSPData(44, 0) :REM Turn off brake output
1000
IF GetDSPData(35) = 0 Then GOTO 1000 :REM PID State
 SetDSPData(44, 1) :REM Turn on brake output
 Print "Brake output on"
1001
IF GetDSPData(35) = 1 Then GOTO 1001


Here is another version that I tried:

PID = GetDSPData(35)
If PID = 0 Then GOTO 2000 :REM PID State
1000
SetDSPData(44, 1) :REM Turn on brake output
Print "Brake output on"
GOTO 3000
2000
SetDSPData(44, 0) :REM Turn off brake output
Print "Brake output off"
3000
Print "Output State = "; GetDSPData(44)

30
dspMC/IP Motion Controller / Re: Need Help! DSPMC Setup
« on: April 12, 2013, 08:39:48 PM »
Oh.  Mis understood that then.  Either way it works good!

Pages: « 1 2 3 4 5 6 »