Probe Basic spindle load bar off by a decimal
- masterjuggler
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 6
06 Sep 2022 23:01 #251364
by masterjuggler
Probe Basic spindle load bar off by a decimal was created by masterjuggler
I've got my spindle VFD controlled by an rs485 usb dongle. Looking at halshow, I get the correct current draw reported, and Probe Basic's load bar seem to properly reflect the current draw as a proportion of the max current I have set with the qtpyvcp.spindle-load-indicator.max-val signal. For some reason though, the percent shown seems to be off by a factor of 10. When at about 50% load it shows me 5%. Is this something I have misconfigured?
I attached my custom_postgui.hal showing how I have that configured. I'm using the latest master branch, compiled from source, and LinuxCNC 2.9 master.
I attached my custom_postgui.hal showing how I have that configured. I'm using the latest master branch, compiled from source, and LinuxCNC 2.9 master.
Please Log in or Create an account to join the conversation.
07 Sep 2022 00:43 #251371
by Lcvette
Replied by Lcvette on topic Probe Basic spindle load bar off by a decimal
Looks like you set max value to 9, that should be the max value percentage you are going to use.
Please Log in or Create an account to join the conversation.
- masterjuggler
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 6
07 Sep 2022 01:20 #251375
by masterjuggler
Replied by masterjuggler on topic Probe Basic spindle load bar off by a decimal
I set it to 9 because I have the VFD set to max out at 9 amps. Changing the value to 100 doesn't change the displayed percentage at all, but it does change the bar's scale. So now when the FVD pulls 6 amps, Probe Basic shows me 6% and the bar barely moves.
Please Log in or Create an account to join the conversation.
07 Sep 2022 01:26 - 07 Sep 2022 22:14 #251376
by Lcvette
Replied by Lcvette on topic Probe Basic spindle load bar off by a decimal
You need to add a scale for the vfd output. And translate it to the range you want to use. The max value your changing is for the max percentage display range of the bar, most will run 150-200% to allow for short term over loading which many drives allow for. You need to scale the analog to match that percentage your drive allows for.
Last edit: 07 Sep 2022 22:14 by Lcvette.
Please Log in or Create an account to join the conversation.
- masterjuggler
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 6
07 Sep 2022 01:35 #251377
by masterjuggler
Replied by masterjuggler on topic Probe Basic spindle load bar off by a decimal
OK, I see what you mean. Could I ask for either an example or a link to one so I can see how it needs to be set up? I'm unsure how to go about scaling the analog.
When I was running LinuxCNC 2.8 and Probe Basic from the installer, I had it set up with the Hal I attached above with the value set to 9 and it figured out the scale. I guess the behavior changed somewhere along the line.
When I was running LinuxCNC 2.8 and Probe Basic from the installer, I had it set up with the Hal I attached above with the value set to 9 and it figured out the scale. I guess the behavior changed somewhere along the line.
Please Log in or Create an account to join the conversation.
07 Sep 2022 01:49 - 07 Sep 2022 01:50 #251378
by Lcvette
Replied by Lcvette on topic Probe Basic spindle load bar off by a decimal
setp hm2_7i76e.0.7i76.0.0.analogin0-scalemax 363
Taken from here:
forum.linuxcnc.org/22-pyvcp/39322-scaling-an-analog-value
Taken from here:
forum.linuxcnc.org/22-pyvcp/39322-scaling-an-analog-value
Last edit: 07 Sep 2022 01:50 by Lcvette.
Please Log in or Create an account to join the conversation.
- masterjuggler
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 6
07 Sep 2022 02:12 #251382
by masterjuggler
Replied by masterjuggler on topic Probe Basic spindle load bar off by a decimal
Maybe I'm misunderstanding, but that seems to only work for an analog signal. As mentioned, this current draw signal is from the rs485 interface. Trying to use the -scalemax suffix on spindle-current just causes linuxcnc to error on launch due to not recognizing that pin.
Please Log in or Create an account to join the conversation.
07 Sep 2022 02:58 - 07 Sep 2022 22:15 #251385
by Lcvette
Replied by Lcvette on topic Probe Basic spindle load bar off by a decimal
ive never done it that way, so am not of much help, but i would imagine there has to be some method to scale that input in a similar fashion. what does your rs485 file output look like? perhaps either in that or if you have it in your hal somewhere you could scale where it is pulled in?
Last edit: 07 Sep 2022 22:15 by Lcvette.
Please Log in or Create an account to join the conversation.
07 Sep 2022 03:24 - 07 Sep 2022 21:19 #251386
by TurBoss
Replied by TurBoss on topic Probe Basic spindle load bar off by a decimal
hello,
to convert AMPS to load percent we have this halc-omponent (attached)
to install it, just run
halcompile --install load_conv.comp
then in the hal file
loadrt load_conv
addf load-conv.0 servo-thread
net spindle-current => load_conv.0.amps
net spindle-load qtpyvcp.spindle-load-indicator.in-f <= load_conv.0.percent
I'm writing this form memory i don't have the config that uses it arround
please post any issue
Thanks
edited: many many typos and erros thanks masterjuggler
to convert AMPS to load percent we have this halc-omponent (attached)
to install it, just run
halcompile --install load_conv.comp
then in the hal file
loadrt load_conv
addf load-conv.0 servo-thread
net spindle-current => load_conv.0.amps
net spindle-load qtpyvcp.spindle-load-indicator.in-f <= load_conv.0.percent
I'm writing this form memory i don't have the config that uses it arround
please post any issue
Thanks
edited: many many typos and erros thanks masterjuggler
Last edit: 07 Sep 2022 21:19 by TurBoss.
Please Log in or Create an account to join the conversation.
- masterjuggler
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 6
07 Sep 2022 20:28 - 07 Sep 2022 20:34 #251436
by masterjuggler
Replied by masterjuggler on topic Probe Basic spindle load bar off by a decimal
Perfect, I got it working. Thanks so much @TurBoss, and I appreciate the help @Lcvette.
Few things to note to help anyone else who may stumble on this info:
1) The compiled file saved to /usr/lib/linuxcnc/modules is named load_conv.so, and it must be loaded into the hal as load_conv. However, the pin added with addf must be load-conv, with a hyphen instead of an underscore.
2) The resulting pins are load-conv.0.amps and load-conv.0.percent, as I discovered in halrun by loading load_conv and showing the available pins.
3) Before compiling, I first changed the denominator to 0.09, since I have the VFD set to a maximum of 9 amps.
I also attached my working custom_postgui.hal.
Few things to note to help anyone else who may stumble on this info:
1) The compiled file saved to /usr/lib/linuxcnc/modules is named load_conv.so, and it must be loaded into the hal as load_conv. However, the pin added with addf must be load-conv, with a hyphen instead of an underscore.
2) The resulting pins are load-conv.0.amps and load-conv.0.percent, as I discovered in halrun by loading load_conv and showing the available pins.
3) Before compiling, I first changed the denominator to 0.09, since I have the VFD set to a maximum of 9 amps.
I also attached my working custom_postgui.hal.
Last edit: 07 Sep 2022 20:34 by masterjuggler.
Please Log in or Create an account to join the conversation.
Time to create page: 0.355 seconds