Troubleshooting Mitsubishi FX5 PLC: Structured Text Timing Issues and RS485 Communication Guide

Question:

Hello everyone, I would greatly appreciate any assistance with the FX5 PLCs regarding the issues detailed below. Although I’m not sure how relevant it is, I wanted to provide specifications for my laptop and the software I am currently using: - **Processor**: Intel i5-4300M - **RAM**: 8GB - **Operating System**: Windows 10 - **GX Works3 Version**: 1.032J The first problem I’m encountering involves the Structured Text (ST) programming feature when utilizing the TON or TOF instructions. Here’s an example: ```plaintext fbMyTimer : TON iElapsedTime: Time iHeartBeat: DINT // if X001=1 wait before turning on Y000 until // 5ms has elapsed. // iElapsedTime monitors progress // iHeartBeat indicates that the PLC is operational fbMyTimer(in:= X001, PT:= t#5ms); Y000 := fbMyTimer.Q; iElapsedTime := fbMyTimer.ET; iHeartBeat := iHeartBeat + 1; ``` The issue lies in the timing; the expected 5ms delay is taking approximately 5 seconds of real time to elapse. Conversely, when I program a similar function in Ladder Diagram (LD), the timers function correctly. This discrepancy forced me to reprogram an entire machine to LD just to avoid this problem. Has anyone else faced this issue, or could anyone suggest a solution or workaround? Additionally, I’m attempting to communicate with an Omron MX2 inverter via RS485. However, I have no prior experience with Modbus, and local support is lacking. I would greatly appreciate any recommendations for resources to learn the basics. It would be incredibly beneficial if someone could share an example of how to configure both the PLC and inverter together for a guided setup. At my workplace, Mitsubishi PLCs are the predominant choice, so switching to different brands would be challenging. However, I find it frustrating to work with PLCs and software that suffer from poor support and significant issues (especially with GX Works3) in South Australia. I believe many of my challenges stem from inexperience, so I would be grateful for any recommendations for Mitsubishi PLC programming courses available in English or German, similar to the Siemens SiTrain training programs. I look forward to your helpful responses! Here are some references that may provide additional insights: - [Omron MX2 User Manual](https://assets.omron.eu/downloads/manual/en/i570_mx2_users_manual_en.pdf) (starting from page 322) - [Mitsubishi Electric PLC Manual](http://dl.mitsubishielectric.com/dl/fa/document/manual/plcf/jy997d56101/jy997d56101e.pdf) Thank you, Christoph

Top Replies

Consider implementing the fbMyTimer function with the parameters IN:= X001, PT:=t#5ms, Q=>Y000, and ET=>iElapsedTime. The Siemens S7-1200 PLC exhibits some unusual behaviors, as the timers are recalculated every time the Q or ET outputs are accessed. It's possible that the FX5 series PLCs could have similar issues.

Hello! Thank you for your prompt reply. Unfortunately, I didn't have much success with that suggestion. I'm also eager to hear if anyone can recommend additional websites or forums that might provide valuable answers to my questions. Thank you!

Have you experimented with various timer configurations? When you set a timer with a duration of 1 minute and monitor the timer's instance, does the elapsed time (.ET) progress as anticipated, or is it lagging? If I’m interpreting your concern correctly, you're indicating that a timer designed for 5 milliseconds actually takes 5 seconds to complete. Is the output (.Q) not accurate until after the full 5 seconds, or is it the representation of the elapsed time (.ET) that seems to be malfunctioning?

When I input values other than "ms" in the PLC, it triggers an error. However, I can successfully enter intervals like 500ms or 50000ms. These values function similarly to the 5ms mentioned in the original discussion. The timing appears to progress in slow motion, and once the set duration has passed, the output .Q becomes true.

Hey Christoph, it sounds like you're having quite a time with those PLCs! Regarding the timing issue with the TON instruction, it might be helpful to check the configuration of your time units in the GX Works3 settings, as sometimes the context settings can lead to unexpected behavior—especially if the timer expects time values in different formats. For the Modbus communication with the Omron MX2 inverter, I’d recommend starting with some online tutorials or forums dedicated to Modbus; they often provide great examples and can help demystify the initial setup. Also, for Mitsubishi-specific training, I’ve come across some courses offered on platforms like Udemy or even Mitsubishi's own training resources which might be worthwhile. Good luck, and I hope you get everything sorted out soon!

Hi Christoph, I can definitely relate to your frustrations with the timing issues on the FX5 PLC and ST programming! It sounds like a classic resolution problem—sometimes, ST and LD can behave quite differently due to how the execution contexts are handled. A potential workaround could be to check if the timer is being reset elsewhere in your code or if there are any unintended blockages in the scan cycle affecting its operation. Also, regarding the Modbus communication with the Omron MX2 inverter, I'd recommend starting with the basics of Modbus TCP/IP or RTU. The manual you shared is a great resource; pairing that with online platforms like YouTube can give you some hands-on examples. As for Mitsubishi PLC training, I found that there are some online courses via platforms like Udemy or the Mitsubishi Electric website that could really boost your skills. Hope this helps, and 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.

You must be a registered user to add a comment. If you've already registered,
sign in. Otherwise, register and sign in.

Frequently Asked Questions (FAQ)

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  →