Hello Guest it is March 19, 2024, 05:10:35 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 - TPS

11
i would use oemcode(34) -> basic script
then in basic script window

Code: [Select]
SetUserLed(1503,1)

and then in macropump.m1s
Code: [Select]
If ((GetUserLed(1500) = True) And (GetUserLed(1501) = False)) Or (GetUserLed(1503) = True) Then
'insert your button code here
'.
'.

'Start machine
DoOEMButton(1000)
End If
'make sure we run the code only one
SetUserLED(1501,GetUserLed(1500))
SetUserLED(1503,0)

12
now i got you, you will have to use a seperate UserLed because brain will overwrite UserLed(1500).

13
ok, the example code i posted has to be in macropump.m1s witch is located in your
macro folder. normaly C:\Mach3\macros\'your profile name'

this macro is running automaticly cyclic if it is enabled in Config->General Config->Run Macro Pump

as soon as enabled and Mach3 is up it will "look" cyclic for UserLed(1500) and as it becomes
true the code witch is in the If Then EndIf will be excecuted.

your brain will only read modbus input (your external start button) and the set UserLed(1500) true
when the button is pressed. you have nothing to do in your screenset, except copying the code from
start button into the macropump macro.   

14
in standard 1024 screenset this small led ring arround the button is assigned to OEMled(804)
witch is the program start LED.

so if you assign it to OEMLed(1500), witch is only a onoe to one copy of your modbus input,
it will only light green as long you press your extrenal start button and will not show that programm
is running.

15
the LED (green frame arround start button) will come up automaticly when programm is running.

16
you can copy your code from Start Button into macropump 1 to 1.

example for macropump.m1s:
Code: [Select]
If ((GetUserLed(1500) = True) And (GetUserLed(1501) = False)) Then
'insert your button code here
'.
'.

'Start machine
DoOEMButton(1000)
End If
'make sure we run the code only one
SetUserLED(1501,GetUserLed(1500))


then modify your brain that the modbus input set's UserLed(1500)
and make sure macropump is enabled in Config->General Config

17
as far i know there is no direct way to run a VB Script via brain.

your screen button is excecuting your VB instructions and at the the end is call's
the DoButton for Start.

your brain will only excecute the DoButton Start and not the Butttonscript witch is "behind"
the button on your screen.

a possible way might be to set a OEMLed in your brain and the macropump script, witch
is running continious, will react to this OEMLed and excecute the VB commands + do
the start.

vou have to make sure that the code will be only done once if the OEMLed comes true.


and pls avoid double post's. 

18
General Mach Discussion / Re: Something is crazy with my CNC
« on: January 08, 2024, 05:24:45 AM »
-maybe CV mode on
-maybe backslash

19
a simple trick would be to correct Z-Axis Position via OEMDro(802)

-you know the z-axis machinecoord where probe was hit from old tool
-you know the z-axis machinecoord where probe was hit from new tool

so the length differece of tool is z_hit_old - z_hit_new

then you can correct OEMDro(802) with this difference

SetOEMDro(802,GetOEMDro(802)+Diff)

20
German / Re: Mach3 mit Pokeys mit Potie für S Overr / F Overr
« on: January 07, 2024, 05:37:22 AM »
ich habe versucht noch weitere Info's zu finden aber leider ohne Erfolg.
Vielleicht erstellst Du bei Polabs direkt:

https://support.poscope.com/

eine Support Anfrage.

Gruß Tom