EasyManuals Logo

Mitsubishi F700 Series User Manual

Mitsubishi F700 Series
408 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #231 background imageLoading...
Page #231 background image
220
Communication operation and setting
(8) Instructions for the program
1) When data from the computer has any error, the inverter does not accept that data. Hence, in the user program,
always insert a retry program for data error.
2) All data communication, e.g. run command or monitoring, are started when the computer gives a communication
request. The inverter does not return any data without the computer's request. Hence, design the program so that
the computer gives a data read request for monitoring, etc. as required.
3) Program example
To change the operation mode to computer link operation
Programming example of Microsoft
®
Visual C++
®
(Ver.6.0)
#include <stdio.h>
#include <windows.h>
void main(void){
HANDLE hCom; // Communication handle
DCB hDcb; // Structure for communication setting
COMMTIMEOUTS hTim; // Structure for time out setting
char szTx[0x10]; // Send buffer
char szRx[0x10]; // Receive buffer
char szCommand[0x10];// Command
int nTx,nRx; // For buffer size storing
int nSum; // For sum code calculation
BOOL bRet;
int nRet;
int i;
//Opens COM1 port
hCom = CreateFile ("COM1", (GENERIC_READ | GENERIC_WRITE), 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hCom != NULL) {
//Makes a communication setting of COM1 port
GetCommState(hCom,&hDcb); // Retrieves current communication information
hDcb.DCBlength = sizeof(DCB); // Structure size setting
hDcb.BaudRate = 19200; // Communication speed=19200bps
hDcb.ByteSize = 8; // Data length=8bit
hDcb.Parity = 2; // Even parity
hDcb.StopBits = 2; // Stop bit=2bit
bRet = SetCommState(hCom,&hDcb); // Sets the changed communication data
if (bRet == TRUE) {
// Makes a time out setting of COM1 port
Get CommTimeouts(hCom,&hTim); // Obtains the current time out value
hTim.WriteTotalTimeoutConstant = 1000; // Write time out 1s
hTim.ReadTotalTimeoutConstant = 1000; // Read time out 1s
SetCommTimeouts(hCom,&hTim); // Changed time out value setting
// Sets the command to switch the operation mode of the station 1 inverter to the network operation mode 
sprintf(szCommand,"01FB10000"); // Send data (NET operation write)
nTx = strlen(szCommand); //Send data size
// Generates sum code
nSum = 0; // Initialization of sum data
for (i = 0;i < nTx;i++) {
nSum += szCommand[i]; // Calculates sum code
nSum &= (0xff); // Masks data
}
// Generates send data
memset(szTx,0,sizeof(szTx)); // Initialization of send buffer
memset(szRx,0,sizeof(szRx)); // Initialization of receive buffer
sprintf(szTx,"\5%s%02X",szCommand,nSum);// ENQ code+send data+sum code
nTx = 1 + nTx + 2; // Number of ENQ code+number of send data+number of sum code
nRet = WriteFile(hCom,szTx,nTx,&nTx,NULL);
// Sending 
if(nRet != 0) {
nRet = ReadFile(hCom,szRx,sizeof(szRx),&nRx,NULL);
// Receiving 
if(nRet != 0) {
// Displays the receive data 
for(i = 0;i < nRx;i++) {
printf("%02X ",(BYTE)szRx[i]);// Consol output of receive data
// Displays ASCII coder in hexadecimal. Displays 30 when "0"
}
printf("\n\r");
}
}
}
CloseHandle(hCom); // Close communication port
}
}

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi F700 Series and is the answer not in the manual?

Mitsubishi F700 Series Specifications

General IconGeneral
Humidity95% RH or less (non-condensing)
Control MethodV/F control
Protection FeaturesOvercurrent, overvoltage, undervoltage, overheat, short circuit
Communication OptionsRS-485
Operating Temperature-10°C to +50°C
Storage Temperature-20°C to +65°C
AltitudeUp to 1000m above sea level
Overload Capacity150% for 60 seconds
Cooling MethodForced air cooling
Power Range0.75 to 630 kW (1 to 845 hp)
Output Voltage3-phase 200 to 240 VAC, 380 to 500 VAC (matching input voltage)

Related product manuals