Data-logging from FX3u-48M to PC

Stevo76

Member
Join Date
Nov 2021
Location
Kent
Posts
4
Hi there everyone.
I’m looking for some guidance as a PLC newbie. I have been tasked with reading the kWh data from a set of 20 panel mounted meters. Currently it is a thrice daily chore of entering the data with pen onto a spreadsheet then transferring to a server based spreadsheet for all to view our energy usage across the site.
These meters also have a 100ms open-collector pulsed output per kWh. The highest rate so far has been ~50 pulses in one hour; so very low rate. We have a spare FX3u-48M PLC so my question is can we use the inputs to drive counters then export or access the data via LAN to a dedicated PC ? Is the “pulse” seen as a digital input ?

BACE723D-0854-4085-B6DC-E26260718AF3.jpeg 9FDE834E-F410-432E-9103-A4409C3CAAFD.jpeg 40B2DC6F-0F53-4AF7-9593-4F1E640F1057.jpg
 
Yes, no problem, I suggest you do not use counters just "D" memories but use 32 bit (Double integer) using single int's will only give you 32767, whereas a 32 bit can be 2,147,483,647.
Just be aware that all "D" memories are 16 bit so when you use them as 32 bit then it takes two consecutive registers.
Also use the range in the retentive memory area by default these are D200 to D511, Also use the pulse function designated by a "P" at the end of the function.
Not sure if you are using GXDeveloper or GXWorks2 but assuming GXDeveloper then the following code
Signal from meter 1 (X0)
-----| |---------[DINCP D200]---- //D200 + D201

Signal from Meter 2 (X1)
-----| |---------[DINCP D202]------ // D202 + D203

And so on
If you need high speed then the FX can use X0 to X7 as high speed (20KHZ) tied to hardware 32 bit counters if set up but you will not need them as the inputs at normal mode is 10ms & a possible scan time of program at 20ms or 50 times a second.
 
Thanks for the quick reply. Yes I’m using GXDeveloper. I’m with you so far as far as the D memories are concerned for my 20 inputs. I’ll get that programmed first.
My next question is how to access/send the stored data to a network PC
 
That is a bit of an open ended question, there are a number of ways.
The simplest way is to add a 232BD board (fits on the left hand side of the PLC).
Then use open type protocol, you could use a USB to 232 converter on the PLC & write a small program in VB to read the data, I would suggest using SQL Server Express that is free for logging the data to a database but creating simple CSV files would be easy.
The It also has the ability to log data to a database (not sure if it requires a separate licence for the data logging) the cost is not cheap though last time I purchased one the licencing of the driver was about £800.00.
Using Kepserver (or any of the OPC servers) it is possible to either use an FX3U-ENET card & do it on ethernet or a Ethernet to 232 converter (and use the 232BD board) or go via an SC09 cable (232 to 422) direct to the PLC programming port.
If you need any help with the code I can help you out there.
So.... Here are the possibilities.

PLC programming port to SC09 to 232/USB adapter (then kepserver )

232BD board to 232/USB Adapter on PC (then Kepserver or write a VB)

232BD board to a serial server (Ethernet to 232 ) to PC use kepserver (use the built in Ethernet encapsulation).
It all depends on your budget & distance from the PLC to PC, if you give more info on the distance from PLC to PC I could suggest the cheapest options.
I have done this a few times for gathering data from FX PLC's.
Also give an idea on what you want i.e.
are 16 bit integers large enough for the time period you want to log
When do you want to capture the data (times & how often)
Is this going to be for example every day at a particular time & will it be for that period, do you need a running total.
so many options.
Scenarios:
Capture the data at midnight & reset the count values (probably only need to use 16 bit registers).
Just log the ongoing totals & not reset them (need to do something when they reach the max).
 
Thanks for the wealth of information. I might just pass this on to I.T. but for now the 232BD to PC which will be 5 metres away looks the easiest option. We’ll probably use continuous logging for now.

Once again thanks for the advice.
 
It is possible (if your company is large enough) will have SQL servers, talk to IT, if so the PC could be configured to have access to a new database based on the fields you need to log. if using the 232BD board plus an I/O server like Kepware then there is no need to do any programming as such for the BD board as it's default is for MC protocol (Mitsubishi programming), you may wish to change just the baud rate but the default 9600 will probably be fast enough for what you are doing.
Not sure what your IT will allow but if they have SQL & the company use MS Office then it would be quite easy to create automated spread sheets that get the data from the database & format it into a usable report.
See attached spreadsheets however, I do not have MS office on this PC so loaded one into Open office so data & format is a little off but it gives you an idea, this template allows the user to select a date & load that date's production rate into tables & graphs, the template is protected so cannot be modified & is saved as a normal spreadsheet.

Excel Data.png Graphs.png
 

Similar Topics

Hi folks, I'm not as accustom with Siemens & WinCC, however I've been asked to increase the amount of data an existing application is logging...
Replies
2
Views
88
Hi, Wy we log data in PLC using DLG instruction, when we have option to log data in HMI
Replies
1
Views
97
Hi everyone id like to start by saying im not a PLC programmer so my technical terminology is limited. i would like advice on what software is...
Replies
4
Views
318
Hi All, I am looking for recommendations for a data logging software package that can be used for a simple 1 PLC installation. The installation...
Replies
13
Views
1,420
Hello all, I am working on a DA70A flex edge data logger. I am it communicating with a computer on the network. I can ping it and everything looks...
Replies
1
Views
398
Back
Top Bottom