Fadal 4020 upgrade

mycnc
Posts: 262
Joined: Thu May 10, 2018 2:42 pm

Re: Fadal 4020 upgrade

Post by mycnc » Thu Jan 10, 2019 11:26 pm

probe-wl-connection-001.png
Depends on the schematic you need a resistor connected accordingly.

mycnc
Posts: 262
Joined: Thu May 10, 2018 2:42 pm

Re: Fadal 4020 upgrade

Post by mycnc » Mon Jan 14, 2019 3:42 am

euroflo wrote:
Thu Jan 10, 2019 12:07 am
1... timers.... I want to adjust the timer for a longer period...

I have a lube system that need to turn on for 2 secs.... then off for 6 mins
Timers are implemented in the CNC control board to handle some more fast/frequent process without the Host computer.
If you need to run such a slow process, Software PLC procedure should work for you.

Something like this

Code: Select all

#define OUTPUT_OIL 15
main()
{  timer=0;
do{   timer++;
 if (timer==20) // 10 times/sec * 2
   {  portclr(OUTPUT_OIL);   };
 if (timer>3600) // 10 times/sec * 60 * 6
 {
  timer=0;
  portset(OUTPUT_OIL);
 };
}while(1);
exit(99);
};

euroflo
Posts: 19
Joined: Wed Dec 19, 2018 8:23 pm

Re: Fadal 4020 upgrade

Post by euroflo » Sat Jan 19, 2019 3:33 am

Hey mate
Timer is working great... how are you going with the speed code..?

Thanks
Justin

mycnc
Posts: 262
Joined: Thu May 10, 2018 2:42 pm

Re: Fadal 4020 upgrade

Post by mycnc » Sat Jan 19, 2019 4:49 am

questions:
1) What is maximum spindle speed? (maybe I missed it)
2) It's not clear about DAC output for different spindle gears

Normally spindle speed value is converted to DAC value range (12 bit 0...4095) to control 0-10V analogue output.

I think need to "cheat" and set RS485 communication in Spindle Tab,
then "Speed ratio (Modbus) set to "1"
mycnc-update-001-46.png
In this case, there will be raw spindle speed value in "eparam" variable in PLC.

After that, we can use a simple expression to handle spindle gear

Code: Select all

if (eparam<4999)
{ portset(OUTPUT_LOW_SPINDLE_SPEED);}	
else 
{ portclr(OUTPUT_LOW_SPINDLE_SPEED);};
It should be added to M03 and SPN procedures.

But also need to decide how to handle DAC output. Obviously, something with dac should be added into this if-else

euroflo
Posts: 19
Joined: Wed Dec 19, 2018 8:23 pm

Re: Fadal 4020 upgrade

Post by euroflo » Sat Jan 19, 2019 10:01 pm

Hey mate
Thanks for that, I will enter that in and see how we go.
Max speed is 10,000 RPM.
I think I know what you are getting at with the DAC for the 2 spindle gears....

My thinking is that we can leave the DAC the same for both, the way I am thinking is the lets say the DAC is output 10V (max)
in low range spindle speed, we get 5000 RPM, but if we have 10V in high range spindle speed we get 10,000 RPM.

Does that make sense..?? or am I thinking about it wrong..I should really get some way of measuring the RPM... will see about getting a meter to measure it...update just ordered a meter.

What do you think...?

Thanks
Justin

Post Reply