1/26/2023 4:12 PM | |
Joined: 9/27/2006 Last visit: 6/7/2024 Posts: 12260 Rating: (2670)
|
Hello; What is the format ofthe value you MOVE to "weight_value_2", is it defind as a REAL variable? in this case the address should read DB706.DBD324, since REAL values (IEEE 754 floating point value) occupy 4 bytes. I believe you need to start by correcting that, and confirm that "weight_value_2" has also been defined as a REAL value. https://en.wikipedia.org/wiki/IEEE_754 When you worhk with SUB_R, both operands must be REAL values; As suggested before, "weight_value_2" must have been defined as a REAL variable. "150" is recognized by Step 7 as an INT, an integer without decimal places. The REAL value that you want to substract should be written "150.0" so Step 7 understands you are working with a REAL number. Try to apply those corrections, if you still have results that don't make sense take a new screnshot of the netwrok you have programmed, but in Online mode (connected to the PLC with the "glasses" icon activated). This will give us a lot more information on what the CPU is complaining about. Hope this helps, Daniel Chartier |
Follow us on