Mitsubishi Q Series: Using the less-than operator on floating point numbers

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
Hi, In my ladder logic, I've got a data register D60 whose value is -0.001 (when using monitor mode to see values). D406 is 0.250.


But then later on I have a rung where I m checking if D60 is less than D406 (another FP value).


|---[ < D60 D406 ]------------------(M557)----|


However, in the above, D60 has the value -13332 & D406 has the value 0.


Why are they different? How can I do the < operator when dealing with two FP numbers?
 
Last edited:
I believe it is because you are using a "standard" compare function. For floating point, you need to use compare funtions with an "E" prefix. for example, [E< D60 D406]. It has been a while since I used Mitsubishi, but this is what I remember.
 
Yes you need to use the E< function, remember E is floating point in Mitsubishi.
so E (< = >) is float
So ANDD [D< Dx Dx] is double 32 bit integer or bin
< = > is 16 bit
 

Similar Topics

Hi, I need some help on how to write the command to print a string of ASCII code to a sato printer The sato printer model is CL4NX (2 unit)...
Replies
0
Views
4,113
how to communicate FactoryTalk Optix and Mitsubishi Q Series. I want to know the details of that
Replies
0
Views
36
In this sample programming, what does U4 mean? Any assistance would be greatly appreciated.
Replies
8
Views
273
Hi, I have a project with a R04CPU, RD77GF16 and a RJ71PN92 modules. The cell is given to me to change the program since the previous integrator...
Replies
9
Views
288
Back
Top Bottom