Hello Guest it is April 15, 2024, 11:59:34 PM

Author Topic: Read in DRO continuously  (Read 100 times)

0 Members and 1 Guest are viewing this topic.

Offline Vido

*
  •  25 25
    • View Profile
Read in DRO continuously
« on: April 12, 2024, 06:13:55 AM »
Hello, I am currently using MACH3 Mill for a water jet cutting system. Now I have created DRO's which show the pressure and the amount of sand. I would like to have, for example, that when I change the pressure in the DRO, the pressure is changed automatically (while the machine is moving). The value in the DRO for the pressure is converted into an analog signal (0-10V) and the analog output controls the proportional valve for the pressure. This works without travel commands (G01, G02, ...), but as soon as I run the program and then change the pressure, the program stops in its actual line and the new pressure is no longer applied.
At the moment I have programmed this using macros. The output signal (0-10V, analogue) for the pressure is read in via the DRO (programmed with do while). The problem is that this is ONLY done for this macro. If I jump to the next program line, this macro is no longer active (instruction over) and therefore MACH3 does not accept the "new" DRO as a  instruction to change the analogue signal for the pressure.

Is there a way to run a macro continuously and without being influenced by other commands or running the program?
There is also the FRO where you can gradually increase or decrease the feed speed by 10%, the same applies to the spindle speed.
For this purpose, the two macros “spindlespeed” and “FeedRate” are available in the macro directory of MACH3 and they contain the following:

Feed = CommandedFeed()
SetFeedRate(Feed)



 And for the spindle speed:

"rpm = GetRPM()
SetSpinSpeed(rpm)

Since these are also macros, why are they applied PERMANENTLY and WITHOUT interrupting the program?



I would need something like:

pressure = GetUSERDRO(1302)           //DRO(1302) is the pressure DRO
SetModOutput(80, GetUserDRO(1302)     //address 80 is the one for the pressure (analog) signal

And this has to been checked continuously!!     

It doesn't have to be a macro, could it be another command?

Thank you
« Last Edit: April 12, 2024, 06:23:00 AM by Vido »

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Read in DRO continuously
« Reply #1 on: April 14, 2024, 05:16:46 AM »
there are two ways to do this.

1st use macropump macro witch is running (if activated in Config -> General Config) where you can place your
code and it will be excecuted arround every 10ms

2nd you can make a brain (Operator -> Brain Editor, the use Operator -> Brain Control to activate)
witch will be excecuted faster.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Vido

*
  •  25 25
    • View Profile
Re: Read in DRO continuously
« Reply #2 on: April 15, 2024, 09:46:45 AM »
Hello!

Thanks for reply, i got it. I made it with the macropump but i would like to try it with the brains too.

Thank you!