Hello Guest it is April 20, 2024, 07:07:31 AM

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

801
well how about this I needed a code what will run under a type of state

be it a key board key connected to input 0 through the key board plug so when you pouch it, it stop`s the machine running only when the machine is enabled and a Gcode is running

or a key on the keyboard that will zero all axis connected to input 1 through the keyboard plugin having it working only when the machine is enabled and no Gcode is running

the other way is how I have the Estop key done input 3 through the keyboard plugin it is on a key on the keyboard and I have no extra code with it what means it will work anytime the machine is on but it wont enable the machine just disable it I have it set in M4 config under inputs as Estop keyboard at input3 in keyboad plug its Estop, selected key

so there is two types of state code needed, one when enabled only, one where if the machine is enabled and a Gcode is running it wont work, but will work when a Gcode is not running and the machine is enabled

setting a screen button to idle under machine state does stop a screen button from working when a Gcode is running its the simple way of doing it I tested it with the Estop screen button it did not work when a Gcode was running it did when no Gcode was running.

your fragment is not quite the correct fit for this yes the code will have to go in the PLC for different state control of the non screen buttons

this is with a keyboard only nothing else setting a key to a action in the keyboard plug tyed to a input in M4 inputs.

when it does not matter what state the machine is in it does not need any code, unless you needed it to change the state of the machine.

the other blocks will know how to do it they just give hints here and there, daz may well have worked it out I am not 100% sure how I wont to go about it yet so I cant be more clearer than what I have put above

802
I am not meaning using it for a on screen button yea you set it to idle under machine state to stop a button working when a Gcode is running

its to help work out a code so a button not on screen can be deactivated when a Gcode is running

this is about pendant`s not screen buttons your codes for modbus you can use a key sniffer type of pendant with out using modbus that what a keyboard is button bla,bal being pushed means do this

so what i have done is I have a key on the keyboard that puts the machine in estop what needs to run all the time, and i will have a button on the keyboard that zeros the dro`s i would not wont to nock it when the machine is running it. needs a code to stop the keyboard key working when a Gcode is running.

if there a another way to do it I am all ear`s

804
Mach4 General Discussion / Re: Zero All
« on: May 16, 2015, 08:18:32 PM »
Make a new button in the editor and use something like the code below to zero DRO`s

Code: [Select]
local inst = mc.mcGetInstance()
mc.mcAxisSetPos(inst, 0, 0);
mc.mcAxisSetPos(inst, 1, 0);
mc.mcAxisSetPos(inst, 2, 0);
mc.mcAxisSetPos(inst, 3, 0);

DazTheGas

bang on put it in a button as it is and it works

805
I think everyone that has created screens is sitting on them waiting for someone else to post theirs FIRST (;-)
correct


806
you just need to find what the code is for pushed do this when not push stop it will go in clicked script

807
thanks daz its working as it should

808
yep can you send me a copy i deleted it

809
if you have version 2441 don't bother it wont work

810
with the new version of M4 key mapping is not working just tried setting a key to a input it would not work last version it worked fine I had input 0 mapped to this key` for probe on, off with that key.

the example is here http://www.machsupport.com/forum/index.php/topic,27129.0.html