Mitsubishi Real to integer

rohit_plc

Member
Join Date
Jun 2013
Location
delhi
Posts
81
Hello,

Could somebody give for me advice how to seperate real number to integer Entered from Mitsubishi HMI GS Series to Mitsubishi PLC FX-1n? When i entered Real Number from hmi (123.5) in D180 from hmi iam getting 1150967808 in D180 in PLC. i need to isolate 123 and 5 in different Register

Help :confused:
 
The FX1N doesn't support floating point I believe, though I'm willing to be corrected. However the value would be stored in D180 and D181 I believe.


This Wikipedia page https://en.wikipedia.org/wiki/Single-precision_floating-point_format explains how 32 bit floating point works but there are plenty of YouTube videos too.



Your only option would be to treat the number entered on screen as an integer or double integer.
 
The easy way around that is to use an integer in the HMI. I'm not familiar with that HMI but on Beijers HMI's you use an integer and can give it decimal points. so for example 123.5 = 1235 decimal (HMI shows 123.5), you could then do the maths to separate the equivalent decimal point. I don't know why you would want to separate it however. When I have used integers (simulated decimal point) for example in temperature control 123.5 is 1235 in the PLC so for example if you have a set point in the HMI of 95.0 Deg C (950) actual value the process variable scaled as 0-1500 (equates to 0-150.0).
See picture of a decimal point on Beijers HMI that is actually decimal.

HMI.png
 
Last edited:

Similar Topics

I'm absolutely stuck at this point with the recipe portion of my program. I used the default example they had on their website to create the...
Replies
0
Views
1,751
Hi everyone, I am a greenhorn in programming. Can anyone help me with a GX Works ladder logic example of programming a real time clock. I want to...
Replies
3
Views
3,989
Hi all, I have an issue with read time of Q-PLC. In case of FX is possible to read time, day, year... via D registers (D8013-D8019). In case of...
Replies
2
Views
2,863
Hello. I've been learning about PLC's in a few months now, mainly PLC programming, and yesterday I got an assignment to read an analog laser...
Replies
3
Views
4,580
I'm having trouble setting the real time clock on an FX1N. When I try to set D8019 (Weekday) using --X012--------------------------------[MOV...
Replies
0
Views
4,720
Back
Top Bottom