toFloat not defined

Hello,

I am new to the ignition program and I have been trying to create some new faceplates. I noticed that the slider object only produces integer values.

Since the objective of the slider is to write float values in the range of -2.00 to 2.00 to an OPC tag, a script is written when the mouse click is released. The slider has been scaled up by 100 (range is now -200 and 200).

The original idea was to use toFloat( slider value ) to cast the integer to a float and after that I can do basic mathematical operations to the value. However, Ignition seem to think “toFloat( )” is not a predefined function, how do I resolve this problem?

Thanks in advance!




Try

value = float(event.source.value)

Works like a charm!

Thanks!!! :smiley: