Hello Guest it is April 24, 2024, 07:12:32 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 - fer_mayrl

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 »
321
I just found out another thing,

If I press the button for the oemtrig 3 times, i find that it runs the script 2 times, and when the first script finishes the message box pops up, and does not run the script the third time... Same thing happens if you press the button 5 times, it runs 2 times and 3 message boxes pop up.
So the If then else script works fine, except for the second time, more than two times and it works fine.
Regards
Fernando

322
Afer talking to Art we think it is best that you put code in your macro to see IF the macro should be run. It is very easy to add code that looks at the state of an LED and figure out if the macro should run. so lets say that your macro loads a Gcode file and runs it SO at the start of tha mcaro you should look and see if there is a job running. Here is an example:

Sub Main()

if (GetLED(4)) Then'This is where the Macro is told not to run if there is a job running
MsgBox("Could Not load there is a Job running")
Exit Sub
End if

'TODO add Macro code here

Main

This is more work but gives you more power in the end...

Ok I tried this and it said compile error syntax error. So I tried some other way, like this:

If IsMoving() then
MsgBox ("Cant do it, its moving")
else
Code "F100"
Code "G01 x10"
Code "G01 x0"
Code "G01 x10"
Code "G01 x0"
End If

And while debugging in the VB editor, it works, if the machine is moving, the cycle displays the message and ends, but when I do the actual test, it doesnt work, it sometimes displays the message, and still move, and sometimes it just moves without displaying the message.
Dont know whats going on
Regards
Fernando

323
I dont know if this would be possible, practical or even reasonable or easy enough to implement...

If when an input or an oemtrig is activated via a switch (button, limit switch or whatever) The keystroke or hotkey related to that input can be emulated, then a button on the screen which is related to that hotkey would be run.
For instance:
If I have OemTrig #1 set to port 1 and pin 10 and assign the hotkey Q (81) to that trigger, then every time the pin 10 is grounded Mach will know when that trigger has been activated, then mach can emulate that keystroke. If that is done, a user button that has a script within can be assigned to hotkey Q(81) and the script would run everytime pin 10 is grounded.

Regards
Fernando

324
Thanks a lot Brian,
I guess meanwhile a keyboard emulator would have to do the trick along with a scripted button.
And maybe a set of one shot relays to avoid the buffered commands.
Thanks again
Fernando

325
Thanks a lot Brian,
Any thoughts on the other two questions?
Regards
Fernando

326
Ok, i tried what I posted on my previous post and it doesnt work, so I tried Brians way and it works!
3 Questions though.

1. The M450 macro does not run unless you run the M451 first, how can you make the running of M451 automatic at startup or some other time as for the user no to do it each time Mach3 is loaded.
2. What happens if you want to use more than one external button, what OEM codes (like the 301) and what macro numbers like the (M450 and M451) should be used for each OEM trigger?
3. I noticed that if you press the button the script starts to run, and if you press it again while the code is running, as soon as the first code is finished a second code starts to run. How can this be avoided?

Best Regards
Fernando

327
I think this should work...

In the Ports and Pins config menu, go to inputs, select an input or an OEM trigger, put your pin and port settings for the switch you are using, and assign a hotkey to that input. Now go and create a button on screendesigner, make that button run the sI thicript you want and assign that buttin the same hotkey you set on the input ports and pins. I think its in the ScanCode box. Now if you dont want that button to show up on your screen use screen designer to drag the button out of the workarea.

I think that might work, havent tried it, please let me know.
Regards
Fernando

328
General Mach Discussion / Re: parallel port pinout
« on: June 23, 2006, 10:17:06 PM »
I think I had already posted it... www.ms-motor.com they come from china

329
General Mach Discussion / Re: parallel port pinout
« on: June 23, 2006, 07:43:40 PM »
Ok,
I found a parallel cable with all 25 wires, used ground pins (18 to 25) on the negative terminals, and as expected... it works
Thanks Brian
Fernando

BTW, these drivers are the chinese drivers that connect to 110v ac, so no need for power supply, at that voltage they put out about 135volts DC, and they max out at 7.5amps(dip switch selectable),, and the stepper motors are a mamoth 37 Nm holding, and weigh about 45 lb each.

330
General Mach Discussion / Re: parallel port pinout
« on: June 23, 2006, 06:06:25 PM »
Thanks Brian,
But the driver manual does not say anything about open end connection.
Would It work if i use the shield of the cable to connect to the negative step and dir?
I know it would work if you connect pins 18 to 25 to one of those terminals.
Regards
Fernando

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 »