Mitsubishi FX5 structured text and RS485

0sterei

Member
Join Date
May 2018
Location
Adelaide
Posts
3
Hi all,
I would really appreciate any help with the FX5 PLCs in regards to the issues mentioned below.

Not too sure whether this is important but I will list here information about my laptop and the software I am using:

Processor: i5-4300M
RAM: 8GB
Operating system: Windows 10
GX Works3: 1.032J

the first issue I have encountered is in regards to the ST programming feature, using the TON or TOF instruction.
Example:

<local label>

fbMyTimer : TON
iElapsedTime: Time
iHeartBeat: DINT

<program body>
// if X001=1 wait before turning on Y000 until
// time (5ms) has elapsed.
// iElapsedTime is used to check/monitor the progress
// iHeartBeat is used to display that the PLC is running

fbMyTimer(in:= X001, PT:= t#5ms);
Y000 := fbMyTimer.Q;
iElapsedTime := fbMyTimer.ET;
iHeartBeat := iHeartBeat +1;

the problem is consisting in the set time elapsing too slow. This means the 5ms which are used in this example will require around 5s in real time to elapse. When I decide however to program the same thing in LD the timers are working fine which is what I had to do already to an entire machine just because of this issue.
Has anyone had this issue before or know how I could fix it/work around it?

Also I am trying right now to communicate with an Omron MX2 inverter via RS485. Unfortunately I have never worked with Modbus before and there is no local support either. I would appreciate very much if anyone could advise a good way of learning the basics.
Else it would be incredibly helpful if someone could post an example on how to set up the PLC and inverter together so I could work along this.

Mitsubishi PLCs are the commonly used PLCs at the place that I am working at which is why it would be very difficult to switch to different PLCs however, it has become very frustrating to work with PLCs and software for which are poorly supported (at least in South Australia) and seem to have a number of major issues (GX Works3).
As I believe that some maybe most of my issues are caused by inexperience I would therefore appreciate if anyone could advise if any programming courses for Mitsubishi PLCs are available (in English or German) such as offered by other PLC manufacturers.(e.g. SiTrain training courses offered by Siemens)

I am looking forward to some helpful responses.


links for references:


https://assets.omron.eu/downloads/manual/en/i570_mx2_users_manual_en.pdf (from page 322)


http://dl.mitsubishielectric.com/dl/fa/document/manual/plcf/jy997d56101/jy997d56101e.pdf



Cheers,
Christoph
 
Try using
fbMyTimer(IN:= X001, PT:=t#5ms , Q=>Y000, ET=>iElapsedTime);

Siemens S7-1200 have some odd quirks where the timers are evaluated each time .Q or .ET are accessed, perhaps FX5s have the same problem.
 
Hi,

thank you for the response. unfortunately I was not all too successful trying that.
Also keen to know if anyone can recommend any other sites which would be worth hitting up to get some answers to my questions.
Cheers
 
Have you tried messing with different timer setups? If you just set a .PT of a minute and view the instance of the timer, does the .ET elapse as expected or is it running slowly?

If I understand you correctly, you are saying that a 5 millisecond timer takes 5 seconds to finish? Does .Q come true not before 5 seconds, or is it the representation of .ET that is behaving oddly?
 
If I enter any other values but ms the PLC goes to error, I can however enter 500ms 50000ms etc. This then behaves just like the 5ms from the original post.
The time elapses in slow motion and when elapsed .Q comes true.
 

Similar Topics

Hello, I'm currently working on a project where I need to read values off my 0-3kg Strain Gauge and display them on my HMI display. I've...
Replies
9
Views
1,844
I’m fairly new to PLC programming. This is our first machine that uses an FX5 PLC rather than an FX3, and therefore GX Works3 instead of GX...
Replies
1
Views
1,261
Hi, Today, i got another new task. its Mitsubishi now. I don't know how to handle this. when I try to download an HMI screen, which has many data...
Replies
1
Views
1,100
Hi, I am trying to create a program for the 5U that can communicate to 2 or 3 VFDs (individual control, not broadcast) using the inverter...
Replies
0
Views
1,037
Hello everyone! I am the beginner with PLC's. I have a plc mitsubishi fx5, and i want to control inverter by built-in analog in that plc. I set up...
Replies
2
Views
2,398
Back
Top Bottom