HomeFT1A SmartAXIS Touch

Our newest 3.8" operator interface touchscreen with built-in PLC.

Newby Float Math Question Messages in this topic - RSS

Russ
Russ
Posts: 3

2/15/2019
I apologize in advance if the info was readily available, I have been trying to sift through the IDEC manual and looking online with no success.

I was given a FT1A Touch by my company to help me start learning more about PLC and HMI operation.

So I am attempting some basic excercises.

I am trying to read the AI0 port (using D8040) and turn it into a useful temperature. The probe is 4-20mA 0-212F (really I'm just using a mA source to simulate a probe). I can read the 0-1000 range that the analog port provides, and it matches my expectation (as compared to the mA signal)

When I try to perform a MUL operation I get execution errors.

MUL
S1 is constant 0.212
S2 is D8040
D1 is D1000

If I'm thinking it through correctly, 0.212*0 is 0, and 0.212*1000 is 212. So I should be able to just have a numerical display on the HMI with destination D1000.

But I get a very low (like 1.7e-38) type number, and the execution error bit goes high...

I would like to be able to display the temp, and then use compare logic to activate various outputs.

What am I missing?



Thanks!
edited by RussG on 2/15/2019
edited by RussG on 2/15/2019
0 link
Russ
Russ
Posts: 3

2/15/2019
OK I figured it out. I did not realize that the MUL function won't properly process an INTEGER*FLOAT and output a FLOAT. If I understand correctly, the system was trying to read my Integer value (from the analog input), but as a float. so it was completely wrong value represented during the equation.

I added a ladder line to WTOF D8040 to D1001 and then use D1001 as S2, and bam it works.

I may not be 100% correct in my description here, but hopefully it'll help another newby later.

Cheers
0 link
Jon
Jon
Posts: 1

2/18/2019
What is WTOF? I can't find that referenced anywhere.

Russ wrote:
OK I figured it out. I did not realize that the MUL function won't properly process an INTEGER*FLOAT and output a FLOAT. If I understand correctly, the system was trying to read my Integer value (from the analog input), but as a float. so it was completely wrong value represented during the equation.

I added a ladder line to WTOF D8040 to D1001 and then use D1001 as S2, and bam it works.

I may not be 100% correct in my description here, but hopefully it'll help another newby later.

Cheers
0 link




Powered by Jitbit Forum 8.2.0.0 © 2006-2013 Jitbit Software