GX developer: conversion to float not working...

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,105
Anyone know why D408 is 0.000, when I want it to be 25.000?
There is a 1 dataword gap after D408 (ie D408 is not used), so that shouldn't be the cause of the problem.

IMG_20210422_135718.jpg
 
Last edited:
Even if it was not written somewhere else it could be from the last operation.
It depends if that register is used elsewhere if not they could have done an EMOV E25 to the register instead of moving an integer & converting it into a float, however, that does assume it is not written or used elsewhere as an integer.
 
Even if it was not written somewhere else it could be from the last operation.
It depends if that register is used elsewhere if not they could have done an EMOV E25 to the register instead of moving an integer & converting it into a float, however, that does assume it is not written or used elsewhere as an integer.
Cheers, with my lack of knowledge, I didn't know there was an EMOV command, so I will try this tomorrow and report back. Thank you.
 
Yes there are MOV, DMOV, EMOV, these are int (word), Long int (Double word) & Real, just bear in mind that a double or real takes up two D Words so a real of D200 is D200 + D201, There is also a double precision float this is 64 bit so takes up 4 registers, but rarely used unless you need very high precision.
 
Yes there are MOV, DMOV, EMOV, these are int (word), Long int (Double word) & Real, just bear in mind that a double or real takes up two D Words so a real of D200 is D200 + D201, There is also a double precision float this is 64 bit so takes up 4 registers, but rarely used unless you need very high precision.

Brilliant, will update the code later this morning.
 
Tried compiling the changes with function key F4, but I get these error messages. Not seen them before...been away a few months and typical, I see a message I've not seen before.

IMG_20210423_104231.jpg IMG_20210423_104205.jpg
 
What that is saying is the program that was last compiled differs from the one in the PLC, so at some point there was a change that is in the PLc or in the original file that has changed and has not been downloaded. revert back to the original file i.e. before the change then do a compare, check differences (it may be only a compile time/date but the logic could be the same. In this case you may need to compile the whole program & download it. This is a lesson for you, firstly if you make on-line changes always save the project, when finished for the day do a compare to check the file & PLC match, always before starting a new session save a backup before doing any mods, ideally keep a few backups so you can go back a few sessions.
I suggest you go back before the latest mods, do a compare it may only complain the compile dates are different, in that case, put the mods in but you will have to do a download not an on-line change, lonly download the program file do not select device memory as any changes in values in these memories will be overwritten, It is a good idea at the end of the day to update the device memory on the file by uploading it from the PLC.
 
What that is saying is the program that was last compiled differs from the one in the PLC, so at some point there was a change that is in the PLc or in the original file that has changed and has not been downloaded. revert back to the original file i.e. before the change then do a compare, check differences (it may be only a compile time/date but the logic could be the same. In this case you may need to compile the whole program & download it. This is a lesson for you, firstly if you make on-line changes always save the project, when finished for the day do a compare to check the file & PLC match, always before starting a new session save a backup before doing any mods, ideally keep a few backups so you can go back a few sessions.
I suggest you go back before the latest mods, do a compare it may only complain the compile dates are different, in that case, put the mods in but you will have to do a download not an on-line change, lonly download the program file do not select device memory as any changes in values in these memories will be overwritten, It is a good idea at the end of the day to update the device memory on the file by uploading it from the PLC.
How do I do a Compare? I've looked on the main drop-downs and nothing looks like a 'Do Compare'.
 
You go to online, verify with PLC, only select parameter & program as the device memory will be different as values change.

Verify.png
 
Cheers, it only came up with these 2 differences (DEFAULTS file) which both relate to the rungs I was changing to fix this float conversion problem.

IMG_20210423_112613.jpg
 
What that is saying is the program that was last compiled differs from the one in the PLC, so at some point there was a change that is in the PLc or in the original file that has changed and has not been downloaded. revert back to the original file i.e. before the change then do a compare, check differences (it may be only a compile time/date but the logic could be the same. In this case you may need to compile the whole program & download it. This is a lesson for you, firstly if you make on-line changes always save the project, when finished for the day do a compare to check the file & PLC match, always before starting a new session save a backup before doing any mods, ideally keep a few backups so you can go back a few sessions.
I suggest you go back before the latest mods, do a compare it may only complain the compile dates are different, in that case, put the mods in but you will have to do a download not an on-line change, lonly download the program file do not select device memory as any changes in values in these memories will be overwritten, It is a good idea at the end of the day to update the device memory on the file by uploading it from the PLC.
Done this now. Lesson learnt.
All correct now, including the FLT conversion.
BRILLIANT!
 

Similar Topics

HAs anyone converted the melsec files to GX Developer files from inside GX Developer? GX has an import function but when I use it I get an A/FX...
Replies
2
Views
3,947
Well, I've decided to start a new project, and like all projects, it has already gone horribly wrong. I purchased a PLC device (supposedly a...
Replies
2
Views
109
Does anybody have any samples of how to "Create and Use" UDT's in CCW Developer Edition? (I am using v22) I can't find any information from...
Replies
3
Views
307
I'm trying to manually convert a Beijer E200 HMI project onto to a new Mitsubishi GOT gs2107-wtbd. The PLC is a very old A-series AS1CPU and is...
Replies
1
Views
379
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,166
Back
Top Bottom