Author Topic: Data Logger  (Read 35006 times)

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Data Logger
« on: September 13, 2010, 02:49:09 PM »
Hi,

I want to use a T100md888 as a data logger.  I will use 7 of the inputs to count pulses from various items of equipment.

We need to record the number of pulses every 30 minutes and total the readings for a 24 hour period.

The PLC needs to record this data for approximately four months! - This is where the problems arise......

Example

If I count the pulses on one input and store the value in 48 DM locations (every half hour x 24 hours) plus the total DM and the counter = 50 DM's

These 50 DM's = 1 day, if I run this for four months  +/- 120 days I will need 6000 DM locations plus a few spare for the required custom functions.

To use the other six inputs I will need 42000 DM locations!!

Is there a way to save the data to an external device or increase the DM size??

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:Data Logger
« Reply #1 on: September 13, 2010, 08:35:13 PM »
I've got a couple of suggestions/question on your data logging issue:
  • What is the maximum data value that you need to save?  If it is in the range of 0..255 (8 bit) you could pack two 8-bit values into each 16-bit DM[] entry.
  • There is probably no need to save the 24 hour summation. You can generate this data from the 30 minute samples. This will save you a little space.
  • The T100MD also has EEPROM memory that would hold an additional 1700 16-bit integers.
  • Use an external PC connected to the T100MD via RS232 or RS485 to a PC to do the data logging.  I've used a SCADA program named, DaqFactory, from www.azeotech.com to do all of the data logging for one of my projects.

Good luck,

Gary D

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Data Logger
« Reply #2 on: September 13, 2010, 10:15:53 PM »
Thanks Gary for the good suggestions.

One more possibility: If you can connect the PLC to the PC's serial port, the PLC can instruct the PC to open a file and store the data as a text file. This is extremely flexible since the PLC can create file name based on the date or time or month and then append data to it as often as you like. The data can be created in CSV format so that an Excel spreadsheet program or other database software can simply import the data for analysis.

If you use our PLC that has built-in Ethernet (such as the Nano-10 or the F-series PLC) the PLC can even use the <REMOTEFS> tags to open a data file on any PC connected to the LAN or the Internet. This allow the data to be transported directly to the destination computer without user intervention.
« Last Edit: September 13, 2010, 10:16:44 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Data Logger
« Reply #3 on: September 14, 2010, 10:31:04 AM »
Thanks Gents,

Unfortunately, I won?t have a PC to hand as these are installed temporally onsite to collect the required values.  

We may need 2 or 3 per site and they maybe many meters apart.
I do need the half hour readings along with the day totalised value.  

Can I use the Print function to print to some external storage media?  

Can I create the CSV on an external drive like a SD or CF card?  Are there any such items in the market?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Data Logger
« Reply #4 on: September 14, 2010, 11:01:28 AM »
If you upgrade the memory to M2018P, it adds 7750 x 16-bit words of non-volatile storage to the T100MD+ PLC. That's about the maximum about of non-volatile memory T100MD888+ can support.

If you use Nano-10 PLC with FRAM-RTC, there are 11K words of FRAM memory plus 4K words of DM (can be made non volatile), giving you a total of 15K words per PLC.

Since each Nano-10 has 4 digital inputs, you can use two Nano-10 per site, each to handle 3 inputs. That means about 5K words per input - you are almost there :).

If you can find a flash memory drive that accept formatted data  inputs from its RS232 then certainly our PLCs use the PRINT command to send data to these kind of devices. However, such devices are getting harder to find in an increasingly network world. When devices are connected to the network/internet there is rarely a need to physically attach external memory devices to PLC anymore since data can be moved about electronically. Even in remote location devices are increasingly connected to the network via cellular modem, 3G modem etc.


Note:
There are other peripheral products under development including some prototypes of large EEPROM, and flash etc. Not all are expected to be made into final products but if there are OEM interests (read: medium to large annual qty demand) we may be able to provide customized solution. You can email to support@tri-plc.com with more details about your applications and see if we can suggest something.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Data Logger
« Reply #5 on: September 14, 2010, 11:11:56 AM »
Hi,

I have a Nano PLC, how do I access the 11k Fram memory locations? DM[4001] - DM[1100]?? (I have the FRAM module installed)

I could use two of these connected to a gsm modem if I can find one that has an ethernet or RS485 port??

Cheers.

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Data Logger
« Reply #6 on: September 14, 2010, 11:49:23 AM »
FYI,

I have found this product:

http://www.adfweb.com/home/products/datalogger_modbusrtu.asp


It will log approximately 85,000 samples if the registers are consecutive and approximately 45,000 samples if the registers are all not consecutive.

This might just do the trick. I could roll over every 24 hours and just use 305 DM's, 50 per input.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Data Logger
« Reply #7 on: September 14, 2010, 02:24:08 PM »
Hi,

I have a Nano PLC, how do I access the 11k Fram memory locations? DM[4001] - DM[1100]?? (I have the FRAM module installed)

I could use two of these connected to a gsm modem if I can find one that has an ethernet or RS485 port??

Cheers.

The 11K words of FRAM is accessible using the SAVE_EEP and LOAD_EEP command. FRAM is non-volatile memory just like EEPROM, although it is a much more advanced (and expensive) technology.

A device made by D-LINK: http://www.dlink.com/products/?pid=524 allows you to connect up to 4 Nano-10 PLCs to the 3G wireless network. Once connected your PLC can open data file on any PC running TLServer and upload data.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Data Logger
« Reply #8 on: September 14, 2010, 03:05:28 PM »
Ok Thanks for the info.

Do you think USB support for flash drives will find its way onto the PLC's?  it would certainly help this application!

I?m sure this would also be handy for other functions as well

One last question on the subject,  if I can find a 2.5"hdd with an Ethernet port effectively making it a portable NAS drive, can I use the function described earlier saving data as a CSV or txt file?

PS.  What is the name of this function!

Cheers

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Data Logger
« Reply #9 on: September 15, 2010, 09:38:23 AM »
It is unlikely that a USB flash drive interface will be added. This requires a USB host port and the device driver.

The PLC is only able to open a file on PC that runs TLServer software. This is because TLServer provides a network service that allows our PLC to remotely open a connection with it and instruct it to open a file on the PC hard drive and append data to it. So a network hard drive will not work. But any cheap Netbook PC with a USB-to-RS232 converter or USB to RS485 converter can be used locally to store the data sent from the PLC.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Data Logger
« Reply #10 on: February 22, 2011, 02:24:04 AM »
Hi,

Still looking to crack this one!!!

Can you please have a look at the attached PDF.  Its an SD card to serial device that is accessible from the RS232 port.

The command lines seem simple enough if I can send these from the PLC RS232 port?

Can you advise what function I would need to use to write a DM value to the SD card?

Many Thanks
« Last Edit: February 22, 2011, 02:31:20 AM by BC SYSTEMS »

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Data Logger
« Reply #11 on: February 22, 2011, 02:30:23 AM »
Go to Download Center for Manual, Driver and Tutorial.

Keyword: DB-DP11118

http://www.sure-electronics.net/download/

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Data Logger
« Reply #12 on: February 22, 2011, 04:02:42 PM »
On the first glance of the data sheet it should work with our PLC. You do have to write the portion of the code that handles the response code from the device.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:Data Logger
« Reply #13 on: February 23, 2011, 01:54:16 AM »
Hi Thanks,

What function would I use to send the command out to the device?

Cheers

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Data Logger
« Reply #14 on: February 23, 2011, 03:00:35 AM »
PRINT #1 for sending CR-terminated ASCII string to the device out of serial port #1 (normally RS232 except Nano10 which is an RS485 port).

INPUT$(1) command is used to read data from the serial port. However, this read function is non blocking and it will return an empty string if there is no complete string (with Carriage Return) in the current buffer. So you need to check it either in a loop or use a timer to trigger another function to check the input after some delays.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS