Troubleshooting Omron CJ2m PLC Analog Sensor Fluctuations in Hot Water Tank System

Question:

Hello everyone, I have a 500-gallon hot water tank that is filled using a valve controlled by a PLC. The water level in the tank is monitored by an analog 4-20 mA sensor connected to an MAD42 card. We need to drain the tank every week or two for cleaning purposes. I have implemented logic to ensure the tank is at least 30% full before the valve can turn on. However, we are experiencing issues with the analog sensor when the tank is first turned on, causing the valve to malfunction. There are two conditions to be met: when the hot water level is below 2100, the valve should turn on, and when it reaches 2100, the tank should be filled based on a timer until full. The analog sensor's value sometimes fluctuates drastically, going below 0 to -65535 or exceeding 3000 before returning to normal. Is there a way to implement a filter in the PLC logic to address this issue? Please refer to the attached image for reference. Thank you in advance. - James

Top Replies

Are you using an analog scale or inputting raw data? If you're using raw data, consider using signed binary comparators. Analog inputs typically read +/-4% of the full scale and can also register negative values. This can impact the accuracy of your measurements.

The MAD42 card offers a configurable resolution range of 0 - 4000 or 0 - 8000. Based on the information provided and the screen shot, it seems that the resolution is currently set to 8000 and raw values are being used. The raw input data is as follows: -400 at 3.2mA, 0 at 4mA, 8000 at 20mA, and 8400 at 20.8mA. For more detailed information, refer to section 2-1-3 of the operation manual: https://assets.omron.eu/downloads/manual/en/v4/w345_cs1_cj1_analog_i_o_units_operation_manual_en.pdf When following Omron manuals, it is recommended to utilize the Windows calculator in Programmer mode for better understanding. In regards to the comparison of values, ensure to adjust the instructions accordingly. For example, changing <(310) to

When it comes to IO Rack, Chelton recommends switching from <(310) to

James Mcquade mentioned in a forum post the importance of changing the instruction number from <(310) to

James Mcquade raised a concern about the Hot_Water analog sensor value dropping below 0 and displaying as (-65535). Is this a mistake with the negative sign? A value of -65535 cannot be represented in 16 bits, leading to a 32-bit signed integer of 0xffff_0001 in hexadecimal. Could this be a unique flag from the 4-20mA A/D conversion process? While the issue likely involves interpreting the bits as signed vs. unsigned, something seems off about the situation.

Hi James, it sounds like you're dealing with quite an issue there! One common approach to filtering out those erratic sensor readings is to implement a moving average filter or a simple hysteresis logic within your PLC. This can help smooth out those fluctuations by averaging the readings over a certain number of samples or preventing rapid switching based on slight changes—like only allowing the valve to operate if the readings have been stable for a specified period. Additionally, you could also set limits to ignore values below a certain threshold (like -10 for instance) or apply a debounce logic. It might be worth checking if your sensor has any built-in filtering capabilities, too. Good luck!

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. What could be causing the analog sensor fluctuations in the hot water tank system?

Answer: Answer: The fluctuations in the analog sensor readings could be caused by electrical interference, sensor calibration issues, grounding problems, or signal noise.

FAQ: 2. How can I address the issue of analog sensor fluctuations in my PLC system?

Answer: Answer: One way to address the analog sensor fluctuations is by implementing a filter in the PLC logic to smooth out the readings and reduce noise interference.

FAQ: 3. What are the consequences of the analog sensor fluctuations on the operation of the valve in the hot water tank system?

Answer: Answer: The analog sensor fluctuations can lead to malfunctioning of the valve, causing issues with maintaining the desired water level in the tank and potentially affecting the overall system performance.

FAQ: 4. Can you provide guidance on how to implement a filter in the PLC logic to stabilize the analog sensor readings?

Answer: Answer: Implementing a filter in the PLC logic involves using techniques such as averaging, smoothing algorithms, or hysteresis to reduce noise and fluctuations in the analog sensor readings, ensuring more stable and accurate data for control decisions.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  â†’