PLC Pie Guy
Member
Hey All.
I'm working on an IFM Vision system. Its interfaced with an L45 and seems to do well. However, if you look at the screen shot you will see what my trouble is. The sensor is always sending me back 2 HEX values as SINT data types. The CPT instruction in the image works, 60% of the time. If you notice in the image, the value of [14] is "bd", which should be = 189. So why does my CPT instruction end up negative 66 if [15] = 0 and [14] = 189. it should be simply 189 since its multiplying [15] by 0. Normally that is the case, but every few minutes this value will do something like you see on the screen and end up with -66 or something else that does not equal what I have as an expression in the CPT instruction........ I'm totally lost on how it comes up with this value.... The works thing is, this works, and its accurate, then its wacky, then it works again.
Help please!!!
I'm working on an IFM Vision system. Its interfaced with an L45 and seems to do well. However, if you look at the screen shot you will see what my trouble is. The sensor is always sending me back 2 HEX values as SINT data types. The CPT instruction in the image works, 60% of the time. If you notice in the image, the value of [14] is "bd", which should be = 189. So why does my CPT instruction end up negative 66 if [15] = 0 and [14] = 189. it should be simply 189 since its multiplying [15] by 0. Normally that is the case, but every few minutes this value will do something like you see on the screen and end up with -66 or something else that does not equal what I have as an expression in the CPT instruction........ I'm totally lost on how it comes up with this value.... The works thing is, this works, and its accurate, then its wacky, then it works again.
Help please!!!