User's Manual
Table Of Contents
- Preface
- Table of Contents
- Chapter 1 Introduction
- 1.1 Receiving and Inspection
- 1.2 Appearances
- 1.3 Installation Steps
- 1.4 Storage
- Chapter 2 Installation and Wiring
- Chapter 3 Start Up
- Chapter 4 Digital Keypad Operation
- Chapter 5 Parameters
- Chapter 6 Fault Code Information
- Chapter 7 Troubleshooting
- 7.1 Over Current (OC)
- 7.2 Ground Fault
- 7.3 Over Voltage (OV)
- 7.4 Low Voltage (Lv)
- 7.5 Over Heat (OH)
- 7.6 Overload
- 7.7 Keypad Display is Abnormal
- 7.8 Phase Loss (PHL)
- 7.9 Motor cannot Run
- 7.10 Motor Speed cannot be Changed
- 7.11 Motor Stalls during Acceleration
- 7.12 The Motor does not Run as Expected
- 7.13 Electromagnetic/Induction Noise
- 7.14 Environmental Condition
- 7.15 Affecting Other Machines
- Chapter 8 Maintenance and Inspections
- Appendix A Specifications
- Appendix B Accessories
- Appendix C How to Select the Right AC Motor Drive
- Appendix D CE
Chapter 5 Parameters|VFD-S Series
5-74 Revision August 2006, SE08, SW V2.61
3.7 Communication program of PC:
The following is a simple example of how to write a communication program for Modbus ASCII
mode on a PC in C language.
#include<stdio.h>
#include<dos.h>
#include<conio.h>
#include<process.h>
#define PORT 0x03F8 /* the address of COM1 */
/* the address offset value relative to COM1 */
#define THR 0x0000
#define RDR 0x0000
#define BRDL 0x0000
#define IER 0x0001
#define BRDH 0x0001
#define LCR 0x0003
#define MCR 0x0004
#define LSR 0x0005
#define MSR 0x0006
unsigned char rdat[60];
/* read 2 data from address 2102H of AC drive with address 1 */
unsigned char tdat[60]={':','0','1','0','3','2','1','0',’2', '0','0','0','2','D','7','\r','\n'};
void main(){int i;
outportb(PORT+MCR,0x08); /* interrupt enable */
outportb(PORT+IER,0x01); /* interrupt as data in */
outportb(PORT+LCR,(inportb(PORT+LCR) | 0x80));
/* the BRDL/BRDH can be access as LCR.b7==1 */
outportb(PORT+BRDL,12); /* set baudrate=9600, 12=115200/9600*/
outportb(PORT+BRDH,0x00);
outportb(PORT+LCR,0x06); /* set protocol, <7,N,2>=06H, <7,E,1>=1AH, <7,O,1>=0AH,
<8,N,2>=07H, <8,E,1>=1BH, <8,O,1>=0BH */
for(i=0;i<=16;i++){
while(!(inportb(PORT+LSR) & 0x20)); /* wait until THR empty */
outportb(PORT+THR,tdat[i]); /* send data to THR */ }
i=0;
while(!kbhit()){
if(inportb(PORT+LSR) & 0x01){ /* b0==1, read data ready */
rdat[i++]=inportb(PORT+RDR); /* read data form RDR */
} } }