i can see, that the value or raw input from the thermistor is going into 
conv-float-s32.1.in but conv-float-s32.1.out is always zero, why is this?

Am Mittwoch, 28. Juni 2017 17:28:44 UTC+2 schrieb Sag ich Dir nich:
>
> hello, i tried feeding the thermistor value to 
> halui.spindle-override.counts but i got an error "can not add float to s32" 
> so i added a rt component called conv_float_s32 and technically it worked 
> and started without error. I can see changes (very non-linear!) in adc 
> value therm.ch04.raw from 1 to 4010 when i turn the pot but not on 
> halui.spindle-override.counts(also no change in spindle speed when i turn 
> the pot). What do i have to add to let the adc value change the counts from 
> halui?
>
> *this is my code:*
>
> # Python user-mode HAL module to read ADC value and generate a thermostat 
> output for PWM
> # c = analog input channel and thermistor table
> loadusr -Wn Therm hal_temp_bbb -n Therm -c 
> 04:epcos_B57560G1104,05:epcos_B57560G1104 -b CRAMPS
>
> ###########################
> #Spindle and Feed Override#
> ###########################
>
> loadrt conv_float_s32 count=2 
>
> #newsig bed.temp.meas float
> #newsig Feed.override float
>
> net conv-float-s32.1.in <= Therm.ch-04.value
> net conv-float-s32.1.out => halui.spindle-override.counts
>
> setp halui.spindle-override.scale 0.1
> #net bed.temp.meas <= Therm.ch-04.value
> #net bed.temp.meas => halui.spindle-override.counts# <= Therm.ch-04.value
>
> #setp halui.feed-override.scale 0.01
> #net Spindle.override <= Therm.ch-05.value
> #net Feedoverride halui.feed-override.counts# <= Therm.ch-05.value
>
>
> thanks
>
> Am Samstag, 15. Oktober 2016 18:12:19 UTC+2 schrieb Charles Steinkuehler:
>>
>> On 10/14/2016 6:11 PM, Sag ich Dir nich wrote: 
>> > Hi, 
>> > 
>> > i have some questions about the file 
>> > 
>> > from the "readtemp.py" file: 
>> > # The BeBoPr board thermistor input has one side grounded and the other 
>> side 
>>
>> The BeBoPr is probably the most complex example to use as a reference, 
>> since it has a more complicated input circuit than any of the other 
>> boards. 
>>
>> Basically, you need to create a routine that converts a raw ADC value 
>> into the resistance of your variable resistor.  How to do this depends 
>> on how you have the resistor connected and the input circuitry (if 
>> any) between the ADC and your variable resistor. 
>>
>> If you are using a standard board (BeBoPr or CRAMPS or whatever) you 
>> can use the routine for that board to get a resistance value as long 
>> as you haven't changed any of the input circuitry. 
>>
>> What you do with the resistance value from there on is up to you, you 
>> can feed it directly into HAL as a value, convert it to a percentage, 
>> apply a linear or log scale to the value (which might be needed to get 
>> the response curve you want from various dial positions which again 
>> will depend on the type of potentiometer you are using and the input 
>> circuitry). 
>>
>> -- 
>> Charles Steinkuehler 
>> cha...@steinkuehler.net 
>>
>

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to