buttons to turn on the output when the machine is running

If you have a question about the software please ask it here.

Re: buttons to turn on the output when the machine is runnin

Postby fixebr » Tue Jan 25, 2022 3:38 pm

dezsoe, спасибо вам за плагин, это именно то, что нужно!
Может быть, я со временем сделаю ему интерфейс, так как хотел в будущем разобраться с написанием плагинов)
My English is bad, so you're reading machine translation results. Alas.
User avatar
fixebr
 
Posts: 40
Joined: Thu Dec 30, 2021 8:30 pm
Location: Russia, Moscow

Re: buttons to turn on the output when the machine is runnin

Postby fixebr » Wed Jan 26, 2022 1:05 pm

Sorry, I seem to forget to turn on the translator in the past message)))

dezsoe, thank you for the plugin, it's exactly what you need!
Maybe I will eventually make him an interface, because I wanted to deal with the writing of plugins in the future)

But I ran into a challenge of accidentally off. My 2 buttons are the inclusion of a vacuum cleaner and a vacuum pump/table, the vacuum cleaner must be able to enable during the execution of GCODE (that your plugin is just doing), and the vacuum pump is the opposite, should be blocked during milling (so that you accidentally do not release the item).
Also, in the future, I plan to put a vacuum sensor to pass the part of the E-STOP event.
So initially I wanted to make a macro, above me advised to make Macroloop. I tried to explore the code in your project plugin and use it in Macroloop, but unfortunately it did not work.
Tell me, is it possible to realize your plugin functionality in the form of macroloup?

I do not ask the fully finished decision, but I want to learn how to do similar tricks myself, so I need just an example code :D

Thanks in advance.
My English is bad, so you're reading machine translation results. Alas.
User avatar
fixebr
 
Posts: 40
Joined: Thu Dec 30, 2021 8:30 pm
Location: Russia, Moscow

Re: buttons to turn on the output when the machine is runnin

Postby Daywalker » Wed Feb 02, 2022 3:33 pm

Hello dezsoe,

Thanks for the plugin, that's exactly what I was looking for for my suction.

I have now inserted and activated the plugin in UCCNC, I have also added the SwitchOutput data (see below) to my profile.
Unfortunately, I can't get the plugin to run.

I created a button on the screen with the button number: 20417, my macro also has the number 20417 and is structured like that of "fixebr".

Somewhere I seem to have an error in my mind, which still doesn't work in the process (i.e. with the G-code running) of the button.

Must say that I tested it in advance on the laptop in demo mode.


Code: Select all
[SwitchOutput]
Button1=20417,3,7,False


Code: Select all
bool buttonstate = AS3.Getbuttonstate(20417);                   // Get Button State

int bnum = 20417;                                           // Button Number
int Port =3;                                              // Port Number 3
int Pin1 =7;                                              // Pin 3 -> Suction


if(buttonstate)
{
exec.Clroutpin(Port, Pin1) ;                                  // Absaugung AN
AS3.Switchbutton(false, 20417);
exec.Wait(100);
}
else
{
exec.Setoutpin(Port, Pin1) ;    
AS3.Switchbutton(true, 20417);                                 // Absaugung Aus                              
exec.Wait(100);
}   
while (exec.IsMoving()) {} // Wait for exec.Code to finish


Thanks and Regards from Germany
Regards from Germany
Udo

(UC300ETH & UB1)
[Yeah, I use a Translator ;-) ]
Daywalker
 
Posts: 29
Joined: Sun Jul 29, 2018 8:11 am

Re: buttons to turn on the output when the machine is runnin

Postby fixebr » Thu Feb 03, 2022 12:32 am

Daywalker wrote:I created a button on the screen with the button number: 20417, my macro also has the number 20417 and is structured like that of "fixebr".

Hey!
If you use the plugin from Dezsoe, then you do not need additional macros. Make a button number more than 22000 (then the button itself will not run any macro), and the plug-in tracks down to it automatically using the string from the profile file.
My English is bad, so you're reading machine translation results. Alas.
User avatar
fixebr
 
Posts: 40
Joined: Thu Dec 30, 2021 8:30 pm
Location: Russia, Moscow

Previous

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 5 guests