Contec F&eIT Series User Manual page 72

Isolated counter module
Hide thumbs Also See for F&eIT Series:
Table of Contents

Advertisement

Sample Program
/*======================================================
F&eIT I/F Sample Program
DEVICE ID:
Channel:
====================================================== */
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include "Fit.h"
/* Address(common) */
#define FIT_IO
#define FIT_IO_DEVICE_INFOR
#define FIT_IO_DEVICE_CONFIG
#define FIT_IO_INPUT
#define FIT_IO_OUTPUT
#define FIT_IO_DEVICE_SIZE
#define FIT_PRODUCT_CATEGORY
#define FIT_MODULE_START
#define FIT_ERROR_STATUS
/* Information(Common) */
#define FIT_PRODUCT_DIGITAL
#define FIT_PRODUCT_ANALOG
#define FIT_PRODUCT_COUNTER
#define FIT_MODULE_START_OFF
#define FIT_MODULE_START_ON
/* Address(CNT) */
#define FIT_CNT_BIT
#define FIT_CNT_OUTPUT_SIGNAL
#define FIT_CNT_OUTPUT_WIDTH
#define FIT_CNT_CH_RESET
#define FIT_CNT_INITIAL_MODE
#define FIT_CNT_INITIAL_DATA
#define FIT_CNT_INPUT_MODE
#define FIT_CNT_FILTER_SET
#define FIT_CNT_FILTER_VALUE
#define FIT_CNT_FUNCTION
#define FIT_CNT_RESOLUTION
#define FIT_CNT_CLEAR_MODE
#define FIT_CNT_DIRECTION
#define FIT_CNT_CLEAR_LOGIC
#define FIT_CNT_CLEAR_INPUT
/* Sample */
#define
#define FIT_SAMPLE_PORT
#define FIT_SAMPLE_DEVICE_ID
#define FIT_SAMPLE_CH
int main(void)
{
DWORD dwIpAddress;
DWORD dwVaBase;
DWORD dwVaOffset;
DWORD dwVaChOffset;
WORD
WORD
BYTE
BYTE
BYTE
BYTE
CNT24-2(FIT)GY
0
0ch
FIT_SAMPLE_IP_ADDRESS
hHandle;
wStatus;
byCategory;
byModuleStart;
byData[0x80];
byErrorStatus;
Using the Memory Address Map
(0x00300000)
(0x0000)
(0x1000)
(0x4000)
(0x5000)
(0x0080)
(0x00)
(0x10)
(0x11)
(0x01)
(0x02)
(0x03)
(0x00)
(0x01)
(0x12)
(0x13)
(0x14)
(0x00)
(0x01)
(0x02)
(0x06)
(0x07)
(0x08)
(0x0A)
(0x0B)
(0x0C)
(0x0D)
(0x0E)
(0x0F)
Note!"192.168.132.211"
(0x5007)
(0)
(0)
67

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cnt24-2(fit)gy

Table of Contents