ADC Screen
Moderators: TomKerekes, dynomotion
-
- Posts: 79
- Joined: Thu Aug 13, 2020 10:07 pm
ADC Screen
Hi Tom!
Me again!
Maybe it's a dumb question, but i cant figure it out!
My VFD can output a analog output based on the current.
Wired the ADC and can read in the console.
How can I show the ADC value in the screen? Can't find the right command.
Also, can I make a slide bar with it ? Similar to feed, but for the load of the spindle.
Thanks Tom!
Me again!
Maybe it's a dumb question, but i cant figure it out!
My VFD can output a analog output based on the current.
Wired the ADC and can read in the console.
How can I show the ADC value in the screen? Can't find the right command.
Also, can I make a slide bar with it ? Similar to feed, but for the load of the spindle.
Thanks Tom!
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: ADC Screen
Hi Gabriel,
Please see this post on cnczone which shows the example ShowInstantVelocityDROBar.c + ShowInstantFeedRate3AxisBar.scr to display a rate as a DRO and Verical bar graph. Of course you would display the ADC reading instead.
Also attached is a similar example to display Spindle RPM but using a non-blocking method (no delays).
HTH
Please see this post on cnczone which shows the example ShowInstantVelocityDROBar.c + ShowInstantFeedRate3AxisBar.scr to display a rate as a DRO and Verical bar graph. Of course you would display the ADC reading instead.
Also attached is a similar example to display Spindle RPM but using a non-blocking method (no delays).
HTH
- Attachments
-
- ShowRPMDRO.c
- (734 Bytes) Downloaded 123 times
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 79
- Joined: Thu Aug 13, 2020 10:07 pm
Re: ADC Screen
Hi tom.
Have a mega problem.
I flashed user memory without any thread marked to launch and with a program.
The board connect to USB
But the message appear :
Kmotion present but not responding
Correct Problem and restart application.
Unwired all from kflop (power from usb now), it boots ok, USB is ok, but kmotion cant connect to it.
Reinstalled drivers, tried another pc, reinstalled kmotion also.
Have a mega problem.
I flashed user memory without any thread marked to launch and with a program.
The board connect to USB
But the message appear :
Kmotion present but not responding
Correct Problem and restart application.
Unwired all from kflop (power from usb now), it boots ok, USB is ok, but kmotion cant connect to it.
Reinstalled drivers, tried another pc, reinstalled kmotion also.
-
- Posts: 79
- Joined: Thu Aug 13, 2020 10:07 pm
Re: ADC Screen
Hi Tom.
Managed to recover it.
I had to wait recovery load a little bit and then connect the kflop board.
If i plugged it right when the message "turn on board" appeared, it connect and disconnect and fail.
Almost had a heartattack here.
Thanks!
Managed to recover it.
I had to wait recovery load a little bit and then connect the kflop board.
If i plugged it right when the message "turn on board" appeared, it connect and disconnect and fail.
Almost had a heartattack here.
Thanks!
-
- Posts: 79
- Joined: Thu Aug 13, 2020 10:07 pm
Re: ADC Screen
Tom,
Another question;
Is there a way to put a led in the kmotioncnc screen?
Then i would make C program to turn on the led when a input is high.
Thanks!
Another question;
Is there a way to put a led in the kmotioncnc screen?
Then i would make C program to turn on the led when a input is high.
Thanks!
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
-
- Posts: 79
- Joined: Thu Aug 13, 2020 10:07 pm
Re: ADC Screen
Hi Tom!
Been some time since we last talked. How are you doing ?
I'm getting some progress with my machine and the retrofit, the rotary tool changer is almost 100% configurated.
Right now I started to clean the screen and develop the way it suits better for me.
The ADC's works great and I managed to get Spindle Load and Axis load also, but i'm stuck with a problem.
I want to use buttons to control feedrate override, similar to mach3, +10% -10%.
I could do a C program to control the feed based on last pressed button, that would work.
If FR is at 100% and I press -10%, it goes to 90%, If I change the slider, it would go to a random value (ex 110%) and if I press -10% button again it would go to 80%.
Is there a way to read FRO before use the -10% button so if it was at 110% it would go to 100%?
I found PC_COMM_SET_FRO, but not the "get" one.
Attached a pic of the current screen (under development)
Been some time since we last talked. How are you doing ?
I'm getting some progress with my machine and the retrofit, the rotary tool changer is almost 100% configurated.
Right now I started to clean the screen and develop the way it suits better for me.
The ADC's works great and I managed to get Spindle Load and Axis load also, but i'm stuck with a problem.
I want to use buttons to control feedrate override, similar to mach3, +10% -10%.
I could do a C program to control the feed based on last pressed button, that would work.
If FR is at 100% and I press -10%, it goes to 90%, If I change the slider, it would go to a random value (ex 110%) and if I press -10% button again it would go to 80%.
Is there a way to read FRO before use the -10% button so if it was at 110% it would go to 100%?
I found PC_COMM_SET_FRO, but not the "get" one.
Attached a pic of the current screen (under development)
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: ADC Screen
Hi Gabrriel,
You can use:
DoPCFloat(PC_COMM_SET_FRO_INC,1.1f);
to increase the FRO by 10%
The variable CS0_LastFRO is the last FRO commanded.
You can use:
DoPCFloat(PC_COMM_SET_FRO_INC,1.1f);
to increase the FRO by 10%
The variable CS0_LastFRO is the last FRO commanded.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 79
- Joined: Thu Aug 13, 2020 10:07 pm
Re: ADC Screen
Hi Tom.
I'm very newbie at C coding.
Does CS0_LastFRO need the machine to be in feedhold mode or can I read it and change the feed while the machine is running ? Will it have delay (just curios, ok if have)?
Also, is it limited to 1? if i move FRO slider to 1.5 it prints 1, but anything lower than 1 gives the correct value.
extern float CS0_LastFRO;
printf("%2.2f\n", CS0_LastFRO);
Thanks Tom!
I'm very newbie at C coding.
Does CS0_LastFRO need the machine to be in feedhold mode or can I read it and change the feed while the machine is running ? Will it have delay (just curios, ok if have)?
Also, is it limited to 1? if i move FRO slider to 1.5 it prints 1, but anything lower than 1 gives the correct value.
extern float CS0_LastFRO;
printf("%2.2f\n", CS0_LastFRO);
Thanks Tom!
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: ADC Screen
Hi Gabriel,
KMotion has Hardware and Software FRO. See here.
You can use the function void SetFRO(float FRO); to instantly change the hardware FRO in KFLOP.
KMotion has Hardware and Software FRO. See here.
You can use the function void SetFRO(float FRO); to instantly change the hardware FRO in KFLOP.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.