I have experimented with simple Python arithmetics. My intention is to do some temperature transducer normalisations, where the basic data comes from theAD converter of the GE865. It is in integer form, spanning from 0 to 2047 I suppose.
As a result I would like to get a number with one decimal. Therefore I have icluded one desimal in the divider of the formula, run here on PythonWin with simple data taken from a live example, the value of the AD converter being 907:
>>> print (907-600)/10.030.7
If I let the divider also be an integer, it gives me:
>>> print (907-600)/1030
All above is according to Python type mixing rules, I guess. But running the same examples on the GE865 work only if I use the latter expression:
It prints 30 (as expected).
Trying to run the other alternative on GE865:
It only results in the following debug output, without printing anything:
RuntimeError: Bad code object in .pyc file
Is this a bug or have I missed something essential here? Why these differing results between PythonWin and GE865 Python execution?
Thanks for any help.
I suppose is because of floating point type which is not supported in module Python.
Hit enter to search or ESC to close
Knowledge Base & Download Zone