Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Function Element - No conversion from 'bool'

2 posters

Go down  Message [Page 1 of 1]

KerimF

KerimF

SimulIDE-R1436_Win32

I reduced its function to:
vo=(vi0<0.5)*0+(vi0>0.5)*1

I got:
script line: 10 1 INFO Compiling void voltChanged()
script line: 19 20 ERROR No conversion from 'bool' to math type available.
script line: 19 34 ERROR No conversion from 'bool' to math type available.
ScriptModule::compileScript: Build() failed

Before I noticed this error warning, a crash happened when I tried to run the debugger.

arcachofo

arcachofo

Yes, development uses a different Scripting engine not 100% compatible with the older.

Not sure if it is posible to solve this, by now the only solution is using a different syntax:

vo=( (vi0>0.5)? 1:0 )*1

So any Logic operation used in an analog output must be converted to float value:
( Logic operation )? 1:0

This is equivalent to:
If Logic operation = true then convert to 1
Else convert to 0

KerimF likes this post

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum