Gxworks3 with FX5u

bill4807

Member
Join Date
Mar 2013
Location
michigan
Posts
328
Hi everybody,

First time with gxworks 3 and it take a little getting use to. I have been skimming the manuals and writing my programs for the FX5u and GOT simple.
All is well, except a few things.
How do i properly set and extract the date and time data?
I have set SD210, 211, 212 with the year month and day.
I have pulsed SM210. Now where do i check if the CPU has taken my date?
i thought i would have been able to set the date and time in a parameter on the PLC, then just extracted it for the HMI, since the HMI has no battery.
The plc didnt come with one either, which i thought was strange.

Anyways thanks for reading.
 
You can use the function TRD to read the clock data & put it into registers or function TWR to write to it.
If you go to element selection & clock instructions there are many functions from reading/writing comparison increment decrement etc.
 
I did see another way to mov this data with SM8012-8016 i think, might have been SD...
Thats the thing, there is this way and then SD210, and then the way you said.

Are all of these somehow coming from the same spot?

It seems like when i use the SM8012 way i cannot use the date/time instruction because it doesn't let me add any triggers..
I have to use a numeric display, but then i cannot use forward slash for date or colon for time seperation.

Do i need a battery for the PLC?i left it turned off all night and this morning turned it on and the date was updated to today. Im just not sure how it keeps track of the RTC with no battery?

Doesnt the battery go under the fron middle cover, thats what it looks like.
 
I think the RTC chips have a built in battery, this is because many PLC's are going away from battery backed ram so they have battery less drive memory
There may be a possibility of a super capacitor that can keep ram data for moths if not years, I know that even the old A series held the program for over a week without a battery, we replaced it & when I powered it up on the bench it still had the program, it surprised me, however, never found this on a Q series
 
Last edited:
iQF has super capacitor that guaranties 30 days of backup and possibility of additional battery that guaranties several years of backup (3 or 5, I can't remember).
In order to read data you need to activate bit FX5CPU.stSM.bClock_Data_Read_Request (same as SM213).
Then you can read:
FX5CPU.stSD.stClock_Data.uYear (SD210)
FX5CPU.stSD.stClock_Data.uMonth(SD211)
FX5CPU.stSD.stClock_Data.uDay(SD212)
FX5CPU.stSD.stClock_Data.uHour(SD213)
FX5CPU.stSD.stClock_Data.uMinute(SD214)
FX5CPU.stSD.stClock_Data.uSecond(SD215)
FX5CPU.stSD.stClock_Data.uDay_of_the_Week(SD216).
 
I'm sure the GOT retains the date/time in the same way as the PLC RTC, you can sync the GOT with the PLC RTC or the other way round, never done it but in GTDesigner there are clock functions

Clock1.png Clock2.png Clock3.png
 
Not sure about FX5, but most PLC's traditionally the RTC is not very accurate, probably better to sync the PLC with the GOT RTC.
Also if you set the GOT to update the time when downloading a project it will take the PC time which if you regularly go on-line or is connected to your IT network it will update it to the correct time.
 
I'm sure the GOT retains the date/time in the same way as the PLC RTC, you can sync the GOT with the PLC RTC or the other way round, never done it but in GTDesigner there are clock functions

Yes i have done what you have in the first picture. PNG1.grabbed clock data from PLC. It seems to work ok.
Im just not sure about long term once the system is installed.
I do not have enough time to test for this.i wonder if i should pulse SM210 occationally, but i cannot because the date set in the registers is todays date only, i guess its just to do a first set/initial setting.
I am only doing the date, right now.
To get the date data in the PLC i set registers to mov the current date today, then pulsed this sm210 to send it into the PLC. This is how i interpereted it at least. And it did update the GOT.
Does this sound correct, or did i get lucky?
 
Not sure about FX5, but most PLC's traditionally the RTC is not very accurate, probably better to sync the PLC with the GOT RTC.
Also if you set the GOT to update the time when downloading a project it will take the PC time which if you regularly go on-line or is connected to your IT network it will update it to the correct time.

This will not be hooked to an IT network and i will not be doing anymore downloads after it is installed.
It is a small application only controlling some auxilliary pieces of equipment.
 
If you have no way of updating the actual time regularly then put a page on the screen where they can manually update it.

The clocks are very poor and will be out an hour within a year.
 
Not sure how you can change the clock on the HMI, I tried but there appears to be no function, there are some special registers associated with the GOT clock but could not figure out in the time I had how you can change the time with operator input (not sure it works on the simulator) & I don't have a GOT to hand so cannot try it, If not the way I would do it is use normal "D" registers on the HMI so one for year, one for month & one for day (and of course 3 for the time), these could be changed by operator input, sent to the PLC, the PLC updates it's own clock & then the GOT Clock synced with the PLC, I bet somewhere someone has written a function for altering the clock, seems weird there is no built in function (well not where I have found yet).
 
Not sure how you can change the clock on the HMI, I tried but there appears to be no function, there are some special registers associated with the GOT clock but could not figure out in the time I had how you can change the time with operator input (not sure it works on the simulator) & I don't have a GOT to hand so cannot try it, If not the way I would do it is use normal "D" registers on the HMI so one for year, one for month & one for day (and of course 3 for the time), these could be changed by operator input, sent to the PLC, the PLC updates it's own clock & then the GOT Clock synced with the PLC, I bet somewhere someone has written a function for altering the clock, seems weird there is no built in function (well not where I have found yet).

Yes thisnis exactly what i was thinking to try.
Have some registers for each time and date. Then have the operator change then press enter or some button to MOV the data into other registers that then feed the SM or SD bits, then trigger the pulse clock bit for the PLC time, and hopefully since the GOT is set up to pull PLC clock data, it should update the GOT.
I will test in a few days. On another project for the next couple days, then I will be back on the mitsubishi.
 
You don't need to write to the SD's just use the in-built functions for updating the clock, it's simple, just have a button on the HMI that writes a true & use the bit to call the function.
 

Similar Topics

Hi Guys, Who amongst us has worked on Mitsubishi FX5U with Analog extension modules and GX Works3? Please, I will need your support here...
Replies
0
Views
910
A cry for help to parky and Mitsubishi gurus. How do you confirm the firmware version of the iQR PLC or a module such as the RJ71GN11-T2? I have...
Replies
3
Views
1,043
Hi Friends How can I create/Call in a subroutine in GXWork3/GXworks2?
Replies
4
Views
1,580
Hello there is a way to do the polyfit on 3rd degree on this plc. for imput i have a munimum value of 5 X and 5 Y value for example Measured...
Replies
58
Views
2,627
Hi All, I am after some assistance setting up kepware to take tag data from an FX5U PLC, I have tried many many port numbers and still cant get a...
Replies
2
Views
164
Back
Top Bottom