Hello Guest it is April 18, 2024, 09:13:11 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 - beezerlm

Pages: 1 2 3 4 5 6 »
1
Sorry for late reply.  Lots of fires to put out lately!

I wrote this code 4 years ago so I am rediscovering how it works now ;D. I found out my code relies on mc.mcCntlIsInCycle(inst) = 1 to function properly.   The PLC script operates a pneumatic axis that reciprocates.  It uses a linear scale to determine when to change direction.  The grinding wheel outfeeds when at the end of the stroke.  I use mc.mcCntlIsInCycle(inst) to ensure outfeed can only happen when the cycle is running.

Running the M100 in MDI mode does not change mc.mcCntlIsInCycle(inst) to a value of 1.  I changed the code to use OSIG_RUNNING_GCODE = 1 and it appears to be functioning properly again  :).

2
Any suggestions on how I might troubleshoot this? 

3
Mach4 General Discussion / Mcode Macro works in program but not MDI?
« on: March 26, 2020, 04:57:11 PM »
I have a macro M100 that I use to control a grinding cycle.  It checks the user input and outfeeds a grinding wheel until the total grind amount is reached.  If I make a program:

Code: [Select]
M100
M30

The macro program runs fine.  But if I just call M100 from MDI, the macro starts but never outfeeds the wheel. The wheel outfeed is done in the plc loop like this:

Code: [Select]
local g_code = ""
g_code = g_code ..string.format("G0 G91 A%.4f\n",cut_amount)
mc.mcCntlGcodeExecute(inst, g_code)

The macro and plc loop both read from and write to Gregister values for this cycle to work.  This used to work properly in a much older version of Mach4. Currently running version 4300

Can anyone give me an idea as to what would cause differing behavior like this?  I would expect M100 to do the exact same thing running in MDI or as a Gcode program?

4
Mach4 General Discussion / Re: Problems - Win10 update + PMDX_424 + LUA
« on: February 17, 2020, 10:34:56 AM »
Quote
Keep in mind that Mach4 will try to compile ALL of the LUA files in the folder, even if you don't think you are using it. Perhaps there is one that you were not expecting to be using, and it contains LUA code that is for a newer or older version of LUA. Re-installing Mach4 will NOT remove any custom LUA files from the previous install, so they could be laying about.

When re-installing Mach4 and PMDX plugin, I made sure to delete the PMDX-424-SAMPLE profile along with the wx4.set files to be sure the stock/unaltered files were created. I just did it again for good measure and achieved the same result. The files in the macro folder appear to come with the stock PMDX-424-SAMPLE profile. I have attached the newly created "Macros" folder for the PMDX-424-SAMPLE profile as a zip file.

Quote
The easiest way to find the problem child is to launch mach, then choose Operator->Open Script Editor.  Then open up EACH .mcs file in your macro directory and compile it.  The compile option is under the Project menu of the Zerobrane editor.  Eventually, you will see a file give an error there.

I opened each .mcs file and selected compile.  No errors occurred during compilation.  I still get "Lua: Error occurred while opening file" error when starting Mach4.  I also still get "PMDX: Encoder mode has index, cannot set Encoder Position" if I enable an encoder (A&B no index) in the PMDX plugin.  User has full control of the profile & macro folders. Could there be another script file somewhere causing an issue?  Maybe with the stock wx4.set file?

Quote
i use pokeys with 4 or 5 axiss no any problem ,but please tell me yours problem in few words so i can tell you if i think its can support you

Machine is a Moore G-1000 (G18) Jig grinder.  Removed old control and installed Mach3 in 2009.  Updated control software to Mach 4 in 2016.
X and Y axis are just basic linear axis to move the table.
Z axis is reciprocating pneumatic axis.  PMDX encoder input is used to monitor Z axis position.  Custom screen has upper and lower position limit input for the operator.  The PLC script polls the position and reverses direction when the limit is reached.
A axis ( I call this "U" axis ) handles infeed/outfeed of the grinding wheel. This axis is controlled programmatically through a custom Mcode.

5
Mach4 General Discussion / Re: Problems - Win10 update + PMDX_424 + LUA
« on: February 14, 2020, 02:42:18 PM »
The permissions appear to be correct. There are no other errors.  I call the Axis "U" because it is a linear secondary axis for the outfeed of a grinding wheel.

6
Mach4 General Discussion / Re: Problems - Win10 update + PMDX_424 + LUA
« on: February 14, 2020, 07:39:36 AM »
Well....  Can someone recommend a different motion controller that has the same capability as the PMDX-424?   I need to get this machine running again and I can't seem to get any answers as to what would cause this error message.  I have tried everything I can think of.   :(

7
Mach4 General Discussion / Re: Problems - Win10 update + PMDX_424 + LUA
« on: February 13, 2020, 08:59:53 AM »
Today I uninstalled the PMDX plugin and mach4 and tried a complete fresh install of Mach 4300 and the latest PMDX_424 plugin.  When I tried to open the PMDX_424 sample profile this error occurred:

Code: [Select]
Lua: Error occurred while opening file
cannot open C:\Mach4Hobby\Profiles\PMDX-424-Sample\Macros\mcLua.mcc: No such file or directory


I then opened the stock mach4 mill profile and did not get the LUA error.  I configured the PMDX424 as the motion device and set the encoder as channel A&B no index.  I get the same PMDX Encoder error when manually moving Z axis:

Code: [Select]
PMDX: Encoder mode has index, cannot set Encoder Position
I can't for the life of me figure out what is causing this error? This is a fresh install with stock settings/profiles.

8
Mach4 General Discussion / Re: Problems - Win10 update + PMDX_424 + LUA
« on: February 12, 2020, 09:57:51 AM »
I have X,Y,Z and A ( I call this "U" ) axis.

I loaded the stock wx4 screen and got the same PMDX XY Homing Error.  I disabled Z & U axis and then the machined would home X and Y without error.  I then re-enabled Z & U axis and the machine homes fine now.  Almost seems like it was a stuck register value, although I still haven't been able to load my custom screen so I might not be out of the woods on that yet.

I am still getting the "PMDX: Encoder mode has index, cannot set Encoder Position" error whenever I move the Z axis.  I have the encoder set to just read A&B channels with no index. When I first start Mach 4, If I look at the real time IO for the PMDX424, It always says "Disabled" for the encoder position register.  If I change encoder settings, then change them back, the real time IO register view shows a count as it should.  If I exit the configuration settings and go to Mach4's Diagnostic dropdown and then select the real time IO view, it appears to count the encoder as though it's reading RPM instead of just counting?  If I go to the register diagnostics for SmartBOBUSB/EncoderDRO the value is always blank and I can never manually enter a value here.  The encoder mode error when Z is moved is persistent throughout all of this also.   

Also,  I think my custom screen Lua error message is due to a null value at the SmartBOBUSB/EncoderDRO register.

 

9
Mach4 General Discussion / Re: Problems - Win10 update + PMDX_424 + LUA
« on: February 10, 2020, 09:55:44 AM »
Well I loaded the stock wx4.set screen and the lua error went away.  Can you tell me in more detail the best way to replace my old screen set Lua code with the new Lua code from the latest std screen?  I would really like to avoid rebuilding my custom screen if possible.

I am still getting PMDX errors when attempting to home the machine:

Code: [Select]
PMDX: X-axis homing error, missing or invalid home switch configuration
PMDX: Y-axis homing error, missing or invalid home switch configuration

Also when moving the Z axis (Z is pneumatic/manual but uses SmartBOBUSB/EncoderDRO for encoder feedback) I get this on every encoder count:

Code: [Select]
PMDX: Encoder mode has index, cannot set Encoder Position
I have not changed any pin configurations at all, so I am unsure why these errors have emerged?

10
Mach4 General Discussion / Re: Problems - Win10 update + PMDX_424 + LUA
« on: February 08, 2020, 08:31:46 PM »
Will do next time I'm at the shop.

So what would be the process of updating my old custom screenset?

Pages: 1 2 3 4 5 6 »