I'm relatively new to programming PLC 's. So, I don't want to assume that what I'm seeing is an error. Perhaps it is an old trick, and I just don't understand why it's in the code. I have inherited a project and what I'm seeing, I just don't understand.
PLC is an IDEC FC5A. The automation at this location was set up 15 years ago or so. The person who originally did the programming left the area 5 to10 years ago. There was no documentation left behind.
I plugged in to the PLC and was able to upload the code from the PLC to my laptop. The ladder logic did not have any comments stored in the PLC with the logic. So, I've just been examining it.
I have identified some changes that I wish to make, However, I've also seen what appears to me to be errors in the code. I'd like to make sure that I'm not just missing something as a new person that is perhaps a technique used by more experience programmers.
What I am seeing is that a 32-bit floating-point value will get stored into a register such as D403. That should take up register D403 and register D404 since each register is 16 bits. Then another 32-bit floating-point value will get stored in to register D404, and again, another 32-bit floating-point value will get stored in to register D405 and yet another 32-bit floating-point value will be stored into D406
The confusion that I have here is that the first value that is stored in D403 should be taking up D403 and D404. So, storing a second value in D404. is overriding part of the first value stored in D403 right? Then the value stored in D405 is overriding part of the second value stored in D404? This continues on and on. I see it quite often in this code.
Are these errors? Did the original programmer not realize that floating point values took up two consecutive registers or is this some type of useful register manipulation done by experienced programmers.
Some of the changes that I want to make are to registers such as this that get overwritten. I'd like to understand what is happening here, and if these are errors, I can go back and fix all of this code so that 32-bit floating-point values are given two registers to store their data and are not overwritten by other values. I don't want to make any changes until I understand what's happening or if this is just a programing error.
Thank you.
PLC is an IDEC FC5A. The automation at this location was set up 15 years ago or so. The person who originally did the programming left the area 5 to10 years ago. There was no documentation left behind.
I plugged in to the PLC and was able to upload the code from the PLC to my laptop. The ladder logic did not have any comments stored in the PLC with the logic. So, I've just been examining it.
I have identified some changes that I wish to make, However, I've also seen what appears to me to be errors in the code. I'd like to make sure that I'm not just missing something as a new person that is perhaps a technique used by more experience programmers.
What I am seeing is that a 32-bit floating-point value will get stored into a register such as D403. That should take up register D403 and register D404 since each register is 16 bits. Then another 32-bit floating-point value will get stored in to register D404, and again, another 32-bit floating-point value will get stored in to register D405 and yet another 32-bit floating-point value will be stored into D406
The confusion that I have here is that the first value that is stored in D403 should be taking up D403 and D404. So, storing a second value in D404. is overriding part of the first value stored in D403 right? Then the value stored in D405 is overriding part of the second value stored in D404? This continues on and on. I see it quite often in this code.
Are these errors? Did the original programmer not realize that floating point values took up two consecutive registers or is this some type of useful register manipulation done by experienced programmers.
Some of the changes that I want to make are to registers such as this that get overwritten. I'd like to understand what is happening here, and if these are errors, I can go back and fix all of this code so that 32-bit floating-point values are given two registers to store their data and are not overwritten by other values. I don't want to make any changes until I understand what's happening or if this is just a programing error.
Thank you.

