Dwisesa Posted March 11, 2019 Report Posted March 11, 2019 Hello Everyone! Our customer has FX3G PLC with FX2N-16EYR expansion module, FX2N-8AD Analog Input Module and two FX3U-4AD-TC-ADP module. How the system works is that thermocouples that connected to the TC-ADP and FX2N-8AD module read sealer temperature. If the temperature read is below the set point, then the PLC turn on the heater through the FX2N-16EYR. The problem we encounter is that the sealer temperature has passed the set point, but the PLC still turn on the heater. I've checked the program and there is nothing that could caused this problem. Can someone help me find the solution for this problem. I attach the part of the program that showed the logic. Thank you PLC Program.pdf
kaare_t Posted March 11, 2019 Report Posted March 11, 2019 Hello and welcome. Your code is very wrong. CMP instructions destination (d) uses three devices "in a row" after the first specified device, so e.g.: CMP D200 D300 M200 This will compare D200 with D300, and put the results in M200, M201 and M202. When s1 and s2 is equal, M201 will activate and cause issues with your next command in your code. You need to make space for the used devices in your code,: CMP D200 D300 M200 CMP D201 D301 M203 CMP D202 D302 M206 and so on
nehpets Posted March 11, 2019 Report Posted March 11, 2019 Or if you are using 16 bit devices you can use [= d200 d300 m200], [> d200 d300 m200],[< d200 d300 m200] etc. which will only use the one result bit (eg M200), the compare function CMP would be required for 32 bit compare. The manual is quite intuitive,
kaare_t Posted March 11, 2019 Report Posted March 11, 2019 CMP is as far as I know 16bit, while DCMP is 32bit... But you can, as @nehpets writes use simpler instructions like <, > or = to just trigger one output point. 1
Dwisesa Posted March 12, 2019 Author Report Posted March 12, 2019 I have done what @kaare_t told And it still produce the same result. What is the problem?
kaare_t Posted March 12, 2019 Report Posted March 12, 2019 Can you post a picture/pdf of the code, and how it looks now?
Ron_S Posted March 12, 2019 Report Posted March 12, 2019 You have to be careful which way round you do your CMP instruction or you will get opposite results to what you expect. But the main thing is, once a compare bit has been set it will stay set until the values changes EVEN WHEN THE LINE GOES FALSE.
glavanov Posted March 12, 2019 Report Posted March 12, 2019 Are you monitoring the program? Can you actually see, that logic is still energizing the Y output and the led for this output is still on while the temp is rising above set point? Asking, because it's relay output. It might be faulty and stuck in on condition...
Veganic Posted March 12, 2019 Report Posted March 12, 2019 (edited) Why are you dividing by 10 after the compare instruction? Which of D200 and D300 is from the temperature sensor and which is the setpoint? What values are you using for D200 and what are you expecting in D300? I am with @nehpets above just use [< Temperature Setpoint]------(heater) Assuming you don't need a differential. Edited March 12, 2019 by Veganic
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now