Author Topic: Lua: Error occurred while opening file. Is this a problem?  (Read 119 times)

Mark3796

  • Posts: 15
    • View Profile
Lua: Error occurred while opening file. Is this a problem?
« on: August 03, 2019, 09:50:04 PM »
When I run a copy of the PMDX sample profile in Mach4 the history includes the following:

"PMDX: Communication status 'Sync'd to Device'
Lua: Error occurred while opening file
cannot open C:\Mach4Hobby\Profiles\Mark-CNC\Macros\mcLua.mcc: No such file or directory"

I don't get this when I run any of the other Mach4 profiles (I did this to test). Is this a problem? Also, the PMDX doesn't show up as a Motion Device in the configuration menu in the other profiles (Configure/Select Motion Device). It only shows up in the PMDX Sample Profile.
running Mach4 Version 4.2.0.4162
PMDX 411 plug-in version 0.53.263, bootloader version 1.13.73, Firmware version 0.60.208
Is this normal? Or is there a problem here?

Mark3796

  • Posts: 15
    • View Profile
Re: Lua: Error occurred while opening file. Is this a problem?
« Reply #1 on: August 04, 2019, 10:51:39 AM »
Here is a longer version from the Mach4 dialog history:
PMDX: Communication status 'Sync'd to Device'

Lua: Error occurred while opening file

cannot open C:\Mach4Hobby\Profiles\Mark-CNC\Macros\mcLua.mcc: No such file or directory

Home switch Y Home tripped!

Home switch X Home tripped!

Home switch Z Home tripped!

E-Stop condition!

E-Stop is in effect! Clear the E-Stop condition.

Clear E-Stop!

Clear E-Stop!

Clear E-Stop!

E-Stop cleared!

Lua: Error occurred while opening file

cannot open C:\Mach4Hobby\Profiles\Mark-CNC\Macros\mcLua.mcc: No such file or directory

E-Stop cleared!

PMDX: No synchronized position from motion planner

E-Stop cleared!

PMDX: No synchronized position from motion planner

PMDX: DEVICE ERROR 'SYSTEM ERROR(7): Motion Calc Underrun'

12strings

  • Posts: 158
    • View Profile
Re: Lua: Error occurred while opening file. Is this a problem?
« Reply #2 on: August 04, 2019, 09:56:58 PM »
Your 2nd question first - Motion devices only appear in the "Configure"->"Select Motion Dev" dialog if their plug-ins have been enabled in the "Configure"->"Mach" dialog on the "Plugins" tab.  That is why the PMDX device only appears in your profile derived from the PMDX sample profiles.

As for the Lua error...  beats me.  Do you have ANY files in that macro directory?  The "mcLua.mcc" file is the compiled version of all the "*.mcs" files in that directory, except for "load_modules.mcs".  Is it possible there are screwy file permissions on that directory?  Can you create a new file in the macros directory?  Otherwise, this is a question for the MachSupport forums.

Mark3796

  • Posts: 15
    • View Profile
Re: Lua: Error occurred while opening file. Is this a problem?
« Reply #3 on: August 05, 2019, 11:30:34 AM »
Hi 12strings,
I think that was the most helpful reply I've had with this!
I made a copy of the Mach4Mill profile and then enabled the PMDX on the Configure->Control->plugins tab. I hadn't thought of doing that. I don't get the message now. It's 1.30 am on a cold winter's night here in Melbourne, Australia, so I'm going to try this out in the morning. But I was getting that error all the time with the copy of the PMDX sample profile.
BTW, which profile would you recommend for a three axis CNC router? Mach4Mill or Mach4 Router?

Cheers!

12strings

  • Posts: 158
    • View Profile
Re: Lua: Error occurred while opening file. Is this a problem?
« Reply #4 on: August 06, 2019, 12:21:40 AM »
Ummm... I can spell r.o.u.t.e.r but I've never run or even looked at that profile.  But putting all my years of schooling to good use, I'd guess start with the router profile if you are using a router????

Mark3796

  • Posts: 15
    • View Profile
Re: Lua: Error occurred while opening file. Is this a problem?
« Reply #5 on: August 09, 2019, 11:33:17 PM »
Hi 12strings,
Thanks for all your patience and help. I finally got the machine running. Bit of fine tuning to go, but it works a treat.
Oh, and the PMDX411 is sweet!
https://youtu.be/vLdB0obilP4
Cheers
Mark