Hello Guest it is May 18, 2021, 05:35:37 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.

Topics - TonyMemphis

Pages: 1
Mach4 General Discussion / Default Jog Speed/Rate Value?
« on: September 17, 2020, 04:31:54 PM »
I'm using the Avid CNC setup on one of their Standard machines. 

I'd like to have the Jog rate set at around 35 or so as my default.  I have been searching all around trying to find how that is set.  I saw on the screen close script, there is a save to the Machine.ini file. But for some reason, that doesn't always save the current setting.  I manually changed the value in the ini file and that works, but if I change the rate on the screen, then close, it doesn't get saved.  Any ideas?  Thanks!


Mach4 General Discussion / Cycle Time Display
« on: May 18, 2020, 11:29:56 PM »
I'm using the Avid set...  There is a text box that displays the cycle time.  I managed to find the function in the PLC script that sets the value there if the machEnabled variable is 1.  My issue is that I want to see the cycle time when after the G code is complete, but the value is set to zero before I can see it.  The script only changes the value is the machine is enabled.  I can't figure out how the value gets changed back to zero?  The text box has an event set "On Update Script," but I'm not sure what that means and I can't find it mentioned anywhere. 

If I can figure this out, I may have a text box display the last cycle time and a double click event to clear it to zero or something like that. 

I wish there was some better documentation of this stuff.  I have searched and looked at the help file before I bothered asking.  I appreciate the help.

Any ideas? 


Mach4 General Discussion / Toggle Machine Coordinates from a script
« on: February 13, 2020, 01:06:10 PM »
Sorry to keep asking...the lack of documentation makes this stuff pretty frustrating.  I really appreciate your help!  Thank you!

So, I've been doing a lot of digging, but not found a solution.  I want to make sure I am in in Machine Coordinates modes and that the DRO's display machine coords before I start a procedure.  I can check the state using OSIG_MACHINE_CORD and that works.  But how to toggle the,m if they are on Work Coordinates?  Back to my VB days, I thought I'd just click the button but I read that is not a good method and I couldn't get it to work. 

In my playing, I found that the Machine Coordinates On action doesn't work?  Off works and Toggle works, but On doesn't.  Wasn't sure how to do that from the script anyway. 

Any ideas?  Do I need to change the signal?  Will that toggle the screen DRO's and button?  I haven't tried that sort of thing yet.


Mach4 General Discussion / How to determine enabled/disabled state?
« on: February 11, 2020, 12:15:49 PM »
Just wondering how I can determine if the Enable/Disable button is enabled?  For example, when I click a button that involves a move, I thought I might check and see if the enable button is down before I even try to move.  Maybe flash a message - "Hey dummy...."

I am new to this so I don't really understand how all the parts work, so thanks for your patience and effort to teach me.  I really appreciate it.  I do a lot of looking before I post, but I haven't had any success with what I was trying.  I read about GetState and it reports the state of the controller, but I wondered what that enable button really is doing?

I thought that the GetState request would tell me, but all I ever get is that the machine is idle, so I thought maybe I'm asking the wrong question? 

I tried this code this morning.  All I got was a state of 0 regardless of the state of the enable button.  That's when I thought hmmmm....

Code: [Select]
local mcState, rc = mc.mcCntlGetState(inst)
if (mcState == mc.MC_STATE_IDLE) then
msg="Machine is IDLE  "..mcState
msg="Machine is not idle  "..mcState


Then reverted back to my VB days and wondering if I could just figure out the property of the button (up or down)?

Thanks for any help. 


Mach4 General Discussion / How do determine if Gcode move is complete?
« on: February 08, 2020, 11:08:56 PM »
I understand the Gcode execution options (I think).  If I use the wait option, nothing happens until its done but the DRO's are not 'live' during the move.  If I don't wait, then how can I determine if the move is done?  I want both - I want the DRO's to be live during the move and I want to know the move is done so I can flash a message upon completing the move. 

I found the IsStill inquiry, but I'm also read some posts that it may not be working.  In Mach3, it was easy. 

For example, I wrote a script that moves to G53 -0.5.  I use that in a button to get the router out of the way with one click so I can do whatever.  Its very handy.  I'd like to see the DRO change as it moves (just 'cause) and I'd like to flash a message when it gets there or play a sound.  Right now, the finished message is displayed while it is still moving.



Mach4 General Discussion / Playing a sound in a script?
« on: February 06, 2020, 10:21:35 PM »
I am trying to play a sound in a script.  I tried several examples that are all basically the same.  Nothing worked.  I get no errors when debugging or when I click the button I created.  I am using the Avid configuration if that makes any difference. 

Just wondering if I am missing something?  Just getting started with Mach4.

This is one of the things I tried:

local logoff = wx.wxSound('C:\\Mach4Hobby\\Sounds\\logoff.wav',0)




Pages: 1