121
Mach4 General Discussion / Re: Mach4 screen GRAPHICS -- makin' it Purdy
« on: March 18, 2015, 10:10:37 AM »
Size limitation required a second post for the second video . . . .
Second: demonstrates a simple context sensitive control. The two sliders are for RPM and SFM and can be set from the dro or the slider or a macro. They work in real time so moving the slider changes the rpm of the 4th axis while it is running. the SFM slider is only active in 'AutoSpeed' mode and the RPM slider is only active in 'SetSpeed' mode. Since the controller takes it's data directly off the dro, it is not possible to change the spindle speed using the wrong method. ex. setting 1000 SFM could result in an entirely different speed than 1000 RPM.
Note that any monitoring task, so far as I can determine, must be run in the PLC script. Working in this script should be done with consideration for how much processing power you are consuming with your script and keeping in mind that you should not loop anything as it can easily get into a 'deadly embrace' wherein whatever need to happen to break out of the loop . . will never happen while in the loop.
Question: I can find no way to create a variable in the PLC script that will not be reinitialized on each running of the script. It seem that rather than loping within the script, it runs from the beginning each time. I suppose this might be good in some ways, but having no variables to carry data forward to the next run is uber inconvenient. As a work around, I am using a gReg to carry forward a simple counter that controls the speed of the flashing on the dro.
Does anyone know how to create a var that will not be reinitialized? Lua syntax to create a variable is: var ::= name, but that does not work in MACH4. I have been unable to figure out how to create a variable without initializing it.
Second: demonstrates a simple context sensitive control. The two sliders are for RPM and SFM and can be set from the dro or the slider or a macro. They work in real time so moving the slider changes the rpm of the 4th axis while it is running. the SFM slider is only active in 'AutoSpeed' mode and the RPM slider is only active in 'SetSpeed' mode. Since the controller takes it's data directly off the dro, it is not possible to change the spindle speed using the wrong method. ex. setting 1000 SFM could result in an entirely different speed than 1000 RPM.
Note that any monitoring task, so far as I can determine, must be run in the PLC script. Working in this script should be done with consideration for how much processing power you are consuming with your script and keeping in mind that you should not loop anything as it can easily get into a 'deadly embrace' wherein whatever need to happen to break out of the loop . . will never happen while in the loop.
Question: I can find no way to create a variable in the PLC script that will not be reinitialized on each running of the script. It seem that rather than loping within the script, it runs from the beginning each time. I suppose this might be good in some ways, but having no variables to carry data forward to the next run is uber inconvenient. As a work around, I am using a gReg to carry forward a simple counter that controls the speed of the flashing on the dro.
Does anyone know how to create a var that will not be reinitialized? Lua syntax to create a variable is: var ::= name, but that does not work in MACH4. I have been unable to figure out how to create a variable without initializing it.