### Service/Datalog/datalog_dio_on_change/ioPAC8500_iec_datalog_dio_on_change/ioPAC8500_iec_datalog_dio_on_change_readme/ioPAC8500_iec_datalog_dio_on_change_readme.md

# ioPAC8500_iec_datalog_dio_on_change

## Detailed Description

### Background

ioPAC8500 Datalog DIO On Change IEC Sample Project

##### Copyright

Moxa Inc.

##### Date

06-12-2014

##### Author

TJ Tai

##### Version

V1.0

## Scenario

### Introduction

This is Datalog DIO On Change IEC sample project. The controller start data logging by DI2 status and log DI0 and DI1 if status change, then upload data to FTP server by specific condition.

ioPAC8500_iec_datalog_dio_on_change scenario

## Operating Environment

### Hardware Environment

- CPU module:

    ioPAC 8500-9-RJ45-IEC-T

- Slot 1:

    85M-1602-T

### Software Environment

- Programming Tool:

    ISaGRAF 6.3

- Configuration Tool:

    Moxa RTUxpress 1.1

### Config Setting

Config file: ioPAC8500_iec_datalog_dio_on_change.rtu

## Step by Step

### Initialization

1. Import config file onto ioPAC
2. Open IEC project via ISaGRAF
3. Build -> Build Solution
4. Import IEC porject onto ioPAC

### Step 1

Monitor datalog service status and remaining space.

### Step 2

Detect DI2, if its status is on, then start data logging. Logging DI0 and DI1 if its status has been changed. [Logging condition is setting in the RTUxpress]

### Step 3

Detect DI2, if its status is on, then FTP upload operation start, the data will upload to specific place.

## Reference

- ISaGRAF Function Block Help:

  > please press F1 button on the function block which need more description in the ISaGRAF

- Moxa ioPAC ISaGRAF Reference Manuals:

  > Please press Help -> Moxa ioPAC ISaGRAF Reference Manuals in the Moxa RTUxpress utility