Hello.
Rather than just getting a "result" I would like to use this situation to learn more about HAL programming.
I am using gmocchapy, I've got the spindle at sped LED going and would like to get the spindle bar going. This all occurs via the custom post gui hal folder, which is where both pieces of code (spindle at speed (working) and spindle bar (not working)) live.
From HAL meter the only feedback on spindle speed is spindle-vel-fb-rps.
Given this I thought it would be a good learning exercise for me to try to get it working with a hal function to multiply that (rps) output by 60, get rpm and then net that to the gmoccapy halui pin for the spindle bar.
So this is what I tried:
#Spindle feedback bar
addf mult2.3 servo-thread # I already have 3 other mult2 functions in HAL ie 0 to 2
setp mult2.3.in1 60.0 # set the multiplier to 60 to achiive rps to rpm
net spindle-vel-fb-rps mult2.3.in1 60.0 => mult2.harry.in1 #calling the result harry so it stands out for debug
net mult2.harry.out => gmoccapy.spindle_feedback_bar #trying to output the result to the gmoccapy halui pin for the bar
I believe my problem is that I don't know how to create the resultant parameter "harry" correctly.
I'm sure this error is about as basic as it gets, and so I really want to use this a stepping stone to learn with.
I've attached the two files for context.
Any help appreciated, especially a brief global explanation would be most helpful, as I think that would set a foundation to learn from.
Many thanks,
Marty.