Hello Guest it is April 27, 2024, 12:33:09 PM

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 - bob_at_pmdx

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 »
51
Mach4 General Discussion / Re: Random Fixture Offsets
« on: May 25, 2016, 10:19:48 AM »
If I hit Reference All, it 0's out the machine coordinates without moving an axis. IE: references in place, but I don't have motors connected either.  Axes are enables so DRO's will move, but mo motors or motion controller connected.  Seems like there should be a function to set machine zero to current position.
If the simulator is your motion device, that is how it performs a 'home": it simply pauses for 1 second and then sets the axis position to zero.

If you are using a real motion device and do a "reference all axes (home)" and nothing moves (or the DROs don't indicate any motion since you have no motors connected), it sounds like either no home switches are configured, or you have the "Home in Place" column checked in the "Homing/Soft Limits" tab of the configuration dialog.

As far as setting each axis to zero, use the mcMotionSetPos() function.  That not only sets the DRO to zero but (more importantly) tells the motion planner that the axis is at zero.  Otherwise, as you've seen, Mach updates the offsets so that "DRO + offset" equals the motion planner's idea of the position.

Bob

52
Scott

I've looked at the profile that you posted on our forums (http://www.pmdx.com/PMDX-Forums/index.php?topic=270.0).  There are a couple of things:

(1) You put your code in the "Signal Script".  It belongs in the "Screen Load" script.  Edit your "Signal Script" and remove everything so that it looks like this:
Code: [Select]
-------------------------------------------------------
--  Signal Script
-------------------------------------------------------

if SigLib[sig] ~= nil then
    SigLib[sig](state);
end

(2) Open at the "Screen Load" script.  THAT is where your code needs to be.  And that is where there is already an example of exactly what you want.  See Chaoticone's post above.  You just need to un-comment 3 lines in the existing [mc.ISIG_INPUT1] section.

Note that the sample code calls CycleStart(), which is a Lua function that you will find further down in the "Screen Load" script.  It does not call mc.mcCntlCycleStart() directly because there are other things that need to happen, like figuring out if the GUI is in an MDI window or if it should run a GCode file.

Bob

53
Mach4 General Discussion / Re: Mach4 Axis Calibration...
« on: May 13, 2016, 10:14:35 AM »
In case people want other helpful videos, a reminder that this link is the one referenced in the "Mach4 Videos" sub-section of this forum under the title "ESS and Mach4 Setup" here:

https://www.machsupport.com/forum/index.php/topic,29878.0.html

54
Adding a little more (very basic) detail to DazTheGas's post:

First make sure you are using the wx4 screen set, or one derived from it.  The wxMach screen set does not have the code to support the signal scripts.  If you started with a PMDX sample profile you are using the wxMach screen set unless you specifically changed that (this will be changed in our next release).  To change screen sets go to the "View" menu and select "Load Screen".  In the file selector dialog, change into the "Screens" directory and select "wx4.set".

To edit the screen go the to "Operator" menu and select "Edit Screen".  The FIRST THING you should do is save this screen set to a different name!!!  Otherwise, when you install a new version of Mach4 it *may* overwrite the default wx4.set screen set and you will loose all of your custom changes.  To save the screen set, go to the "Screen" menu (while in the screen editor) and select "Save Screen As".

To get to the startup script, in the upper left corner of the screen is a section labeled "Screen Tree Manager".  Click on the top-most line, which should be the name of your screen set.  Then in the lower left corner of the screen is a section labeled "Properties".  You will see 3 icons, the middle one has a lightning bolt in it.  Click on that one to show the scripts.

There will be 4 scripts listed:
Screen Load Script - Initializes various variables, defines various helper functions and defines the "signal library", which is really just an array of functions indexed by signal names.  This is where you will place your code for processing the switch input.

Screen Unload Script - Add any code for clean up of saving of custom data.  Usually empty.

PLC Script - This script runs periodically (every 50 ms by default).  This is NOT normally where you would put code like you want for processing a switch input for "Cycle Start".

Signal Script - calls code in the screen load script for any change in a Mach4 signal.  Normally this script does not get changed.


To edit the code for any of these scripts click on the script name (or next to the name), then click on the little box that appears at the right-hand edge of that line.  There is already commented-out code in the "Screen Load" script in the section for Input1 (mc.ISIG_INPUT1) that you can use as an example starting point for your code.

Bob

55
Mach4 General Discussion / Re: Mach4 Printer Port Discussions
« on: May 10, 2016, 01:21:38 PM »
I don't know the specifics of the Darwin driver, or whether it supports out-of-band motors.  But in general, to config a stepper motor as a spindle motor you need to map one of the motors to an "out of band" asxis (i.e. "OB1" to "OB6") instead of "X", "Y", etc.  For example, map "Motor3" to "OB1".  Then go to the normal motor config screen to set the tuning params for "Motor3".  Then go to the "Spindle" tab.  Down at the bottom select the "Step/Dir Spindle Axis" check box and select "OB1" in the drop-down list.  And make sure to set the min/max RPM values.

Fill in Darwin-specific config stuff as appropriate.

Bob

56
OK - I am confused.  I had presumed that the previous post by Vandabrackin was him trying to help Pedio and he had somehow gotten config and GCode files from you (Pedio).  Is that the case?  Or are there (still) 2 threads of conversation in this topic - one from Vandabrackin and the other from Pedio?  Sorry - it's been a long week.

Because...  the post from Vandabrackin shows an "S2000" command, while Pedio's spindle config shows a max RPM of 100.  While it won't (well, *shouldn't*) cause any harm to issue an "S2000" with max RPM at 100 (Mach4 will limit the RPM to the max value), there should never be a speed request of 2000 if your max in 100.

So before I try to offer any (hopefully) helpful suggestions, is this 2 problems from 2 people?  Or is the latter part of this thread solely about Pedio's problem?

57
Look at the spindle config tab (Configure->Mach, then click on the "Spindle" tab).  What are your "MaxRPM", "Accel Time" and "Decel Time" values set to (on the top line, labeled "0")?  Do you have some Lua code and screen button that changes the spindle range?  Better yet, can you post your Machine.INI file (or even a "profile package").

FYI - If the "Accel Time" is non-zero, Mach4 calculates how long to delay after an M3 or S command by something like this:

   delay = ((NewSpeed - OldSpeed)/MaxRPM) * AccelTime (or DecelTime, as appropriate).

So, for example, if your MaxRPM = 10000 and Accel Time is 5 seconds, your "M3 S2000" command will delay ((2000 - 0) / 10000) * 5 = 1 second.

Bob

58
Try this with the SIM (simulator) plug-in as the motion device.  Do you still get the deref when you load the GCode file?

Bob

59
Mach4 General Discussion / Re: Mach 4 Device Error
« on: May 08, 2016, 11:28:37 PM »
See the original thread on the PMDX support forums:

http://www.pmdx.com/PMDX-Forums/index.php?topic=268.0

Bob

60
Mach4 General Discussion / Re: A axis operation in Mach4
« on: May 08, 2016, 12:44:28 AM »
As far as Mach4 and the PMDX-411 are concerned, you shouldn't need to reset/restart them periodically.  A wild guess here but could it be possible that the microstep settings on your driver didn't "take" until power was cycled on it???  The manual for the DM542 doesn't explicitly say whether the DIP switch setting take effect immediately or require a power cycle to take effect.

If you have "rollover" enabled, Mach4 will limit the motor's rotation to a single 360 degree range. If you move to 30 degrees, then move to 300, it will NOT continue if the positive direction.  It will instead go backwards through 0 degrees, then to 359, 358, etc. until it gets to 300.  I believe for your application you need to disable "rollover".

Bob

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 »