Probe Basic spindle load bar off by a decimal

More
4 years 1 month ago #251382 by masterjuggler
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.

More
4 years 1 month ago - 4 years 1 month ago #251385 by Lcvette
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: 4 years 1 month ago by Lcvette.

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago - 4 years 1 month ago #251386 by TurBoss
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
Last edit: 4 years 1 month ago by TurBoss.
The following user(s) said Thank You: Lcvette, gunrak, masterjuggler

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago - 4 years 1 month ago #251436 by masterjuggler
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.
Last edit: 4 years 1 month ago by masterjuggler.
The following user(s) said Thank You: TurBoss, Lcvette, gunrak

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #251441 by TurBoss
Thanks I edited my post with the correct component names.


 
The following user(s) said Thank You: Lcvette, masterjuggler

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #251445 by Lcvette
Thanks @Turboss and no worries @masterjuggler glad you got it sorted!  can you take a small video of it working?  i've still yet to set mine up even though i've bought the component that will capture the amperage and output an analog signal..  but you did remind me i had it on a shelf somewhere so i pulled it out and dusted it off so i could start planning its install!  :D

Please Log in or Create an account to join the conversation.

Moderators: KCJ, Lcvette
Time to create page: 0.477 seconds
Powered by Kunena Forum