Mitsubishi Q series...why is 2.5 rounded to 3?

K25 is not 2.5 as it is an integer, it is 25, I think you will find that the rung contains a contact that moves the K25 into that register. As I cannot see what logic is before that puts the data into those registers. You will probably find that the register is being modified elsewhere putting 3 into it (or from the HMI) and the logic (we cannot see) is putting default values i.e. 25 into it on some sort of basis) i.e. perhaps default values on a key press etc.
 
K25 is not 2.5 as it is an integer, it is 25, I think you will find that the rung contains a contact that moves the K25 into that register. As I cannot see what logic is before that puts the data into those registers. You will probably find that the register is being modified elsewhere putting 3 into it (or from the HMI) and the logic (we cannot see) is putting default values i.e. 25 into it on some sort of basis) i.e. perhaps default values on a key press etc.
Here's the full picture. M72 is a button on the GUI which resets the setpoints to default values.

IMG_20210111_133756.jpg
 
That's what I thought, remember, moving values into a register requires a "TRUE" rung so the M72 must be true before it will transfer. again think about what context the type values are in Mitsubishi "K" is integer (only whole numbers), "E" is floating point, "H" is hexadecimal.
 
That's what I thought, remember, moving values into a register requires a "TRUE" rung so the M72 must be true before it will transfer. again think about what context the type values are in Mitsubishi "K" is integer (only whole numbers), "E" is floating point, "H" is hexadecimal.
Thanks. For some reason, even though I press M72 on the GUI, it doesn't go blue on the code. If I change K25 to E2.5 will that put 2.5 into D331 (once M72 is TRUE , that is)?
 
No, if you do that a number of things will happen, according to the logic you posted D331 is an integer so putting E2.5 into it will also write to D332 and probably destroy some other data used elsewhere, D331 is probably only used as an integer and will probably stop the PLC on an error.
You cannot write float values to integer registers. It is obvious that it has to be a whole number floating point values do not conform to integers.
Also you will not see M72 trigger as it is reset immediately after being true so is only valid for the time between the start of that rung and the rung that resets it, however, it should be putting 25 into the register unless it is being written to elsewhere.
 
No, if you do that a number of things will happen, according to the logic you posted D331 is an integer so putting E2.5 into it will also write to D332 and probably destroy some other data used elsewhere, D331 is probably only used as an integer and will probably stop the PLC on an error.
You cannot write float values to integer registers. It is obvious that it has to be a whole number floating point values do not conform to integers.
Also you will not see M72 trigger as it is reset immediately after being true so is only valid for the time between the start of that rung and the rung that resets it, however, it should be putting 25 into the register unless it is being written to elsewhere.
OK, thank parky. Understood.
 

Similar Topics

In this sample programming, what does U4 mean? Any assistance would be greatly appreciated.
Replies
8
Views
234
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
269
Hi One of the PLC's that I maintain/update is a Mitsubishi Q-Series, probably installed about 10 years ago. At the moment, ALL the wires from...
Replies
13
Views
1,161
Hello All, I have an existing Mitsubishi L06CPU-06 PLC, and I am going to add a new serial communication card, LJ71C24, for modbus communication...
Replies
0
Views
469
I need to send a signal to our PLC (Mitsubishi Q series) which is TRUE when there's current flowing and FALSE otherwise. The thing is, the cable...
Replies
31
Views
10,114
Back
Top Bottom