Home
Programming Manual SH(NA)-080078-A
Contents
1. IBM PC AT compatible Relayed network x x x x x x x x Ethemet x x x Computerin x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU Relayed station CPU Relayed module 3 Property list Property Patterns Property Default Value 8 ActControl TCR DTR OR Depending on used cable _RTS 513 CPU FXOCPU CPU type corresponding to target station 1 ActPortNumber PORT 1 IBM PC AT compatible side COM port number ActTimeOut 10000 Any value specified by user in ms units 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 13 ActQJ71C24 control The following table indicates the properties possessed by the ActQJ71C24 control and their default values 1 When there is relayed module in addition to connected station side Q series compatible C24 a Configuration b Property patterns Connected Station CPU elayed Station ConnectedQ series QcPU Relayed Network QCPU QnA ACPU station compatible E CPU 024 modue Q mode compatible Relayed network REN CET station CPU module Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU
2. c Property list Property Patterns SIT e mica we 19200 ActBaudRate BAUDRATE Match to the setting of Q series compatible C24 19200 ActConnectUnitNumber Connected station side module station number ActControl OR Depending on used cable _RTS P ActCpuType CPU P 02CPU CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 Fixed to 0x00 Ox3FF Ox3FF ActDidPropertyBit oon 0x01 invalid 0x01 invalid 0x00 valid 0x00 valid ActDisdPropertyBit 0x01 invalid 0x01 invalid 0x00 valid 0x00 valid ActIntelligentPreferenceBit Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 1023 Connected station Connected station ActlONumber 1 Fixed to 0x3FF Fixed to side module side module address address 0 ActMultiDropChannelNumber 0x00 Fixed to 0x00 Fixed to 0x00 Fixed to 0x02 Fixed to 0x00 1 As the I O address specify the value found by dividing the actual first number by 16 2 Note the following points when making access via the Ethernet module Q series compatible E71 QE71 For ActNetworkNumber and ActStationNumber specify the value set in the parameter setting of the target station side Q series compatible E71 or QE71 Setthe MNET 10 routing information in the parameter setting of the Q series compatible E71 or QE71 Also when making setting specify other than the automatic response syste
3. Control Name Usabilit ActAJ71QE71UDP ActAJ71E71UDP AdQCPUQUSBB O ActCCG4QnA d AcICCBD Usable x Unusable 1 An error is returned if own board access is made 2 An error is returned if access to the QnACPU is made 39 An error is returned if access to the QnACPU is made via the MELSECNET 10 or MELSECNET I Feature Writes time to the clock data of the PLC CPU Format VB IRet object SetClockData iYear iMonth iDay iDayOfWeek iHour iMinute iSecond Long IRet Returned value Output Integer iYear Year value to be written Input Integer iManth Month value to be written Input Integer Day value to be written Input Integer iDayOfWeek Day of week value to be written Input Integer iHour Hour value to be written Input Integer iMinute Minute value to be written Input Integer iSecond Second value to be written Input VC object ReadBuffer sYear sMonth sDay sDayOfWeek sHour sMinute sSecond Long IRet Returned value Output Short sYear Year value to be written Input Short sMonth Month value to be written Input Short sDay Day value to be written Input Short sDaYOfWeek Day of week value to be written Input Short sHour Hour value to be written Input Short sMinute Minute value to be written Input Short sSecond Second value to be written Input 4 21 4 FUNCTIONS MELSEC 4 Explanation An erro
4. 71 1 JavoeDEJ7zIQBRIS _ __ A2SHCPU as ASH w7oDEJzIQRES 2SHCPU S ASH AeoBDEJetBTH _ A2AS AsoBDEJetBTIS _ A2ACPUSS azas azas A2ACPUP21 R21 A2AS1 A2AS1 4 FUNCTIONS MELSEC b Type code list CPU Network Board Type When CPU own When LLT is CPU Network Board Type When CPU own When LLT is board is connected connected board is connected connected 93 93H 35 82 83 82 83 2 2 4 8 8 9 L DEO ES DE pc FO 8E F1 F2 9E 8DH 8DH 9DH 9DH 84 84 84 H A273UHCPU S3 84 H A2H A70BDE J71QLP23 GE A2ACPU S1 93 2 90 90 90 90 84 H ja2acpu s1 94 ASOBDE A2USH SI A2ACPUP21 R21 93H 1 When using the TCP IP of the E71 or QE71 refer to the manual of the corresponding module 2 When access to the ANUCPU QnACPU QCPU A mode or A273UHCPU S3 is made from the C24 or E71 the type code equivalent to that of the AnACPU is returned 92H 93H 94H 3 When access to the ANUCPU QnACPU QCPU A mode or A273UHCPU S3 is made from the C24 E71 or UC24 via the network the type code equivalent to that of the AnACPU is returned 92H 93H 94H 4 FUNCTIONS MELSEC 4 When
5. 1 Configuration 2 Property patterns Relayed Station CPU Station CPU FAVOS DANON onnected Relayed Relayed Network station CPU A module QnACPU 2080 GNA CPU Relayed network MELSECNETAOH x x x x x x x x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 3 Property list P Default Val Property Patterns roperty efault Value ActCpuTimeOut Any value specified by user in 250ms units 17 ActCpuType CPU CPU type corresponding to target station 22526 1280 ActDestinationPortNumber 0x500 Port number of connected station side module ActHostAddress 1 1 1 1 Host name or IP address of connected station side module 0 ActNetworkNumber 0x00 Target station side module network number 255 E ActStationNumber OxFF OxFF Target station side module station number 10000 Any value specified by user in ms units 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 5 ActAJ71QE71UDP control The following table indicates the properties possessed by the ActAJ71QE71UDP control and their default values 1 Configuration 2 Property patterns Connected Relaved Station CPU c Station CPU Ren eee onnected Relayed Relayed Network acpu station ER QEA module QnACPU RO
6. e 285 Relayed network IBM PC AT compatible x Ethernet Computerin x x ecu x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU Relayed Relayed station CPU module 3 Property list Property Patterns iid _ 9600 ActBaudRate BAUDRATE Fixed to BAUDRATE 9600 1 9600 8 ActControl TCR DTR OR Depending on used cable _RTS ActCpuType ay AIN EN CPU type corresponding to target station Target station side module ActNetworkNumber Fixed to 0x00 Fixed to 0x00 tuf network number IBM PC AT ActPortNumber OHNE C AT compatible side COM port number 255 Target station side module Target station side module ActStationNumber Fixed to OxFF 3 9 OxFF station number station number ActTimeOut 10000 Any value specified by user in ms units 1 BAUDRATE 9600 may be used only when the connected station CPU is the ABUSHCPU S1 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 12 ActFXCPU control The following table indicates the properties possessed by the ActFXCPU control and their default values 1 Configuration 2 Property patterns Connected Connected Relayed FXCPU ud ES FXCPU station CPU module CPU MELSECNETAOH x x x x
7. IBM PC AT compatible b Property patterns SN EUER elayed Station Own Board Relayed Network QCPU QnA ACPU x 1 FXCPU 1 x x x x MEsENEWO x x x x x 5 meuseoner x x x x Emme x x Computerin x x x x x ccu S x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU C Property list Patterns Property Default Value 1025 ActCpuType CPU BOARD CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 ActlONumb Fixed to 0x00 EID ActNetworkNumber Fixed to 0x00 d ActPortNumber Board No of IBM PC AT compatible side CC Link board T ER 1 PORT 1 to PORT 4 first to fourth boards ActStationNumber Fixed to OXFF Target station side module station number ActUnitNumber Fixed to 0x00 Mr 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 22 ActAnUBD control The following table indicates the properties possessed by the ActAnUBD control and their default values 1 Configuration 2 Property patterns Connected Extension base unit Relayed Network QCPU QnA ACPU Own Board FXCPU Relayed ES wasewemod x x Relayed network 2 lox 2 die Ethernet Accessible Property pattern with
8. HRESULT hResult Returned value of COM Output SHORT sYear Year value to be written Input SHORT sMonth Month value to be written Input SHORT sDay Day value to be written Input SHORT sDayOfWeek Day of week value to be written Input SHORT sHour Hour value to be written Input SHORT sMinute Minute value to be written Input SHORT sSecond Second value to be written Input LONG Returned value of communication function Output 4 3 13 GetCpuType PLC CPU type read hResult object GetDevice szDevicelist IplRetCode HRESULT hResult Returned value of COM Output BSTR szCpuName PLC CPU type character string Output LONG CPU type code Output LONG klplRetCode Returned value of communication function Output 4 3 14 SetCpuStatus Remote control hResult object SetCpuStatus lOperation HRESULT hResult Returned value of COM Output LONG lOperation Remote run stop pause Input LONG klplRetCode Returned value of communication function Output 5 SAMPLE PROGRAMS MELSEC 5 SAMPLE PROGRAMS This chapter shows the sample programs created on VB and VC 5 1 VB Sample Program This sample program is designed to read the CPU type of the and read write device values using the ActACpu control or ActEasylF control This sample program was created on Visual Basic 6 0 1 Using method Load the form and choose the control t
9. Relayed Relayed station CPU module IBM PC AT compatible b Property patterns SN EUER CPU elayed Station QnACPU FXCPU CPU MELSECNET oH x x 0 x x x x 5 x x x x Eme x x x x Computerin x x x x x ecu x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list Property Patterns iid simis 1025 ActCpuType CPU_BOARD CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 ActlONumb Fi FF T ActNetworkNumber Fixed to 0x00 Fixed to 0x00 arget station side manus d network number Board No of IBM PC AT compatible side CC Link board TN 1 PORT 1 to PORT 4 first to fourth boards Target station side CC Link T t st ActStationNumber Fixed to 9 a arget elation sige monui E module station number station number Link ActUnitNumber p Fixed to 0x00 Fixed to 0x00 arget station side ien 0x00 module station number ActPortNumber 3 DETAILS OF THE ACT CONTROLS MELSEC 4 When connected station CPU is ACPU a Configuration Connected Relayed station CC Link module module Relayed network Relayed Relayed station CPU module
10. SWOD5C ACT E ActiveX Communication Support Tool Windows NT 4 0 Abbreviation of Microsoft Windows NT Workstation 4 0 English version Windows 95 Abbreviation of Microsoft Windows 95 English version Windows 98 Abbreviation of Microsoft Windows 98 English version Generic term of Windows 95 Windows 98 and Windows NT Workstation 4 0 VB Abbreviation of Microsoft Visual Basic 6 0 English version VC Abbreviation of Microsoft Visual C 6 0 English version IBM PC AT compatible Abbreviation of the IBM PC AT or its compatible personal computer GPPW Abbreviation of Type SW IDBC GPPW E SW IDBF GPPW E GPP function software package Ladder logic test function LLT Abbreviation of Type SW IDBC LLT E SW D5F LLT E ladder logic test tool function software package MELSECNET 10 board Abbreviation of Type A70BDE J71QLP23 A70BDE J71QLP23GE A70BDE J71QBR13 A70BDE J71QLR23 MELSECNET 10 interface board CC Link board Abbreviation of Type ABOBDE J61BT11 CC Link system master local interface board and Type A80BDE J61BT13 CC Link interface board CPU board Abbreviation of Type ABOBDE A2USH S1 PLC CPU board Generic term of the AOJ2HCPU A1SCPU A1SCPU S1 A1SCPUC24 R2 A1SHCPU AnNCPU A1SJCPU A1SJHCPU A1NCPU A2CCPU A2CCPUC24 A2CCPUC24 PRF A2CJCPU A2NCPU A2NCPU S1 A2SCPU A2SCPU S1 A2SHCPU A2SHCPU S1 A3NCPU and A1FXCPU AnACPU Generic term of the 2 A2ACPU
11. Long IRet Returned value Output Long IStartlO First number of module to Input where values will be written Long Address Buffer memory address Input Long IWriteSize Write size Input Short Values written to buffer memory Input 4 FUNCTIONS MELSEC 4 Explanation As the module number specified in IStartlO specify a value found by dividing the actual number by 16 The buffer values for IWriteSize at the buffer memory address specified in Address the special function module located at the first number specified in IStartlO are written When using the ActFXCPU control or ActLLT control specify the block number 0 to 7 of the special expansion equipment as the module s first number and any of 0 to 32767 as the buffer memory address 5 Returned value Normal termination 0 is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES 1 An error is returned if access to the motion controller CPU is made 2 For iData or IpsData prepare a memory area having the number of points specified in IWriteSize If there is no memory area a critical phenomenon such as an application error may occur 3 When buffer memory write WriteBuffer is performed for the QCPU Q mode write operation may be performed for only the Q series dedicated module 4 FUNCTIONS 4 2 11 GetClockData Clock data read 1 2 3 Ap
12. 4 Do not use 1 to 1024 of ActPortNumber Network number of Network number of target station side target station side module module 3 DETAILS OF THE ACT CONTROLS Default Value e ActSourceStationNumber 5 IBM PC AT compatible side station number Connected station Connected station side Q series side Q series compatible E71 compatible E71 station number station number QCPU Q mode 0x00 MELSECNET 10H only other than QCPU Q mode 0x01 ActThroughNetworkType including MELSECNET 10 Note that the setting must be the same as set in the network parameter of the GPP function ActTimeOut 10000 Any value specified by user in ms units 0 Target station side Target station side 0x00 Fixed to 0x00 Fixed to 0x00 module station module station number number 2 For the property pattern of 2 specify the value set in the target station side parameter for ActNetworkNumber and ActStationNumber 5 Specify the station number on the IBM PC AT compatible side to avoid setting the same station number as set to the Q series compatible E71 within the same Ethernet loop MELSEC Target station side Target station side ActStationNumber 2 module station module station number number 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 4 ActAJ71QE71TCP control The following table indicates the properties possessed by the ActAJ71QE71TCP control and their default values
13. Renew ReturnValue 5 SAMPLE PROGRAMS MELSEC m RetVal Format 0x9608x IRet catch COleDispatchException Exception OLE IDispatch Interface Error MsgStr LoadString IDS_STRING103 AfxMessageBox MsgStr ICONINFORMATION Exception gt Delete CWnd UpdateData FALSE EERE EE ERERE AEE EERE SERRE ESSER ER EAE RE LIER ERE ERAS Get CpuType of the connected CPU iconfirmation of connecting void CSampleEngDlg OnGetCpuType long IRet long lCpuCode 0 BSTR 52 NULL CString MsgStr Clear Return Value Display m RetVal m RetVal2 m_RetVal3 try if m SelectCntl 0 ActAJ71QE71UDP Control IRet m_ActAJ71QE71UDP GetCpuT ype amp szCpuName amp lCpuCode Exec GetCpuType Method else ActEasylF Control IRet ActEasylF GetCpuType amp szCpuName amp lCpuCode Exec GetCpuType Method if IRet 0 00 Success m_RetVal2 Format 0x x d CpuCode CpuCode Cpu Code m RetVal3 szCpuName Cpu Name Renew Return Value m RetVal Format 0x9608x IRet 5 SAMPLE PROGRAMS MELSEC catch COleDispatchException Exception OLE IDispatch Interface Error MsgStr LoadString IDS STRING103 AfxMessageBox MsgStr ICONINFORMATION Exception gt Delete f the Method has Output value of BSTR type you have to free the alloca
14. D1 1 Not used 0 is stored 2 Lower bits are stored in device number order 3 For CN200 or later of FXCPU 2 words are written to 1 point by random write 4 11 4 FUNCTIONS MELSEC 6 Returned value Normal termination 0 is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES 1 The maximum number of write points that may be specified in ISize is up to Ox7FFFFFFF points 2 For IData or prepare a memory area having the number of points specified in ISize If there is no memory area a critical phenomenon such as an application error may occur 4 FUNCTIONS MELSEC 4 2 7 SetDevice Device data setting 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Sets one point of device 3 Format VB IRet object SetDevice szDevice IData Long IRet Returned value Output String szDevice Device name Input Long IData Set data Input VC object SetDevice szDevice Long IRet Returned value Output CString szDevice Device name Input Long kIplData Set data Intput 4 Explanation The operation specified in IData or IplData is performed for one point of device specified in szDevice When the bit device is specified the least significant bit of the IData value or IplData value becomes valid 5 Device specifying methods Specify the devices in the following methods When bit devi
15. Generic Term Abbreviation Description Computer link module Generic term of the C24 UC24 QC24 N and Q series compatible C24 Generic term of the AJ71E71 AJ71E71 S3 A1SJ71E71 B2 A1SJ71E71 B5 A1SJ71E71 B2 S3 A1SJ71E71 B5 S3 QE71 Generic term of the AJ71QE71 AJ71QE71 B5 A1SJ71QE71 B2 and A1SJ71QE71 B5 Q series compatible E71 Generic term of the QJ71E71 and QJ71E71 B2 Ethernet module Generic term of the E71 QE71 and Q series compatible E71 CC Link G4 module Abbreviation of Type AJ65BT G4 GPP function peripheral connection module Computer link communication Abbreviation of communication made with the PLC CPU using the computer link module Ethernet communication Abbreviation of communication made with the PLC CPU using the Ethernet module Abbreviation of communication made by connecting the IBM PC AT compatible to the RS 232C or RS 422 connector of the PLC CPU Abbreviation of communication made by connecting the IBM PC AT compatible to the USB connector of the QCPU Q mode CPU COM communication CPU USB communication MELSECNET 10 Abbreviation of communication made with the PLC CPU using the MELSECNET 10 communication board CC Link communication Abbreviation of communication made with the PLC CPU using the CC Link board CC Link G4 communication Abbreviation of communication made with the PLC CPU using the CC Link G4 module CPU board communication Abbreviation of communica
16. Returned value of COM Output First O number of module from where Input values will be read Buffer memory address Input Read size Input Values read from buffer memory Output Returned value of communication function Output hResult object WriteBuffer IStartlO Address IWriteSize HRESULT LONG LONG LONG SHORT LONG hResult IStartlO lAddress IWriteSize kIpsData kIplRetCode 4 3 11 GetClockDSata Clock data read lpsData Returned value Output First number of module to where Input values will be written Buffer memory address Input Write size Input Values written to buffer memory Input Returned value of communication function Output hResult object GetClockData lpsYear lpsMonth lpsDay lpsDayOfWeek 1 lpsMinute lpsSecond HRESULT SHORT SHORT SHORT SHORT SHORT SHORT SHORT LONG hResult Returned value of COM Output kIpsYear Read year value Output Read month value Output Read day value Output kIpsDayOfWeek Read day of week value Output kIpsHour Read hour value Output kIpsMinute Read minute value Output lpsSecond Read second value Output klplRetCode Returned value of communication function Output 4 FUNCTIONS MELSEC 4 3 12 SetClockData Clock data write hResult object SetClockData sYear sMonth sDay sDayOfWeek sHour sMinute sSecond
17. 1 When connected station CPU is QCPU Q mode a Configuration Connected station CPU Relayed module CC Link module Relayed network Relayed Relayed station CPU module IBM PC AT compatible b Property patterns End End CPU elayed Station Own Board epi Relayed Network QCPU QnA FXCPU Q mode CPU MELSECNET oH 9 x x x x x x 91 x Sones Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list B Property Patterns roperty efault Value ActCpuT 1025 CPUt ding to t t stati ctCpuType CPU BOARD ype corresponding to target station ActDestinationlONumber Fixed to 0x00 Fixed to OXSFF Ox3FF ActlONumber Fixed to 0x00 Fixed to OX3FF Fixed to OX3FF Target station side module ActNetworkNumber Fixed to 0x00 Fixed to 0x00 9 ds network number ActPortNumber Board No of IBM PC AT compatible side CC Link board N 1 PORT 1 to PORT 4 first to fourth boards Target station side CC Link Target station side module ActStationNumber Fixed to 9 9 pud module station number station number Connected station side ActUnitNumber Fixed to 0x00 Fixed to 0x00 T module station number 3 DETAILS OF THE ACT CONTROLS MELSEC
18. 5 SAMPLE PROGRAMS MELSEC y Set Device Value EOD ER EO E I ODE I f void CCustomSampleEngDlg OnSetDevice long long IRet CString MsgStr HRESULT hr BSTR szDev NULL CWnd UpdateData TRUE Clear ReturnValue Display m RetVal m RetVal2 m RetVal3 if m Device Not Enter DeviceName Error MsgSir LoadString IDS_STRING102 AfxMessageBox MsgStr ICONINFORMATION return m DeviceValue szDev m Device AllocSysString Allocate the BSTR Type String area After use you have to free it if m SelectCntl 0 ActAJ71QE71UDP Control Custom Interface hr mp IAJ71QE71UDP SetDevice m Device AllocSysString I Value amp IRet Exec GetDevice Method else ActEasylF Control Custom Interface hr mp IEasyIF SetDevice m Device AllocSysString Value amp IRet Exec GetDevice Method ifSUCCEEDED hr Compornent Communication is succeeded Renew ReturnValue m_RetVal Format 0x 08x Ret else MsgStr LoadString IDS_STRING103 AfxMessageBox MsgStr Free the allocated area SysFreeString szDev 5 SAMPLE PROGRAMS MELSEC CWnd UpdateData FALSE kikou encor gone AREA pee Close Communication Route RESIS III III III void CCustomSampleEngDlg OnClos
19. Exit the program and restart the IBM PC AT compatible Review the IP address and port number values of the properties Port connection error Review the port number value on the communication 0x01808008 Establishment of connection failed settings utility The other end does not respond Review the system e g PLC CPU module setting and cable status Exit the program and restart the IBM PC AT compatible 6 ERROR CODES MELSEC Error Code Error Definition Corrective Action COM port handle error The handle of the COM port cannot be acquired Check for an application which uses the COM port The port objet cannot be copied Exit the program and restart the IBM PC AT compatible The SOCKET object cannot be copied Check for application which uses the COM port Buffer size setting error 0x0180800A Setting of the COM port buffer size failed Make COM port setting on the control panel of the OS g Exit the program and restart the IBM PC AT compatible s Check for an application which uses the COM port DCB value acquisition error 0x0180800B Acauisition of the COM port DCB value failed Make COM port setting on the control panel of the OS Exit the program and restart the IBM PC AT compatible Check for an application which uses the COM port 0x0180800C Make COM port setting on the control panel of the OS i Setting of the COM port DCB value failed P 9 Exit the prog
20. MSG END MESSAGE CCustomSampleEngDlg dialog CCustomSampleEngDlg CCustomSampleEngDlg CW pParent NULL CDialog CCustomSampleEngDlg IDD pParent IK AFX DATA INIT CCustomSampleEngDlg m Devices m DeviceValue 0 m SelectCntl 0 m RetVal _ m RetVal22 m RetVal3 7 I AFX DATA INIT Note that Loadlcon does not require a subsequent Destroylcon in Win32 m hlcon AfxGetApp Loadlcon IDR MAINFRAME void CCustomSampleEngDlg DoDataExchange CDataExchange pDX CDialog DoDataExchange pDX IK AFX DATA MAP CCustomSampleEngDlg DDX Text pDX DEVICE m Device DDX Text pDX IDC DEVVALUE m DeviceValue DDX Radio pDX RADIO1 m SelectCntl DDX Text pDX IDC RET m RetVal DDX Text pDX RET2 m RetVal2 DDX Text pDX RET3 m RetVal3 MELSEC 5 SAMPLE PROGRAMS MELSEC DATA BEGIN MESSAGE MAP CCustomSampleEngDlg CDialog AFX MSG MAP CCustomSampleEngDlg ON WM SYSCOMMAND ON WM PAINT ON WM QUERYDRAGICON ON BN CLICKED IDC OpenCom OnOpenCom ON BN CLICKED IDC GetCpuType OnGetCpuType ON BN CLICKED IDC GetDevice OnGetDevice ON BN CLICKED IDC SetDevice OnSetDevice ON CLICKED IDC CloseCom OnCloseCom MSG END MESSAGE AUTE CCustomSampleEngDlg message handlers BOOL CCustomSampleEngDIg OnlnitDialog CDialog O
21. Perform debugging using Yes Refer to Section 5 1 the PLC monitor utility Completion of user application Refer to the operating manual 2 ABOUT THE ACT CONTROLS MELSEC 2 2 2 When using When using VC create a user application in the following procedure Power on the IBM PC AT compatible and start Windows Install ACT and make ACT valid with the license key FD Refer to the operating manual startup Make settings using the utility setting type No Utility setting type Program setting type Start the communication settings utility Start VC and make communication settings in accordance with the wizard Start VC Register the ACT control to VC e Refer to Refer to the operating manual Add the ACT control to VC Refer to Create a form and paste the ACT control Section 2 1 2 for corresponding communication Using Class Wizard define the pasted ACT control as a dialog member P Set the properties of the pasted ACT Refer to the control operating manual Create a form and paste the ACT Section 2 1 2 control to the form ActEasylF control eee Using Class Wizard define the pasted ACT control as a dialog member J Set the property of the pasted control Refer to the Set only the l
22. YADA MINAMI 5 HIGASHI KU NAGOYA JAPAN When exported from Japan this manual does not require application to the Ministry of International Trade and Industry for service transaction permission Specifications subject to change without notice
23. m RetVal2 m RetVal3 5 SAMPLE PROGRAMS MELSEC if m SelectCntl 0 ActAJ71QE71UDP Control Custom Interface If you don t use default values please set their properties before OPEN method If you call the set property method after OPEN method it isn t reflected to the communication You can use methods to set and get the value for all properties gt Example Change CPU type to Q2A S1 from default value Change the Baudrate to 9600bps from default value The other is default hr mp IAJ71QE71UDP put ActCpuType CPU Q2AS1CPUJ Exec set property method 1 ifSUCCEEDED hr Compornent Communication is succeeded szAdr SysAllocString wsz Allocate the BSTR Type String area After use you have to free it hr mp IAJ71QE71UDP put ActHostAddress szAdr ifSUCCEEDED hr Compornent Communication is succeeded hr mp IAJ71QE71UDP Open amp IRet Exec Open Method 1 Free the allocated area zSysFreeString szAdr else ActEasylF Control Custom Interface If you don t use default values please set their properties before OPEN method call gt Example Change the Logical station number to 2 from default value hr mp IEasylF put ActLogicalStationNumber 2 Exec set property method i SUCCEEDED hr Compornent Communication is succeeded hr mp IEasylF Open amp IRet Exec Open Method if SUC
24. Format VB IRet object WriteDeviceBlock szDevice ISize IData 0 Long IRet Returned value Output String szDevice Device name Input Long Number of read points Input Long IData n Written device values Input VC object WriteDeviceBlock szDevice ISize Long IRet Returned value Output CString szDevice Device name Input Long ISize Number of read points Input Long kIplData Written device values Input 4 Explanation The device values for ISize are batch written to the devices beginning with the device specified in szDevice The written device values are stored in IData or IplData 5 Device specifying methods Specify the devices in the following methods When bit device is specified When word device is specified Example 3 points from MO Example 3 points from DO 2 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lower Bytes DO D D2 to 15 2 M16 to M312 M32 to M47 2 a joa jo When CN200 and later FXCPU are specified gt lt When FD device is specified 4 word device gt Example 6 points from CN200 3 Example 6 points from FDO 2 Lower Bytes L of CN200 H of CN200 L of CN201 H of CN202 1 Not used 0 is stored 2 Lower bits are stored in device number order x3 For CN200 or later of FXCPU 2 words are written from 2 points Write from 1 point will result an error HH of FDO LL of FD1 4 7
25. Including motion controller CPU x x x x Metsecnetiio x x x x x x MESENE x x x x x Property pattern within circle 3 Property list Property Patterns Property Default Value D 8 ActControl TCR_DTR_OR Depending on used cable _RTS 262 ActCpuType CPU_A1NCPU CPU type corresponding to target station 1 EN ActPortNumber PORT 1 IBM PC AT compatible side COM port number 0 ActStationNumber 0x00 Target station side module station number 10000 Any value specified by user in ms units 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 20 ActMnet10BD control The following table indicates the properties possessed by the ActMnet10BD control and their default values 1 When connected station CPU is QCPU Q mode a Configuration Connected MELSECNET 10 Relayed station CPU module module Relayed network Relayed Relayed station CPU module IBM PC AT compatible b Property patterns eal CPU Relayed Station CPU Own Board QCPU Relayed Network QCPU QnA ACPU FXCPU Q mode CPU 2 x x x x wisewmo e ofo x x x x x x Eme 2 x x x Comperink 9 x x x x ccu amp x x x x Accessible Property pattern within circle x Inaccessi
26. Using the line feed symbol n separate the devices in the character string specified in the device list The last device need not be followed by the line feed symbol Example DO nMO n 5 Device specifying methods Specify the devices in the following methods Example When MO DO K8M0 is specified Example When DO CN200 D1 including CN200 Number of points is 3 and later of FXCPU is specified number of points is in total 3 2 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lower Bytes po H of CN200 L of CN200 1 M16 to 31 2 MO to M15 k2 Example When DO FDO D1 including FD device is specified Number of points is 3 2 Upper Bytes 2 Lower Bytes ue LL of FD D1 1 Not used 0 is stored 2 Lower bits are stored in device number order 3 For CN200 or later of 2 words are read from 1 point by random read 4 9 4 FUNCTIONS MELSEC 6 Returned value Normal termination 0 is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES 1 The maximum number of read points that may be specified in ISize is up to Ox7FFFFFFF points 2 For IData or prepare a memory area having the number of points specified in ISize If there is no memory area a critical phenomenon such as an application error may occur 4 FUNCTIONS MELSEC 4 2 6 WriteDeviceRandom Device random write 1 App
27. 0 0 O Decimal Bt Dea w Hexadecimal _ 2 0 Ts Decimal Bt st TN woa c Pp gt O c po c Word S S S Decima Bt i For ACPU use timer to specify Retentive timer Hexadecimal Bt o ooo O Hexadecimal 1 For batch operation operation is performed continuously in units of one word For random operation only the first one word is read 2 For the QCPU A mode and ACPU the L S devices have the same regions independently of the device setting in the parameters Decimal Bit _ ForACPU use timer to specify For use timer to specify S S S C N S C N S Decimal C N B W S Bit Bit device Word Word device 2 9 2 ABOUT THE ACT CONTROLS MELSEC Device No Type Representation Index register R 3 O File register 28 doma wa f Extended file egister Decimal Hexadecimal Direct Linkrelay Hexadecimal Bit eA ink gt 6 Link special relay Hexadecimal Bit Linkregster Hexadecimal Bit eA Link special register_ Hexadecimal Word A ue m Word 4 x8 memory 7 decimal Bit Bit device Word Word device 3 To spec
28. 12 SetClockData Clock data 4 21 4 2 13 GetCpuType PLC CPU type read 4 23 4 2 14 SetCpuStatus Remote 4 27 4 3 Details of the Functions Custom 4 29 4 3 1 Open Communication line 4 29 4 3 2 Close Communication line closing ceccecceseeeeeeeceeeeeeeeecaeeaeeaecaeeeeeeaeeaecaeseaeeaesaeseeseaesaesaeeeeseaeeaes 4 29 4 3 3 ReadDeviceBlock Device batch read 4 29 4 3 4 WriteDeviceBlock Device batch write 4 29 4 3 5 ReadDeviceRandom Device random read 4 30 4 3 6 WriteDeviceRandom Device 4 30 4 3 7 SetDevice Device data setting 4 30 4 3 8 GetDevice Device data acquisition 4 30 4 3 9 ReadBuffer Buffer memory read 4 31 4 3 10 WriteBuffer Buffer memory write 4 31 4 3 11 GetClockDSata Clock 0 4 31 4 3 12 SetClockData Clock data 4 32 4 3 13 GetCpuType PLC CPU type 22 tnnt enne trennt nnns 4 32 4 3 14 SetCpuStatus Remote control essent 4 32 5 SAMPLE PROGRAMS 5 1 to 5 32 5 1 VB Sample Program
29. 2 Close Communication line closing 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Closes the communication line 3 Format VB VC IRet object Close Long IRet Returned value Output 4 Explanation The line connected using the Open function is closed Returned value Normal termination 0 is returned Abnormal termination A value other than 0 is returned Refer to Chapter 6 ERROR CODES 4 FUNCTIONS MELSEC 4 2 3 ReadDeviceBlock Device batch read 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Batch reads data from devices 3 Format VB IRet object ReadDeviceBlock szDevice ISize IData 0 Long IRet Returned value Output String szDevice Device name Input Long ISize Number of read points Input Long IData n Read device values Output VC object ReadDeviceBlock szDevice ISize IplData Long IRet Returned value Output CString szDevice Device name Input Long ISize Number of read points Input Long kIplData Read device values Output 4 Explanation The device values for ISize are batch read from the devices beginning with the device specified in szDevice read device values are stored in IData or IplData 5 Device specifying methods Specify the devices in the following methods When bit device is specified When word device is specified Example 3 points from MO Example 3 points
30. 5 Program CustomSampleEngDlg cpp implementation file include stdafx h include CustomSampleEng h Exe ESSER AR AAS ESSER SS SEE include ActMulti h For ActEasylF Contorol include ActEther h For Ethernet Communication Contorol include ActDefine h ACT Common Macro Header include ActMulti i c For CustomInterface include ActEther i c For Customlnterface YESS include CustomSampleEngDlg h ifdef_ DEBUG define new DEBUG_NEW undef THIS FILE static char THIS_FILE FILE endif CAboutDlg dialog used for App About class CAboutDlg public CDialog public CAboutDlg Dialog Data I AFX DATA CAboutDlg enum IDD IDD ABOUTBOX I AFX DATA ClassWizard generated virtual function overrides I AFX VIRTUAL CAboutDlg protected virtual void DoDataExchange CDataExchange pDX DDX DDV support I AFX VIRTUAL Implementation protected I AFX MSG CAboutDlg AFX_MSG DECLARE_MESSAGE_MAP MELSEC 5 SAMPLE PROGRAMS CAboutDlg CAboutDlg CDialog CAboutDlg IDD DATA INIT CAboutDlg DATA INIT void CAboutDlg DoDataExchange CDataExchange pDX CDialog DoDataExchange pDX IK AFX DATA MAP CAboutDlg DATA MAP BEGIN MESSAGE MAP CAboutDlg CDialog AFX MSG MAP CAboutDlg No message handlers
31. 5 2 VC Sample 5 8 5 2 1 Dispatch interface umi cet edt e dues arce dd 5 8 5 22 O stomilnitet fece YER RR 5 20 6 ERROR CODES 6 1 to 6 10 6 1 Error Codes Returned by the ACT 6 1 6 2 Error Codes Returned by the CPUs Modules and Network 6 8 6 9 HRESULT Type Error Codes intret n ed e p pe e 6 9 About Manuals The following lists the manuals for this software package Refer to the following table when ordering manuals Related Manuals Manual Number Manual Name Model Code SWOD5C ACT E ActiveX Communication Support Tool Operating Manual Startup Provides procedures for installing and uninstalling SWOD5C ACT E and for browsing the operating manual Packed with the product 0800112 134982 SWOD5C ACT E ActiveX Communication Support Tool Operating Manual SH 080077 Gives how to perform setting and operation of each utility on SWOD5C ACT E Optionally available 13J981 Type A70BDE J71QLP23 A70BDE J71QLP23GE A70BDE J71QBR13 A70BDE J71QLR23 MELSECNET 10 Interface Board User s Manual For SW3DNF MNET10 0800035 Describes the features specifications part names and setting of the MELSECNET 10 board and the 13 193 installation uninstallation and others of the dri
32. ActPortNumber 1 IBM PC AT compatible side port number ActStationNumber 2 Fixed to OXFF Target station side module station number ActTimeOut EX Any value specified by user in ms units The free number of the IBM PC AT compatible is assigned automatically Other than 0 The specified port number is used to generate the UDP socket Do not use 1 to 1024 of ActPortNumber 2 Note the following points depending on whether the connected station side MELSECNET 10 module is the control station or ordinary station When the connected station side MELSECNET 10 module is the control station Specify the actual station number of the target station side MELSECNET 10 module in ActStationNumber When the connected station side MELSECNET 10 module is the ordinary station Always set the target station side MELSECNET 10 module as the control station and specify 0x00 in ActStationNumber 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 8 ActQCPUQ control The following table indicates the properties possessed by the control and their default values 1 Configuration 2 Property patterns Connected Station CPU elayed Station QCPU Relayed Network QCPU QnA onnected Relayed Q mode FXCPU MELSECNET OH 2 x x x x MEI Relayed network mesecne 2 2 x Relayed Relayed 2 x station CPU mod
33. CheckDeviceString method of each ACT control 8 About ActUMsg control ActUWzd control ActMnet2BD control and ActAFBD control Installing ACT registers the ActUMsg control ActUW2zd control ActMnet2BD control and ActAFBD control but do not use them 9 Precautions for use of ActQJ71E71TCP ActAJ71QE71TCP and ActAJ71E71TCP controls a Provide an interval longer than the sequence scan time of the Ethernet module loaded station from when the Open method is executed until the Close method is executed b Provide an interval of at least 500ms from when the Close method is executed until the Open method is executed again 10 Precautions for ladder logic test communication When running a user program make sure that the ladder logic test function LLT and GPPW have started In addition do not terminate the ladder logic test function LLT and GPPW while the user program is running If you do so you will not be able to terminate the user program normally INTRODUCTION Thank you for purchasing the Type SWOD5C ACT E ActiveX Communication Support Tool Read this manual and make sure you understand the functions and performance of Type SWOD5C ACT E ActiveX Communication Support Tool thoroughly in advance to ensure correct use Please make this manual available to the end user CONTENTS SAEETYABREGAU TIONS situ citt Pet pidum tr Peste rSn A 1 REVISIONS 1 1 xe REI de e eee e eee A 2 Operating Ins
34. access to the ANUCPU QCPU A mode or A273UHCPU S3 is made from the AnNCPU or AnACPU via the network by CPU COM communication the type code equivalent to that of the AnACPU is returned 92H 93H 94H 5 When access to the QnACPU or QCPU A mode is made from the CPU board the type code equivalent to that of the AnACPU 92H 93H 94H is returned for the QnACPU or the type code equivalent to that of the A4UCPU 85H is returned for the QCPU A mode 6 When access to the QCPU A mode is made from the UC24 the type code equivalent to that of the A4UCPU 85H is returned 7 When access to the QCPU A mode is made from the CC Link G4 module the type code equivalent to that of the A4UCPU 85H is returned 5 Returned value Normal termination 0 is returned Normal termination Abnormal termination A value other than 0 is returned Refer to Chapter 6 ERROR CODES 4 FUNCTIONS MELSEC 4 2 14 SetCpuStatus Remote control 1 Applicable ACT controls The applicable ACT controls are indicated below Control Name Usabilit Control Name Usabilit ActAJ71QE71UDP O 1 AdAJHEHUDP AdQCPUQUSBB O actcca4anA O AcAJIQC24 X ln Acta7ie7itcP Usable X Unusable AgQJAETIUDP O 1 An error is returned when remote operation is performed for the own station 2 An error is returned when own board access is made 3 When access to the QnACP
35. any of the IP address calculation system table conversion system and combined system as the MNET 10 routing system 3 33 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 18 ActCCG4QnA control The following table indicates the properties possessed by the ActCCG4QnA control and their default values 1 Configuration 2 Property patterns Connected Relayed Network Connected CC Link module Relayed y QCPU QnA ACPU station CPU module QnACPU FXCPU mode A mode CPU 1 x Relayed network 2 ACE module ela QnA mode icut eds compatible Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU IBM PC AT 3 Property list Property Patterns mee To xeu 19200 ActBaudRate BAUDRATE Match to the setting of CC Link G4 module 19200 ActConnectUnitNumber Connected station side CC Link module station number ActControl DTR OR Depending on used cable _RTS 17 1023 Connected station ActlONumber 1 Fixed to Fixed to Ox3FF Fixed to OX3FF side relayed module address 0 Target station side ActNetworkNumber 0x00 Fixed to 0x00 module network Fixed to 0x00 Fixed to 0x00 number 1 TE ActPortNumber PORT 1 IBM PC AT compatible side COM port number 255 Target station side Target station side ActStationNumber OxFF Fixed to OXFF module station modul
36. calculation system table conversion system and combined system as the MNET 10 routing system 3 DETAILS OF THE ACT CONTROLS MELSEC 2 When connected station side Q series compatible C24 is used for multidrop link with relayed module a Configuration b Property patterns Connected Connected Q series Relayed Station CPU station compatible Station CPU y CPU C24 QCPU Relayed Network QnA 1 Multidrop link mode CPU t FXCFY IBM PC AT compatible Relayed network m mode 2 Computer link Relayed Relayed Synchronous station CPU module 2 Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Indicates the CH2 side setting side fixed to independent mode c Property list Property Patterns oes 19200 ActBaudRate BAUDRATE Match to the setting of Q series compatible C24 19200 ActConnectUnitNumber Connected station side module station number TCR OR Depending on used cable _RTS ActCpuType CPU ion CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 Ox3FF Fixed to 0x00 ActDidPropertyBit 0x01 invalid 0x00 valid 0x01 invalid ActDsidPropertyBit 0x01 invalid 0x00 valid 0x01 invalid ActIntelligentPreferenceBit Tun Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 1023 Connected station
37. correct clock data to the clock data of the PLC CPU 6 ERROR CODES MELSEC 6 2 Error Codes Returned by the CPUs Modules and Network Boards This section explains the error codes returned by the CPUs modules and network boards Error Code Error Occurrence Location 0x01010000 to 0x0101FFFF QCPU A mode ACPU motion controller CPU 0x01020000 to 0x0102FFFF QnACPU 0x01030000 to 0x0103FFFF C24 0x01040000 to 0x0104FFFF QC24 N 0x01050000 to 0x0105FFFF E71 1 0x01060000 to 0x0106FFFF QE71 1 MELSECNET 10 board board CC 0x010A0000 to 0x010AFFFF QCPU Q mode 0x010B0000 to 0x010BFFFF 0x010C0000 to 1 If the 4 lower digits of the error code which occurred during E71 or QE71 communication is indicated in the E71 or QE71 manual check whether the DIP switch SW2 on the front of of the E71 or QE71 module is set as indicated below If the DIP switch is not set correctly a difference has occurred in the packet format ASCII binary and therefore the error code returned from the module cannot be recognized correctly Communication SW Switch Setting m ON ASCII mode UDP IP OFF binary mode QE71 TCP IP ON ASCII mode The error codes returned by the CPUs modules and network boards enter the 4 lower digits of the above error codes For details of the above error codes check the error code in the 4 lower digits and refer to the manual of the corresponding CPU mod
38. from DO 2 Upper Bytes 2 Lower Bytes MO to 15 2 2 Upper Bytes 2 Lower Bytes M16 to M31 2 M32 to M47 2 When CN200 and later FXCPU are specified gt When FD device is specified 4 word device Example 6 points from CN200 3 Example 6 points from FDO 2 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lower Bytes L of CN200 LL of FDO LH of FDO HL of FDO HH of FDO LL of FD1 LH of FD1 1 Not used 0 is stored 2 Lower bits are stored in device number order x3 For CN200 or later of FXCPU 2 words are read from 2 points Read from 1 point will result in an error 4 5 4 FUNCTIONS MELSEC 6 Returned value Normal termination 0 is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES 1 The maximum number of read points that may be specified in ISize should satisfy the following range Read starting device number number of read points lt last device number 2 When the bit device is specified a multiple of 16 may be specified as the device number 3 For IData or IplData prepare a memory area having the number of points specified in ISize If there is no memory area a critical phenomenon such as an application error may occur 4 FUNCTIONS MELSEC 4 2 4 WriteDeviceBlock Device batch write 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Batch writes data to devices 3
39. may occur 8 When buffer memory read ReadBuffer is performed for the QCPU Q mode read operation may be performed for only the Q series dedicated module 4 FUNCTIONS MELSEC 4 2 10 WriteBuffer Buffer memory write 1 Applicable ACT controls The applicable ACT controls are indicated below Control Name Usabilit Control Name Usabilit ActAJ71QE71UDP ActAJ71E71UDP AdQCPUQUSBB O o ActAJ71C24 5 Usable X Unusable 1 An error is returned if access to the ANUCPU QCPU A mode A173UHCPU S1 or A273UH S3 is made 2 An error is returned if access to the QnACPU is made 3 An error is returned if own board access is made An error is returned if the CPU is other than and FX2NC 5 An error is returned if the CPU is other than FXoN FX2 FX2c FX2N and FX2Nc 6 An error is returned if access to the QnACPU is made via the MELSECNET 10 or MELSECNET II 2 Feature Writes values to the buffer memory of the special function module 3 Format VB IRet object WriteBuffer IStartlO Address IWriteSize iData 0 Long IRet Returned value Output Long IStartlO First number of module to Input where values will be written Long Address Buffer memory address Input Long IWriteSize Write size Input Integer iData n Values written to buffer memory Input VC IRet object ReadBuffer IStartlO Address IWriteSize
40. side ActlONumber 1 Fixed to Fixed to module address 0 ActMultiDropChannelNumber 0x00 Fixed to 0x00 Multidrop channel number Fixed to 0x00 T i i ActNetworkNumber 2 Fixed to 0x00 arget Station sice moule Fixed to 0x00 0x00 network number ActParity ODD PARITY Match to the setting of Q series compatible C24 1 ActPortNumber IBM PC AT compatible side COM port number PORT 1 ActStationNumber Fixed to OxOFF Fixed to OxOFF Fixed to OxOFF QCPU Q mode 0x00 MELSECNET 10H only other than QCPU Q mode 0x01 ActThroughNetworkType including MELSECNET 10 Note that the setting must be the same as set in the network parameter of the GPP function 1 As the I O address specify the value found by dividing the actual first number by 16 3 25 3 DETAILS OF THE ACT CONTROLS MELSEC Property Patterns IM ActTimeOut 10000 Any value specified by user in ms units T t stati id dul ActUnitNumber Fixed to 0x00 TIES SARON SISS MOUS Fixed to 0x00 Tun station number When the connected station side Q series compatible C24 is set to the synchronous mode always set the sumcheck SW06 transmission specification software switch setting of the Q series compatible C24 parameters to Yes ON If itis setto No OFF a communication error will occur disabling proper communication 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 14 ActA
41. the parameter setting of the target station side Q series compatible E71 or QE71 the MNET 10 routing information in the parameter setting of the Q series compatible E71 or QE71 Also when making setting specify other than the automatic response system any of the IP address calculation system table conversion system and combined system as the MNET 10 routing system 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 9 ActQCPUA control The following table indicates the properties possessed by the control and their default values 1 Configuration 2 Property patterns Connected Relayed Station CPU Station CPU gaye auon Connected Relayed QPU station module Sn eed TE MELSECNET AOH x x x x MESECNEU0 2 x 2 x Relayed network IBM PC AT compatible lt x sese Computerin x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU Relayed Relayed station CPU module 3 Property list Property Patterns ST ici 9600 BAUDRATE 9600 BAUDRATE 19200 BAUDRATE 38400 BAUDRATE 57600 A BAUDRATE ctBaudRate 115200 9600 8 ActControl TCR DTR OR Depending on used cable _RTS 321 ActCpuType CPU CPU type corre
42. 2 Text If Text1 0 Then MsgBox Not Enter DeviceType Error Exit Sub Else If 1 Then MsgBox Not Enter DeviceValue Error Exit Sub Else If IsNumeric Text1 1 Text False Then MsgBox Illegal Device Value Exit Sub Else szDevice Text1 0 Text IplData CLng Text1 1 Text End If End If End If 5 SAMPLE PROGRAMS MELSEC If Option 0 True Then ActACPU Control IRet ActACPU1 SetDevice szDevice Exec Method Else ActEasylF Control IRet ActEasyIF1 SetDevice szDevice IplData Exec Method End If Renew ReturnValue ResultTxt 0 Text Hex IRet Exit Sub Error ErrMsg Error Err MsgBox ErrMsg ErrType End End Sub Property setting may also be made directly on the property page When property setting is made on the property it need not be made in the program 6 For use in another communication path Run the program after changing the logical station number only when the utility setting type is used or the ATC control properties and functions 5 SAMPLE PROGRAMS MELSEC 5 2 VC Sample Programs This section explains the sample programs for VC which were created using the dispatch interface and custom interface These sample programs were created on Visual 6 0 5 2 1 Dispatch interface This sample program is designed to read the type of the connection destination CPU and read write devic
43. 2 When connected station CPU is QCPU A mode a Configuration Connected Relayed station CC Link module module Relayed network Relayed Relayed station CPU module IBM PC AT compatible b Property patterns SN EUER elayed Station Own Board QCPU Relayed Network QCPU ACPU Peru FXCPU A mode cru MELSECNET oH x x x x x x x x x x x x Emme x x x x x Computerin x x x x x ccu S x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU C Property list Patterns Property Default Value 1025 ActCpuType CPU BOARD CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 ActlONumb Fixed to 0x00 LIED ActNetworkNumber Fixed to 0x00 d ActPortNumber Board No of IBM PC AT compatible side CC Link board oe core TN 1 PORT 1 to PORT 4 first to fourth boards Target station side CC Link module station ActStationNumber Fixed to 9 5 number ActUnitNumber Fixed to 0x00 c 3 DETAILS OF THE ACT CONTROLS MELSEC 3 When connected station CPU is QnACPU a Configuration Connected Relayed station CPU CC Link module module Relayed network
44. 4 FUNCTIONS MELSEC 6 Returned value Normal termination 0 is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES 1 The maximum number of write points that may be specified in ISize should satisfy the following range Write starting device number number of write points lt last device number 2 When the bit device is specified a multiple of 16 may be specified as the device number 3 For IData or IplData prepare a memory area having the number of points specified in ISize If there is no memory area a critical phenomenon such as an application error may occur 4 FUNCTIONS MELSEC 4 2 5 ReadDeviceRandom Device random read 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Reads data randomly from devices 3 Format VB IRet object ReadDeviceRandom szDeviceList ISize IData 0 Long IRet Returned value Output String szDevicelist Device name Input Long ISize Number of read points Input Long IData n Read device values Output VC object ReadDeviceRandom szDeviceList ISize Long IRet Returned value Output CString szDevicelist Device name Input Long ISize Number of read points Input Long kIplData Read device values Output 4 Explanation The device values for ISize are read from the device group specified in szDeviceList read device values are stored IData or IplData
45. ACT controls 1 MELSECNET 10 board will result in an error if own board access is made Feature Reds the type character string and type code of the PLC CPU Format VB IRet object GetCpuType szCpuName Long IRet Returned value Output String szCpuName CPU type character string Output Long ICpuType PLC CPU type code Output VC object GetCpuType szCpuType Long IRet Returned value Output BSTR szCpuName CPU type character string Output Long CPU type code Output Explanation type of the PLC which is making communication is stored into szCpuName and its type code into ICpuType or IplCpuType The PLC CPU type character string is returned in UNICODE 4 FUNCTIONS MELSEC 5b CPU type character string and type code The following table lists the CPU type character strings and type codes read using GetCpuType a Type character string list CPU Network Board Type CPU Network Board Type Board Type connected Board Type connected QO2CPU QO2CPU A2ACPUP21 R21 S1 A2U A2U A2U ABU Q2ACPU Q2ACPU A2USHCPU S1 ABU AAU AAU Q4ACPU Q4ACPU FXo FXos FXo FXos FXON FX FX FX FXis FXIN FX2 FX20 FX2N FX2NC FX2N F X2NC A2C A2C A2C A2C A2C A2C 2 A2C A2N A2SCPU 25 A2N A7OBDE J71QLP23 GE A70BDE J71QLP23 A2SCPU S1 25
46. AINFRAME void CSampleEngDlg DoDataExchange CDataExchange pDX CDialog DoDataExchange pDX DATA MAP CSampleEngDlg DDX Text pDX DEVICE m Device DDX Text pDX IDC DEVVALUE m DeviceValue DDX Radio pDX RADIO1 m SelectCntl DDX Text pDX IDC RET m RetVal DDX Text pDX RET2 m RetVal2 DDX Text pDX RET3 m RetVal3 MELSEC 5 SAMPLE PROGRAMS MELSEC DDX Control pDX IDC ACTEASYIF1 m ActEasyIF DDX Control pDX ACTAJ71QE71UDP1 m ActAJ71QE71UDP I AFX DATA MAP BEGIN MESSAGE MAP CSampleEngDlg CDialog MSG MAP CSampleEngDlg ON WM SYSCOMMAND ON WM PAINT ON WM QUERYDRAGICON ON BN CLICKED IDC OpenCom OnOpenCom ON BN CLICKED IDC GetCpuType OnGetCpuType ON BN CLICKED IDC GetDevice OnGetDevice ON BN CLICKED IDC SetDevice OnSetDevice ON CLICKED IDC CloseCom OnCloseCom I AFX MSG MAP END MESSAGE MAPY AUT CSampleEngDlg message handlers BOOL CSampleEngDlg OnlnitDialog CDialog OnlnitDialog Add About menu item to system menu ABOUTBOX must be the system command range ASSERT IDM ABOUTBOX amp OxFFFO IDM ABOUTBOX ASSERT IDM ABOUTBOX lt 0 000 CMenu pSysMenu GetSystemMenu FALSE if pSysMenu NULL CString strAboutMenu strAboutMenu LoadString IDS ABOUTBOX if strAboutMenu IsEmpty pSysMenu gt AppendMenu MF_SEPARATOR pS
47. ActMulti DLL ActEasylF utility to make communication AdacPUQA ActQCPUA ActOnACPU Used to make communication via the serial port of the corresponding PLC CPU ActACPU ActFXCPU ActQJ71C24 ActAJ71QC24 Used to make communication via the computer link module serial ActComLk DLL DS ActAJ71UC24 communication module ActAJ71C24 ActQJ71E71TCP ActQJ71E71UDP ActAJ71QE71TCP TOM ActEther DLL Used to make communication via the Ethernet module ActAJ71QE71UDP ActAJ71E71TCP ActAJ71E71UDP ActPcUsb DLL EI Used to make communication via the USB port of the PLC CPU lActCCG4QnA ActCcG4 DLL Used to make communication via the CC Link G4 module ActCCG4A ActBoard DLL ActCCBD Used to make communication with or via the network board AdAnUBD 1 OVERVIEW 1 2 2 Function list MELSEC The following table lists the features of the functions and the functions available for the ACT controls 1 Function list Refer to CHAPTER 4 FUNCTIONS for full information on the functions Function Name Feature Opensacommunication line Close Closes a communication line ReadDeviceBlock Batch reads data from devices WriteDeviceBlock Batch writes data to devices ReadDeviceRandom Randomly reads data from devices WriteDeviceRandom Randomly writes data to devices SetDevice Sets one device GetDevice the data of one device ReadBuffer Reads data from buffer memory
48. C 2 When connected station side UC24 is used for multidrop link with relayed module a Configuration b Property patterns Connected Connected Station CPU Relayed Station CPU station UC24 CPU QCPU A mode Relayed Network QCPU QnA Multidrop link QnACPU 3 mode A mode CPU FXCPU ACPU 1 IBM PC AT compatible Relayed network station CPU module Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Use the mode setting switch and main channel setting to make setting 3 Operates as the one equivalent to AnACPU c Property list Property Patterns Property Default Value 19200 BAUDRATE Match to the setting of UC24 19200 8 TCR DTR OR Depending on used cable _RTS E 1 1 0 STOPBIT Match to the setting of UC24 ONE 1 SUM CHECK Match to the setting of UC24 10000 Any value specified by user in ms units 0 0x00 Target station side module station number 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 16 ActAJ71C24 control The following table indicates the properties possessed by the ActAJ71C24 control and their default values 1 When there is relayed module in addition to connected station side C24 a Configuration b Property patterns Connected Station CPU Station CPU Relayed S
49. CEEDED hr Compornent Communication is succeeded Renew ReturnValue m_RetVal Format 0x 08x Ret else Failed Compornent Communication MsgSir LoadString IDS_STRING103 AfxMessageBox MsgStr MB ICONINFORMATION CWnd UpdateData FALSE Get CpuType of the connected CPU iconfirmation of connecting Etre co seu KY 5 SAMPLE PROGRAMS MELSEC void CCustomSampleEngDlg OnGetCpuType long IRet long 0 BSTR szCpuName NULL HRESULT hr CString MsgStr Clear ReturnValue Display m RetVal m RetVal2 m RetVal3 if m SelectCntl 0 ActAJ71QE71UDP Control Custom Interface hr mp IAJ71QE71UDP GetCpuType amp szCpuName amp lCpuCode amp IRet Exec GetCpuType Method else ActEasylF Control Custom Interface hr mp IEasyIF GetCpuType amp szCpuName amp lOpuCode amp IRet Exec GetCpuType Method ifSUCCEEDED hr Compornent Communication is succeeded if IRet 0 00 Success m RetVal2 Format Ox9ex 9ed I CpuCode ICpuCode m RetVal3 szCpuName Renew ReturnValue m RetVal Format 0x9608x IRet else MsgStr LoadString IDS_STRING103 AfxMessageBox MsgStr ICONINFORMATION If the Method has the Output value of BSTR type you have
50. Get Property Value RO Ve include sampleEngDlg h ifdef_ DEBUG define new DEBUG_NEW undef THIS FILE static char THIS FILE endif CAboutDlg dialog used for App About class CAboutDlg public CDialog public CAboutDlg Dialog Data I AFX DATA CAboutDlg enum IDD IDD ABOUTBOX I AFX DATA ClassWizard generated virtual function overrides I AFX VIRTUAL CAboutDlg protected virtual void DoDataExchange CDataExchange pDX DDX DDV support I AFX VIRTUAL Implementation protected I AFX MSG CAboutDlg AFX_MSG DECLARE_MESSAGE_MAP MELSEC 5 SAMPLE PROGRAMS CAboutDlg CAboutDlg CDialog CAboutDlg IDD DATA INIT CAboutDlg DATA INIT void CAboutDlg DoDataExchange CDataExchange pDX CDialog DoDataExchange pDX IK AFX DATA MAP CAboutDlg DATA MAP BEGIN MESSAGE MAP CAboutDlg CDialog AFX MSG MAP CAboutDlg No message handlers MSG END MESSAGE CSampleEngDlg dialog CSampleEngDlg CSampleEngDlg CWnd pParent NULL CDialog CSampleEngDlg IDD pParent AFX DATA INIT CSampleEngDlg m Devices m DeviceValue 0 m SelectCntl 0 m RetVal _ m RetVal22 m RetVal3 7 I AFX DATA INIT Note that Loadlcon does not require a subsequent Destroylcon in Win32 m hlcon AfxGetApp Loadlcon IDR M
51. I ActPcCom Controls CI MITSUBISHI ActPcUsb Controls LI MITSUBISHI ActWizard Control CIMSFlexGrid Wizard Cl Outrider SpinButton Control C Package and Deployment Wizard X asit selected Items Only OOD Active Setup Control Library Location C WINDOWS SYSTEM ASCTRLS OCX Cancel Apply 77 3 The ACT controls included the selected DLL are added to the toolbox 2 ABOUT THE ACT CONTROLS MELSEC 2 1 2 When using VC Perform the following setting operation when using VC 1 Setting the include file 1 Start VC and choose the Tools Options menu Window Help Source Browser Alt F12 L Close Source Browser File Visual Component Manager Register Control Error Lookup ActiveX Control Test Container OLE COM Object Viewer Tracer Customize t Macro Record Quick Macro Ctrl Shift R Play Quick Macro Ctrl Shift P 2 Choose the lt lt Directories gt gt tab and set Include files Editor Tabs Debug Compatibility Build Directories Show directories for Platform Show directories for Win32 Include files x Directaries OK Ft C Program Files Microsoft Visual Studio WC98 INCLUDE C Program Files Microsoft Visual Studio VC98 MFC INCLUDE C Program Files Microsoft Visual Studio WC9S ATLAINCLUDE Choose Di
52. IRet 0 Then ResultTxt 1 Text CStr IplData 0 Hex IplData End If Exit Sub Error ErrMsg Error Err MsgBox ErrMsg ErrType End End Sub Private Sub OpenComButton Click Dim IRet As Long On Error GoTo Error Error Handler Clear Return Value Display ResultTxt 0 Text ResultTxt 1 Text ResultTxt 2 Text If Option 0 True Then ActACPU Control f you don t use default values please set their properties before OPEN method call Example ActACPU1 ActCpuT ype CPU ASUCPU Change CPU type gt ActACPU1 ActPortNumber PORT 2 Change COM port gt 2 The other properties are default IRet ActACPU1 Open Exec OPEN Method Else ActEasylF Control If you don t use default values please set their properties before OPEN method call Example ActEasylF1 ActLogicalStationNumber 3 Change the logical station number gt 3 MELSEC 5 SAMPLE PROGRAMS MELSEC IRet ActEasyIF1 Open Exec OPEN Method End If Renew ReturnValue ResultTxt 0 Text Hex IRet Exit Sub Error ErrMsg Error Err MsgBox ErrMsg ErrType End End Sub Private Sub SetDevice Click Dim IRet As Long Dim szDevice As String Dim IplData As Long On Error GoTo Error Error Handler Clear Return Value Display ResultTxt 0 Text ResultTxt 1 Text ResultTxt
53. J71QC24 control The following table indicates the properties possessed by the ActAJ71QC24 control and their default values 1 When there is relayed module in addition to connected station side QC24 N a Configuration b Property patterns Connected eee Station CPU elayed Station Connected QCPU QnA ACPU station Qc24 n Relayed QnACPU FXCPU CPU module MELSECNETAOH x x x x x IBM PCIAT compatible Relayed network MesEcNET0 x 2 x x x 2 x x station CPU module pm Ree Computerin x 2 x x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list Property Patterns inii 19200 ActBaudRate BAUDRATE Match to the setting of QC24 N 19200 ActConnectUnitNumber Connected station side module station number ActControl TCR DU OR Depending on used cable _RTS 17 ActCpuType CPU_Q2ACPU CPU type corresponding to target station 1023 Connected station Fixed to OXGFF Fixed to OXGFF Fixed to OX3FF side module address 0 Target station side ActNetworkNumber 0x00 Fixed to 0x00 module network Fixed to 0x00 Fixed to 0x00 number ActParity ODD ARITY Match to the setting of QC24 N ActPortNumber pene 1 IBM PC AT comp
54. MITSUBISHI Programming Manual Mitsubishi Programmable Logic Controller e SAFETY PRECAUTIONS e Always read these instructions before using this equipment Before using this product please read this manual and the relevant manuals introduced in this manual carefully and pay full attention to safety to handle the product correctly The instructions given in this manual are concerned with this product For the safety instructions of the programmable controller system please read the CPU module user s manual In this manual the safety instructions are ranked as DANGER and CAUTION f N Indicates that incorrect handling may cause hazardous conditions DANGER resulting in death or severe injury ji CAUTION Indicates that incorrect handling may cause hazardous conditions resulting in medium or slight personal injury or physical damage Note that the NCAUTION level may lead to a serious consequence according to the circumstances Always follow the instructions of both levels because they are important to personal safety Please save this manual to make it accessible when required and always forward it to the end user Design Instructions 4 DANGER e When performing data changes or status control from the peripheral device to the running PLC configure up an interlock circuit outside the PLC system to ensure that the whole system will operate safely In addition predetermine corrective action
55. New Existing Look in CX Include fe ActDefine bas is stored in User specified folder gt lt Act gt Include at the time of installation File name ActDefine bas Files of type Basic Files Cancel Help Don t show this dialog in the future 3 Registering ActDefine bas adds it to Modules Project1 Project1 E Forms FL Formi Form Modules Module ActDefine bas 2 ABOUT THE ACT CONTROLS MELSEC 2 Registering the ACT controls Project Microsoft Visual Basic design 1 Choose the Project Components menu Eile Edit View Project Format Debug Run Q 118 Add Form x Add MDI Form 4t Add Module 17 Add Class Module 18 Add User Control 155 Add Property Page Add User Document Add DHTML Page Add Data Report Add WebClass Add File Ctrl D d General l 4 Remove Form1 References Project1 Properties 2 Select the lt lt Controls gt gt tab and choose the DLL which Controls Designers Insertable Objects a 740 includes the ACT controls you want to use Ll Microsoft Winsock Control 6 0 MITSUBISHI ActBoard Controls MITSUBISHI ActCcG4 Controls MITSUBISHI ActComLk Controls MITSUBISHI ActEther Controls MITSUBISHI ActLlt Controls C MITSUBISHI ActMulti Controls MITSUBISH
56. OR CSampleEngDlg OnQueryDraglcon return HCURSOR m hlcon OUR QOO EK Open Communication Route void CSampleEngDlg OnOpenCom long IRet CString MsgStr CString Adr L 1 1 1 2 HostAddress Example CWnd UpdateData TRUE Clear ReturnValue Display m RetVal m RetVal2 m RetVal3 try if m SelectCntl 0 ActAJ71QE71UDP Control If you don t use default values please set their properties before OPEN method If you call the set property method after OPEN method it isn t reflected to the communication You can use methods to set and get the value for all properties gt Example Change the CPU type to Q2A S1 from default value Change the HostAddress to 1 1 1 2 from default value The other is default m ActAJ71QE71UDP SetActCpuType CPU Q2AS1CPUJ Exec set property ActAJ71QE71UDP SetActHostAddress Adr Exec set property method IRet m ActAJ71QE71UDP Open Exec OPEN method else ActEasylF Control If you don t use default values please set their properties before OPEN method call gt Example Change the Logical station number to 1 from default value m ActEasyIF SetActLogicalStationNumber 1 Exec set property method 1 IRet m ActEasyIF Open Open method exec
57. PU FXCPU CPU Relayed network MELSECNET 10H x x x x x MELSECNET 10 pa fx fet ts Relayed Relayed MELSECNET station CPU module ME LSECNET I IBM PC AT ibl EG GOIR DRUG CC Link Ee up Ske Sese Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 3 Property list ET Patterns disi Mc ue cH Connected station side ActConnectUnitNumber 1 Fixed to 0x00 Fixed to 0x00 module station number ActCpuType CPU type corresponding to target station ActHostAddress 1 1 1 1 Host name or IP address of connected station side module 1023 Connected station side ActlONumber Fixed to Fixed to hime relayed module I O address T T 2 arget station side module arget station side module station side QE71 EE CUN T number network number network number lActPortNumber 3 6 x3 501 IBM PC AT JBM PC ATcompatibesidepotnumber side port number ActSourceNetworkNumber 4 IBM PC AT compatible side network number ActSourceStationNumber 5 IBM PC AT compatible side station number Target station side module Target station side module Connected station side QE71 ActStationNumber 2 M M station number station number s
58. PU ana Ome Amoge CPU 1 7 I BEREITS Property patterns 2 Indicates the accessible ranges of the used control and the patterns of the properties Accessible Property pattern within circle X Inaccessible PS e J o 0 Connected station ActConnectUnitNumber se 1 Fedio0x00 side module station Fixed to 0x00 Fixed to 0x00 0x00 number CPU type corresponding to target station CCC Property list 1 Property Gives the property name 2 Default value Gives the default value of the property default values used when the properties are changed in the program are given within the parentheses 3 Property pattern Gives the property settings necessary to make communication settings Refer to the property pattern table for the property pattern numbers The default values indicated are the property values shown in the property window of VB or VC The default values of the properties whose values must be changed in other than decimal when changed in a program are indicated in parentheses 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 1 ActEasyIF control The following table indicates the property possessed by the ActEasylF control and its default value Default Value Property Pattern ActLogicalStationNumber UN Logical station number set on the communicatio
59. S1 A2ACPUP21 R21 A2ACPUP21 S1 ASACPUP21 R21 Generic term of the A2UCPU S1 A2USCPU A2USCPU S1 A2ASCPU A2ASCPU S1 A2ASCPU S30 A2USHCPU S1 ASUCPU and A4UCPU QnACPU Generic term of the Q2ACPU Q2ACPU S1 Q2ASCPU Q2ASCPU S1 Q2ASHCPU Q2ASHCPU S1 Q3ACPU Q4ACPU and Q4ARCPU ACPU Generic term of the ANNCPU AnACPU AnUCPU QCPU A mode Generic term of the QO2CPU A Q02HCPU A and QO6HCPU A QCPU Q mode Generic term of the QO2CPU Q02HCPU Q06HCPU Q12HCPU and Q25HCPU Generic term of the QCPU Q mode and QCPU A mode Generic term of the FXo FXos FXon FX1 FXiN 15 FX2 FX2c FXaN and FX2NC series Motion controller CPU Generic term of the A171SHCPU A172SHCPU A173UHCPU A173UHCPU S1 A273UHCPU and A273UHCPU S3 PLC CPU Generic term of the QCPU QnACPU ACPU FXCPU and motion controller CPU Generic term of the ATSCPUC24 R2 A1SJ71C24 PRF A1SJ71C24 R2 A1SJ71C24 R4 A2CCPUC24 A2CCPUC24 PRF AJ71C24 S6 and AJ71C24 S8 UC24 Generic term of the AJ71UC24 A1SJ71UC24 R2 A1SJ71UC24 R4 and A1SJ71UC24 PRF QC24 Generic term of the AJ71QC24 AJ71QC24 R2 AJ71QC24 R4 A1SJ71QC24 R2 and A1SJ71QC24 R2 QC24N Generic term of the AJ71QC24N AJ71QC24N R2 AJ71QC24N R4 A1SJ71QC24N A1SJ71QC24N R2 QC24 N Generic term of the QC24 and QC24N Q series compatible C24 Generic term of the QJ71C24 and QJ71C24 R2
60. StationNumber When the connected station side MELSECNET 10 module is the ordinary station Always set the target station side MELSECNET 10 module as the control station and specify 0x00 in ActStationNumber 2 Access via network is enabled only to the network on the side specified in valid module for another station access the connected station Side network parameters 3 31 3 DETAILS OF THE ACT CONTROLS MELSEC 2 When connected station side C24 is used for multidrop link with relayed module a Configuration b Property patterns Mors Relayed Station CPU C24 Station CPU station QCPU A mode Relayed Network QCPU QnA Multidrop link mode A mode CPU FXCPU ACPU 1 compatible Relayed network Independent Relayed Relayed Mode Computer link x x station CPU module O Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Use the mode setting switch and main channel setting to make setting 3 Operates as the one equivalent to AnACPU Connected station CPU c Property list Property Patterns Property Default Value 19200 ActBaudRate BAUDRATE Match to the setting of C24 8 ActControl TCR DTR OR Depending on used cable _RTS 0 STOPBIT Match to the setting of C24 _ONE SUM_CHECK Match to the setti
61. U is made via the MELSECNET 10 MELSECNET lI making PAUSE specification for the QnACPU results in an error 4 An error is returned if PAUSE specification is made AcIQU71C24 2 Feature Performs remote operation of the PLC CPU 3 Format VB IRet object SetCpuStatus lOperation Long IRet Returned value Output Long lOperation Remote run stop pause Input VC object SetCpuStatus lOperation Long IRet Returned value Output Long lOperation Remote run stop pause Input 4 Explanation The operation specified in lOperation is performed Specifying any value other than the following will result in an error Remote run Remote stop 4 FUNCTIONS MELSEC 5 Returned value Normal termination 0 is returned Abnormal termination A value other than 0 is returned Refer to Chapter 6 ERROR CODES Since the FXCPU does not have the PAUSE switch as the PLC CPU an error is returned if remote pause is specified in SetCpuStatus 4 FUNCTIONS 4 3 Details of the Functions Custom Interface MELSEC This section explains the details of the functions The details of the functions in this section assume that the custom interface is used The custom interface may be used on only VC For the dispatch interface refer to Section 4 2 Details of the Functions Dispatch Interface This section describes only the formats of the functions For details of other than the formats refer to Sect
62. WriteBuffer Writes data to buffer memory GetClockData Reads clock data from PLC CPU SetClockData Writes clock data to PLC CPU Reads PLC CPU type SetCpuStatus Remote run stop pause of PLC CPU 2 Functions available for the ACT controls Refer to CHAPTER 4 FUNCTIONS for full information on the functions available for the ACT controls 1 OVERVIEW MELSEC MEMO 2 ABOUT THE ACT CONTROLS MELSEC 2 ABOUT THE ACT CONTROLS This chapter explains the settings made for use of the ACT controls the programming procedures the device types and the accessible ranges 2 1 Settings Made for Use of the ACT Controls This section describes the setting operation performed for use of the ACT controls 2 1 1 When using VB Perform the following setting operation when using VB 1 Setting the include file Project Microsoft Visual Basic design 1 Start VB and choose the Project Add Module menu File Edit View Project Format Debug Run Qu E 1 Add Form Add Form Em Module k Add Class Module Add User Control Add Property Page t E Add User Document Add DHTML Page Add Data Report Add WebClass EB Add File Ctrl D 3 E Remove Form1 t3 References Components i Project1 Properties 1 2 Choose the lt lt Existing gt gt tab and select ActDefine bas
63. _A1SHCPU 0x105 A1SHCPU A1SJHCPU CPU A1NCPU 0x106 A1NCPU A2CCPU A2CCPUC2A A2CJCPU CPU A1SCPU 0x104 CPU A2CCPU 0x107 CPU A2NCPU 0x108 CPU A2SHCPU A2NCPU S1 A2SCPU S1 A2SHCPU 1 0x109 Property value Property window input value CPU A3NCPU 0x10A A2A CPU A2ACPU 0x10C CPU hee Target CPU A2ACPUP21 R21 S1 CPU 10D 21 21 A2UCPU S1 A2USCPU S1 A2ASCPU S1 A2USHCPU S1CPU 0x10F CPU board A3UCPU CPU A3UCPU 0x11 U 0x110 ASCPU S30 CPU FXINCPU 0x207 CPU A171SHCPU A171SHCP 0x601 CPU A172SHCPU 1725 0 602 CPU A273UHCPU 0x603 A273UHCPU S3 CPU A173UHCPU i A173UHCPU F CPU BOARD 0x401 9 OW board access 1 CPU A2UCPU 0 10 CPU A2USHS1CPU 1 Except CPU board 3 DETAILS OF THE ACT CONTROLS MELSEC Property Name Type Specify the connection port number of the IBM PC AT compatible When the Ethernet module is connected set any value as the port number of the requesting source IBM PC AT compatible When 0 was specified as the port number the MELSECNET 10 routing system should be the automatic response system When the system selected is other than the automatic response system via QE71 you should set the fixed value 5001 Also wh
64. am and restart the IBM PC AT tible 0x10000002 Start of communication DLL of ACT failed Reinstall ACT Exit the program and restart the IBM PC AT compatible 0x10000003 Open failed DiskDrive DS Reinstall ACT 0x10000004 Duplex open error Exit the program and restart the IBM PC AT compatible Execute again after some time 0 1000000 Execution failed since another application or Perform programming according to the multithread rules of thread is making a request COM and ActiveX Exit the program and restart the IBM PC AT compatible Exit the program and restart the IBM PC AT compatible 0 10000011 Memory securing error in P Reinstall ACT 0x10000012 not yet executed Exit the program and restart the IBM PC AT compatible 0x10000017 The specified size number of devices is Check the number of points specified in the method unauthorised Exit the program and restart the IBM PC AT compatible 0x10000018 There is no registered device Exit the program and restart the IBM PC AT compatible Exit the program and restart the IBM PC AT compatible 0x1000001E Registry search failed Exit other programs and secure free memory area Reinstall ACT Review the specified device data 0x10000032 Specified device error Exit the program and restart the IBM PC AT compatible Exit other programs and secure free memory area Review the specified device data 0x10000033 Specified device range error Exit the p
65. and 0x01808410 The CD signal on the other end of cable status communication is in the OFF status Exit the program and restart the IBM PC AT compatible Loading of the USB driver failed Reinstall ACT Connection of the USB driver failed Reinstall ACT Review the system e g PLC CPU module setting and USB driver send error pape salle 0x01808503 Make USB setting on the control panel device manger of Data send failed the OS Exit the program and restart the IBM PC AT compatible 6 ERROR CODES MELSEC Error Definition Corrective Action Review the system e g PLC CPU module setting and cable status USB driver receive error 0x01808504 USB setting on the control panel device manger of Data receive failed the OS e OS Exit the program and restart the IBM PC AT compatible USB driver initialisation error Make USB setting on the control panel device manger of nd Initialisation of the USB driver failed PEOS Exit the program and restart the IBM PC AT compatible Di h h Other USB error e cable once then reconnect 0 01808507 Exit the program and restart the IBM PC AT compatible Error related to data send receive occurred Reinstall ACT Check for the deleted or moved installation file of ACT Internal server DLL load error 4 4 Exit th he IBM PC AT ible 0x0400000 Startof the intemal e program and restart the C AT compatible Reinstall ACT Exit the progr
66. atible side COM port number 255 Target station side Target station side ActStationNumber OxFF Fixed to OxFF module station module station Fixed to OxFF number number 10000 Any value specified by user in ms units 0 Target station side 0x00 Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 module station number 1 As the I O address specify the value found by dividing the actual first number by 16 2 Note the following points when making access via the Ethernet module QE71 For ActNetworkNumber and ActStationNumber specify the value set in the parameter setting of the target station side QE71 Setthe MNET 10 routing information in the parameter setting of the QE71 Also when making setting specify other than the automatic response System any of the IP address calculation system table conversion system and combined system as the MNET 10 routing system 3 27 3 DETAILS OF THE ACT CONTROLS MELSEC 2 When connected station side QC24 N is used for multidrop link with relayed module a Configuration b Property patterns Connected Connected Station CPU Relayed Station CPU station QC24 N Netwark CPU en ANC QCPU QnA ACPU m n Multidrop link CPU IBM PC AT compatible Relayed network Independent mode 2 Dees E station module me Accessible Property pattern within circle x Inaccessib
67. ber of read points Input LONG kIplData Read device values Output LONG Returned value of communication function Output 4 3 6 WriteDeviceRandom Device random write hResult object WriteDeviceRandom szDeviceList ISize IplData HRESULT hResult Returned value of COM Output BSTR szDevice Device name Input LONG Number of write points Input LONG Written device values Input LONG klplRetCode Returned value of communication function Output 4 3 7 SetDevice Device data setting hResult object SetDevice szDeviceList IplRetCode HRESULT hResult Returned value of COM Output BSTR szDeviceList Device name Input LONG kIplData Set data Input LONG Returned value of communication function Output 4 3 8 GetDevice Device data acquisition hResult object GetDevice szDeviceList IplRetCode HRESULT hResult Returned value of COM Output BSTR szDeviceList Device name Input LONG kIplData Set data Output LONG Returned value of communication function Output 4 FUNCTIONS 4 3 9 ReadBuffer Buffer memory read MELSEC hResult object ReadBuffer IStartlO IReadSize HRESULT LONG LONG LONG SHORT LONG hResult IStartlO lAddress IReadSize kIpsData kIplRetCode 4 3 10 WriteBuffer Buffer memory write lpsData lplRetCode
68. ble 1 Including motion controller CPU 2 Accessible with the performance of MELSECNET 10 c Property list inns Property Patterns Propert efault Value i 1025 ActCpuType CPU BOND CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 Fixed to 0x00 Ox3FF Ox3FF ActDidPropertyBit 0x00 valid 0x01 invalid 0x00 valid 0x00 valid ActDsidPropertyBit 0x00 valid ormai invalid valid valid Connected station Connected station ActlONumber Fixed to 0x00 Fixed to OXSFF side relayed module side relayed module address address InctMutibropChanneiNumber a uw Fixed to 000 to 0x00 Fixed to 0x00 to 0x00 Fixedto 0x02 to 0x02 Fixed to 0x00 to 0x00 Target station side Connected station Connected station number number num Board No of IBM PC AT ora side board 255 Connected station Connected sum Connected station ActStationNumber OxFF Fixed to OxFF side module station side module station side module station number number number Connected station Connected station number number 3 DETAILS OF THE ACT CONTROLS MELSEC 2 When connected station CPU is QCPU A mode or ACPU a Configuration Connected MELSECNET 10 Relayed station CPU module module Relayed network Relayed Relayed station CPU module IBM PC AT compatib
69. block specifying number in the device X character string specified in the method is character string specified in the method unauthorised Review the system e g PLC CPU module setting and 0x01802007 Receive data error cable status The data received is abnormal Check the cable Exit the program and restart the IBM PC AT compatible PLC type mismatch Set the correct CPU type as the CPU type of the property The CPU type set to the property and the CPU Set the correct CPU type on the communication settings 0x0180200B type set on the communication settings utility do utility 0x0180100C Registry search failure not match the CPU type on the other end of Review the system e g PLC CPU module setting and communication cable status 6 ERROR CODES MELSEC Error Definition Corrective Action Station number specifying error 0x01802016 The method does not support the operation Review the station number performed for the specified station number Clock data write error Write of clock data failed 0x0180201C Place the PLC CPU in the STOP status Clock data cannot be written since the PLC CPU is during RUN Check the value of the first number specified in the First number error method 0x01802020 The first I O number specified the method is Using the GPP function check the PLC CPU parameters an unauthorised value assignment Exit the program and restart the IBM PC AT compatible First address
70. ce is specified When word device is specified Example MO Example DO 2 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lower Bytes When double word device is specified When CN200 or later of FXCPU is specified Example K8MO Example CN200 M16 to 31 2 L of CN200 1 Not used 0 is stored 2 Lower bits are stored in device number order 6 Returned value Normal termination 0 is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES 4 FUNCTIONS 4 2 8 GetDevice Device data acquisition 1 2 S When bit device is specified Example MO 2 Upper Bytes 2 Lower Bytes When double word device is specified Example K8MO Applicable ACT controls This function is available for all ACT controls Feature Acquires data from one point of device Format VB IRet object GetDevice szDevice IData Long IRet Returned value String szDevice Device name Long IData Set data VC object GetDevice szDevice Long IRet Returned value CString szDevice Device name Long Set data Explanation MELSEC Output Input Output Output Input Output The data of one point of device specified in szDevice is stored into IData or IplData Device specifying methods Specify the devices in the following methods Example DO MO 1 Not used 0 is stored 2 Lower bits are stored in d
71. connected station side MELSECNET 10 module is the ordinary station Always set the target station side MELSECNET 10 module as the control station and specify 0x00 in ActStationNumber 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 7 ActAJ71E71UDP control The following table indicates the properties possessed by the ActAJ71E71UDP control and their default values 1 Configuration 2 Property patterns Connected Station CPU Station CPU Relayed Station CPU Connected E71 Relayed QCPU pie ACPU Relayed Network QCPU QnA ACPU B station CPU module A mode CPU CPU x1 Relayed vM IMELSECNET 10H p Re 0 2 x2 x Ox Relayed Relayed lt 2 2 x station CPU module Ethernet x x x x x Computerin x x x x x FTN Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Operates as the one equivalent to AnACPU IBM PC AT compatible 3 Property list Property Patterns ActCpuTimeOut 40 Any value specified by user in 250ms units 262 ActCpuType CPU ATNCPU CPU type corresponding to target station 1280 ActDestinationPortNumber 0x500 Port number of connected station side module Host name or IP address of connected station side module
72. ctDestinationPort pes For multidrop connection via series compatible C24 CC Link specify the actual I O number ActDestinationlONumber first 16 of the last access target station When the target is the intelligent special function LONG module When the target is the CPU specify 3 DETAILS OF THE ACT CONTROLS MELSEC Property Name Type For multidrop connection via Q series compatible C24 CC Link specify the multidrop connection channel number Ch1 Ch2 Invalid for other connections ActThroughNetworkType LONG ActIntelligent PreferenceBit LONG ActDidPropertyBit LONG ActDsidPropetyBit LONG You can select the MELSECNET 10H or MELSECNET 10 mode to make access to the own station QCPOU Q mode or to the QCPU Q mode via the MELSECNET 10H when using the ActQJ71C24 ActQJ71E71TCP ActQJ71E71UDP ActQCPUQ or ActQCPUQUSB control When the control used is other than the above the mode is fixed to the MELSECNET 10 mode MELSECNET 10H mode MELSECNET 10 mode For multidrop connection via Q series compatible C24 CC Link specify whether the network of the multidrop link destination will be relayed or not To differentiate the own network module Property value 000 Another network of multidrop link destination is not accessed Another network of multidrop link destination is accessed For access to the Q series compatible own station intel
73. d Station Own Board Relayed Network QCPU QnA ACPU QnACPU FXCPU wausewemed msomo 2 e e e IES 9 omen x x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list Property Patterns eee ls ActCpuT 1625 CPUt ding to t t stati ion ctCpuType CPU BOARD ype corresponding to target statio ActDestinationlONumber Fixed to 0x00 testraionoNunber __ ActDidPropertyBit 0 Fixed to 0x00 en ActDsidP rtyBit Fixed to 0x00 ctDsidPropertyBi ind Connected station side ActlON Fixed to 0x00 Fixed to relayed module I O address ActMultiDropChannelNumber 0x ut Fixed to 0x00 Target station side module Connected station side network number module network number Board No of IBM PC AT compatible side MELSECNET 10 board SAC SHIPS 1 PORT 1 to PORT 4 first to fourth boards Target station side module Connected station side ActStationNumber Fixed to 9 oe station number module station number Target station side module ActUnitNumber Fixed to 0x00 Fixed to 0x00 3 ts station number ActNetworkNumber Fixed to 0x00 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 21 ActCCBD control The following table indicates the properties possessed by the control and their default values
74. d UINT LPARAM IParam if nID amp OxFFFO ABOUTBOX CAboutDlg digAbout digAbout DoModal else CDialog OnSysCommand nID IParam lf you add a minimize button to your dialog you will need the code below to draw the icon For MFC applications using the document view model this is automatically done for you by the framework void CCustomSampleEngDlg OnPaint 5 SAMPLE PROGRAMS MELSEC if IsIconic else CPaintDC dc this device context for painting SendMessage WM ICONERASEBKGND WPARAM dc GetSafeHdc 0 Center icon in client rectangle int cxIcon GetSystemMetrics SM CXICON int cylcon GetSystemMetrics SM CYICON CRect rect GetClientRect amp rect int x rect Width 1 2 int y rect Height cylcon 1 2 Draw the icon dc Drawlcon x y m hlcon CDialog OnPaint The system calls this to obtain the cursor to display while the user drags the minimized window HCURSOR CCustomSampleEngDlg OnQueryDraglcon return HCURSOR m hlcon JASPER REND RI Open Communication Route M void CCustomSampleEngDlg OnOpenCom long HRESULT hr BSTR szAdr NULL wchar t wsz L 1 1 1 2 5 HostAddress Example CString MsgStr CWnd UpdateData TRUE Clear ReturnValue Display m RetVal
75. d from the IBM PC AT compatible the Ethernet module may not perform close processing Close One of its causes is the open cable If open processing Open is executed from the IBM PC AT compatible with the Ethernet module not performing close processing Close open processing Open from the IBM PC AT compatible is not terminated normally until the Ethernet module makes a target existence check and executes close processing Close If you want to terminate open processing Open early from the IBM PC AT compatible shorten the target existence check starting interval setting of the Ethernet module The target existence check starting interval setting of the Ethernet module defaults to 10 minutes It can be set for the E71 of AJ71E71 S3 or later 3 About switch settings of E71 and QE71 If the 4 lower digits of the error code which occurred during Ethernet communication using E71 or QE71 is not indicated in the E71 or QE71 manual check whether the DIP switch SW2 of the E71 or QE71 is set as indicated below If the DIP switch is not set correctly a difference has occurred in the packet format ASCll binary and therefore the error code returned from the module cannot be recognized correctly ES TCP IP ON ASCII mode 4 About computer link communication a If the connected station CPU is the ANUCPU and the computer link module is the UC24 for computer link connection remote operation will result in an error when access is made
76. e Properties tr t t no r DA 3 2 3 3 Lists of Properties Possessed by the ACT 3 7 3 3 1 ActEasylF control rcd ch d Dh Hd ete Hd ad o de Sete 3 8 AcIQI7ZTEZA FER COMO 3 9 AciQJ71E71UDP controle a het e oe ta 3 11 4 ACUAJZTQET ITOP ict teet rite qe aree eran nr rhe reae n qr ar err a Qr naria ead 3 13 3 3 5 ActAJ71QE7TUDP control entr enne ar eadera a e ead e 3 14 6 ACHAIZTE7 1 TCP COMTO 3 15 3 3 7 ActAJ71E71 UDP Naaa 3 16 3 ACIACPUQ COMTO oe 3 17 3 3 9 ActQCPUA control eese nennen asset nasse tenes stains se ense se aenea seen ase 3 19 3 3 10 ACctQnACPU Control cct n er eei a ree ies 3 20 23 9 M ACTA PU COMING iret Erie re OD Dod Eli tr na eras erem 3 21 3 39 12 ACEEXO BU Controls rrt ro ruta en oc rue a et 3 22 3 3 13 ActQU71C24 CONTON 3 23 ACtAJ74 Q C24 a hve t Dr enit dnd te e deter ie in re dea 3 27 3 3 15 ActAJ71UC24 3 29 3 3 16 ActAJ71624 control tectae deep 3 81 3 3 17 ACIQCPUQUSB 3 33 3 3 18 Ac
77. e conversion UNICODE ASCII code or ASCII code UNICODE failed First number error The first number specified is an unauthorised value A matching first I O number does not exist Buffer address error The buffer address specified is an unauthorised value The buffer address is outside the range Buffer read size error As a result of buffer read the specified size could not be acquired Size error The size specified in the read write method is abnormal The read write first number plus size exceeds the device or buffer area Operation error The operation specified for remote operation is an abnormal value Clock data error The clock data is abnormal Check the character string specified in the method The ASCII character string acquired from the PLC CPU is abnormal Review the system e g PLC CPU module setting and cable status Exit the program and restart the IBM PC AT compatible Retry the GetCpuT Check the value of the first number specified in the pe method method Using the GPP function check the PLC CPU parameters assignment Check the value of the buffer address specified in the method Perform reopen processing Review the system e g PLC CPU module setting and cable status Retry Exit the program Check the size specified in the method Check the operation specifying value specified in the method Check the clock data specified in the method Set the
78. e following folders at default installation C MELSEC ACT SAMPLE VB Project1 vbp Project file C MELSEC ACT SAMPLE VB Form1 frm Source file C MELSEC ACT SAMPLE VB ActDefine bas Header file 4 Screen The sample program screen will be explained i sample OLX Control 6 ActACPU ActEasylf GetCpuType Result Return Value Device Type GetDevice Device Value SetDevice Output Data Decimal Close Communication i Close Enter the device value to be written Close Communication Used to close the communication line Used to read the data of the device entered into the Device Type text box Used to write the data of the device entered into the Device Type text box Return Value Shows the result of executing the function Shows the CPU type code and read device value Output Data Shows the CPU type 5 SAMPLE PROGRAMS MELSEC 5 Program Private Sub CloseButton Click End End Sub Private Sub CloseComButton Click Dim IRet As Long On Error GoTo Error Error Handler Clear Return Value Display ResultTxt 0 Text ResultTxt 1 Text ResultTxt 2 Text If Option1 0 Value True Then ActACPU Control IRet ActACPU1 Close CLOSE Method Else ActEasyIF control IRet ActEasyIF1 Close Exec CLOSE Method End If Renew Return Value ResultTxt 0 Text Hex IRet Exit Sub Error ErrMsg Error Err MsgBo
79. e station Fixed to OXFF number number 10000 Any value specified by user in ms units 0 Target station side 0x00 Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 module station number 1 As the I O address specify the value found by dividing the actual first number by 16 2 Note the following points when making access via the Ethernet module QE71 For ActNetworkNumber and ActStationNumber specify the value set in the parameter setting of the target station side QE71 Set the MNET 10 routing information in the parameter setting of the QE71 Also when making setting specify other than the automatic response system any of the IP address calculation system table conversion system and combined system as the MNET 10 routing System 3 34 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 19 ActCCGAA control The following table indicates the properties possessed by the control and their default values 1 Configuration Connected station CPU Relayed module CC Link module Relayed network CC Link G4 module A mode Relayed Relayed station CPU module IBM PC AT compatible 2 Property patterns Relayed Station CPU QCPU QnA ACPU Relayed Network QCPU QnA ACPU SEE Emme x x x x Computerin x x x ccu x x Accessible x Inaccessible 1
80. e values using the ActAJ71QE71UDP control or ActEasylF control on the dispatch interface 1 Using method Load the form and choose the control to be used Clicking the button opens the communication line through Ethernet communication By clicking the button the type code of the PLC CPU which is currently connecting the line appears in the Output Data text box top and the CPU type in the Output Data text box bottom Entering the device from where you want to read a value into the Device Name text box and clicking the button shows the device data in the Output Data text box top To write a device value enter the device where you want to write a value into the Device Name text box and the device value to be written into the Device Value text box and click the button Clicking the Close Communication button closes the communication line If an error occurs at the execution of any function an error code appears in the Return Value text box If an error has occurred refer to 6 ERROR CODES and eliminate the error cause Precautions for use of the sample program a When using the ActEasylF control set the Ethernet communication information to the logical station number 2 on the communication settings utility before starting the sample program running b When changing the control used click the Close Communication to close the communication line once then change the co
81. eCom long IRet HRESULT hr CString MsgStr CWnd UpdateData TRUE Clear ReturnValue Display m RetVal m RetVal2 m RetVal3 if m SelectCntl 0 ActAJ71QE71UDP Control Custom Interface hr mp IAJ71QE71UDP Close amp IRet Exec Close Method else Control Custom Interface hr mp IEasyIF Close amp IRet Exec Close Method ifSUCCEEDED hr Compornent Communication is succeeded Renew ReturnValue m RetVal Format 0x9608x IRet else MsgStr LoadString IDS_STRING103 AfxMessageBox MsgStr ICONINFORMATION CWnd UpdateData FALSE EATER RU EX I LEER EERE RE AERA EAE n Destroy Window Free Compornent OCCORRE BOOL CCustomSampleEngDlg DestroyWindow EES EEER ES AIS EE Eoo dedere Free the Custom Interface Compornent mp_lAJ71QE71UDP gt Release mp IEasyIF Release 5 SAMPLE PROGRAMS MELSEC return CDialog DestroyWindow Property setting may also be made directly on the property page When property setting is made on the property it need not be made in the program 6 For use in another communication path Run the program after changing the logical station number only when the utility setting type is used or the ACT control prope
82. en the control for network board is used specify the first board as PORT 1 and the second and subsequent boards as PORT 2 PORT 3 Property value e PORT 3 0x03 TE Specify the baudrate for computer link communication Property value Property value Property window input Description Property window input Description value value BAUDRATE 300 BAUDRATE 9600 300bps 9600bps 300 9600 ActBaudRate BAUDRATE BAUDRATE_19200 LONG 600 19200 BAUDRATE 1200 BAUDRATE 38400 1200b 38400bps 1200 38400 BAUDRATE 2400 BAUDRATE 57600 2400b 57600bps 2400 57600 BAUDRATE 4800 BAUDRATE 115200 4800b T 115200bps 4800 115200 Specify the number of bits 7 or 8 of the byte data sent and received for computer link ActDataBit LONG communication Specify the parity system used for computer link communication Property value ee Description i Property window input value E NO PARITY 0 pari zi ODD PARITY 1 2 3 DETAILS OF THE ACT CONTROLS MELSEC Property Name Type Specify the number of stop bits used for computer link communication Property value Description ActStopBit TE E window A value i LONG ISTOPBITONE 2 ONE 1 tstopbit bit Specify the control setting of the signal line Property value Description mox OEC window input value ActControl 00 DTR DTReontrol O LONG 02 RTS cont
83. error Check the value of the buffer address specified in the 0x01802021 The buffer address specified in the method is an method unauthorised value Exit the program and restart the IBM PC AT compatible Clock data read write error The clock data read write method was executed 0x01802038 Do not execute clock data read write for the PLC CPU which does not have the clock devices 0x01808001 Duplex open error Exit the program and restart the IBM PC AT compatible Channel number specifying error Set the correct value to the port number of the property The port number set to the property and the port us 0x01808002 Make communication settings again on the number set on the communication settings utility are unauthorised values Driver not yet started 3 0x01808003 EAD Start the driver The network board driver is not started MUTEX generation error communication settings utility Exit the program and restart the IBM PC AT compatible 0x01808005 Creation of MUTEX to exercise exclusive control failed Reinstall ACT ailed Check for a running application which uses the same port number Retry after changing the port number value of the Socket object generation error 0 01808007 Retry after changing the port number value on the Creation of the Socket object failed M communication settings utility Make Ethernet board and protocol settings on the control panel of the OS
84. evice number order 6 Returned value Normal termination 015 returned Abnormal termination Any value other than 0 is returned When word device is specified 2 Upper Bytes 2 Lower Bytes L wi When 200 or later of FXCPU is specified Example CN200 2 Upper Bytes 2 Lower Bytes 2 Upper Bytes M16 to M31 2 MO to 15 2 2 Lower Bytes H of CN200 L of CN200 Refer to Chapter 6 ERROR CODES 4 FUNCTIONS MELSEC 4 2 9 ReadBuffer Buffer memory read 1 Applicable ACT controls The applicable ACT controls are indicated below Control Name Usabilit Control Name Usabilit ActAJ71QE71UDP ActAJ71E71UDP AdQCPUQUSBB O o ActAJ71C24 5 Usable X Unusable 1 An error is returned if access to the ANUCPU QCPU A mode A173UHCPU S1 or A273UH S3 is made 2 An error is returned if access to the QnACPU is made 3 An error is returned if own board access is made An error is returned if the CPU is other than FX2N and FX2NC 5 An error is returned if the CPU is other than FXoN FX2 FX2c FX2N and FX2Nc 6 An error is returned if access to the QnACPU is made via the MELSECNET 10 or MELSECNET II 2 Feature Reads the buffer memory values of the special function module 3 Format VB JRet object ReadBuffer IStartlO Address IReadSize iData 0 Long IRet Returned value Output Long IStartlO First number of
85. gain on the communication settings utility Stop bit specifying error 0x01808409 The stop bit value of the property is unauthorised Communication control setting error 0x0180840A The control value of the property is unauthorised Set them again on the communication settings utility Review the data bit value of the property Set it again on the communication settings utility 0x01808408 Review the stop bit value of the property Set it again on the communication settings utility Review the control value of the property Set it again on the communication settings utility Review the time out value of the property Set it again on the communication settings utility Review the system e g PLC CPU module setting and cable status Perform Close once and execute Open again Exit the program and restart the IBM PC AT compatible 0x0180840C Exit the program and restart the IBM PC AT compatible 0x0180840D Duplex connect error Exit the program and restart the IBM PC AT compatible Attach failure 0x0180840E Exit the program and restart the IBM PC AT compatible i Attaching of the socket object failed Time out error 0x0180840B Though the time out period had elapsed data could not be received Signal line status acquisition failure 0x0180840F Acquisition of the COM port signal line status Exit the program and restart the IBM PC AT compatible failed CD signal line OFF Review the system e g PLC CPU module setting
86. h C MyProjects ACTSACT1 cpp Aa Variable Control IDs Delete Variable Description Cancel 2 ABOUT THE ACT CONTROLS 2 2 Programming Procedures MELSEC This section gives the procedures of creating a user application 2 2 1 When using VB When using VB create a user application in the following procedure Power on the IBM PC AT compatible and start Windows Install ACT and make ACT valid with the license key FD Make settings using the utility setting type Utility setting type Start the communication settings utility and make communication settings in accordance with the wizard Start VB Refer to Register the ACT control to VB Create form and paste the ACT control to the form ActEasylF control SSS C5055 5S Set the property of the pasted control Set only the logical station number Refer to the operating manual Section 2 1 1 fefer to the operating manual Refer to the operating manual startup lt Program setting type gt Start VB Add the ACT controls to VB Create a form and paste the ACT controls for corresponding communication Refer to Section 2 1 1 Set the properties of the pasted ACT controls _ Refer to the operating manual Perform programming using the functions offered by the corresponding ACT control
87. ify the extended file register describe between the block number part and file register part Specifying specifies R of block No 0 Specifying ERO R returns an error Specifying does not enable extension representation indirect specification digit specification 4 For direct specification describe between the direct specification part and device specification part x5 Cannot be used when E71 is relayed For specify the network number 7 Specify the special module I O number hexadecimal for U and the buffer memory address decimal for G Example Specify U20 G100 when the special module I O number is 200H and the buffer memory address is 100 8 FXCPU cannot be used 2 For CC Link communication only For CC Link communication only the devices in the following table can be used when own board access is made They cannot be used for other communication paths Link special register Word Hexadecimal _ Link special register of own board Remote x Bt Hexadecimal n P Link register wa Remote register write area for CC Link Ware Hexadecimal Remote register read area for CC Link Buffer memory of own station CC Link Buffer memory Word Hexadecimal Module Random access buffer in buffer memory Random access buffer Word Hexadecimal own station CC Link module Automatic refresh b
88. iled Perform Close once and execute Open again Review the system e g PLC CPU module setting and cable status Receive error Review the time out value of the property 0x01808901 Data receive failed Review the time out value on the communication settings utility Exit the program and restart the IBM PC AT compatible Receive buffer size shortage 0x01808304 Receive data was larger than the receive buffer Exit the program and restart the IBM PC AT compatible size prepared for the system Control error 0x01808401 Changing of the COM port communication Exit the program and restart the IBM PC AT compatible control failed 0x01808201 6 ERROR CODES MELSEC Error Definition Corrective Action Signal line specifying error 0x01808403 Changing of the COM port communication Exit the program and restart the IBM PC AT compatible control failed 0x01808404 Open not yet executed BAUR p Exit the program and restart the IBM PC AT compatible Communication parameter error mE Review the data bit and stop bit values of the properties 0x01808405 The data bit and stop bit combination of the properties is unauthorised The baudrate of the property is unauthorised Set it again on the communication settings utility Data length error 0x01808407 The data bit value of the property is unauthorised Parity specifying error Review the parity value of the property The parity value of the property is unauthorised Set it a
89. in circle x Inaccessible 1 Including motion controller CPU 2 Operates as the one equivalent to AnACPU IBM PC AT compatible 3 Property list Property Patterns aid 271 ActCpuType CPU CPU type corresponding to target station _A2USHS1CPU 0 Target station side module ActNetworkNumber Fixed to 0x00 9 Fixed to 0x00 0x00 network number 255 Target station side module Target station side module ActStationNumber Fixed to 9 9 OxFF station number station number 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 23 ActLLT control The following table indicates the properties possessed by the ActLLT control and their default values Property Default Value Property Pattern 34 CPU QO2CPU CPU type corresponding to target station 10000 Any value specified by user in ms units 4 FUNCTIONS MELSEC 4 FUNCTIONS This chapter provides the programming instructions and function details dispatch interface custom interface 1 For interface selection we recommend you to choose the dispatch interface which is simpler 2 For programming refer to Section 4 1 Programming Instructions 4 1 Programming Instructions This section gives the instructions for programming 1 Instructions common to VB and VC a Multithread When performing multithread programming follow the rules of COM a
90. ion 4 2 Details of the Functions Dispatch Interface 4 3 1 Open Communication line opening hResult object Open kIplRetCode HRESULT LONG hResult kIplRetCode 4 3 2 Close Communication line closing Returned value of COM Output Returned value of communication function Output hResult object Close IplRetCode HRESULT LONG hResult kIplRetCode 4 3 3 ReadDeviceBlock Device batch read Returned value of COM Output Returned value of communication function Output hResult object ReadDeviceBlock szDevice ISize IplRetCode HRESULT BSTR LONG LONG LONG hResult szDevice kIplData kIplRetCode 4 3 4 WriteDeviceBlock Device batch write Returned value of COM Output Device name Input Number of read points Input Read device values Output Returned value of communication function Output hResult object WriteDeviceBlock szDevice ISize IplRetCode HRESULT BSTR LONG LONG LONG hResult szDevice ISize kIplData kIplRetCode Returned value of COM Output Device name Input Number of write points Input Written device values Input Returned value of communication Output function 4 FUNCTIONS MELSEC 4 3 5 ReadDeviceRandom Device random read hResult object ReadDeviceBlock szDevice ISize IplRetCode HRESULT hResult Returned value of COM Output BSTR szDevice Device name Input LONG ISize Num
91. lass name Variables tab z jac T Pret A CTACTI epp 238 Choose the member variable adding control ID and click Control IDs Type Member a the Add Variable button IDCANCEL IDOK Description Microsoft Visual C x 7 3 When the left screen appears read the information and A The Aniya has not been inserted into the project Developer Studio will do T k th OK b tt i OK n Cancel ene Confirm Classes 2 4 Check the class checkbox and click the button The checked class es will be generated from the Activex Control Click on a class name to browse or edit its attributes Cancel Class name Base class CActACPU Cwnd Header file ch Implementation file ActACPU cpp To the next page 2 ABOUT THE ACT CONTROLS MELSEC From the previous page l Add Member Variable 5 Enter the member variable name and click the button Member variable name _ Cancel Category Control Variable type CActACPU Description map to CActA amp CPLU member Ged 6 sure that the member variable has been registered Message Maps Member Variables Automation ActiveX Events Class Info Project Class name AddClass v ACT v fact AMyProjecteNACTNACT T
92. le 1 Including motion controller CPU 2 Indicates the CH2 side setting side fixed to independent mode c Property list Property Patterns 19200 ActBaudRate BAUDRATE Match to the setting of QC24 N 19200 ActConnectUnitNumber Connected station side module station number ActControl Wein DTR OR Depending on used cable _RTS ActCpuType CPU CPU type corresponding to target station 1023 Connected station side ActlONumber 1 Fixed to Fixed to Ox3FF module I O address T t stati id dul ActNetworkNumber Fixed to 0x00 Pica er CHAT Fixed to 0x00 Uu network number ActParity s PARITY Match to the setting of QC24 N ActPortNumber eons 1 IBM PC AT compatible side COM port number ActStationNumber Fixed to OxOFF Fixed to OxOFF Fixed to OxOFF lctTimeOu Any value specified by user ms units Target station side module ActUnitNumber Fixed to 0x00 9 Fixed to 0x00 x station number 1 As the I O address specify the value found by dividing the actual first number by 16 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 15 ActAJ71UC24 control The following table indicates the properties possessed by the ActAJ71UC24 control and their default values 1 When there is relayed module in addition to connected station side UC24 a Configuration b Property patterns QCPU QnA Relayed Network Connected Relayed sta
93. le b Property patterns Connected Station Station CPU Relayed Station CPU oe IMELSECNETAOH x x x x 2 2 x merseoner x x x x x x x x x Compuerink ox fx 5 _ CC Link Accessible LUI pattern within x Inaccessible 1 Including motion controller CPU C Property list a Patterns Property Default Value 1025 CPUt ding to t t stati ctCpuType CPU_BOARD ype corresponding to target station ActDestinationlONumber Fixed to 0x00 CINE oon ActDidPropertyBit Fixed to 0x00 ActDsidP rtyBit Fixed to 0x00 ee 2244 3 ActlONumber Fixed to 0x00 ERR e _ ActMultiDropChannelNumber Fixed to 0x00 ActNetworkNumber Fixed to 0x00 Target station side module network number AciParN mbar Board No of IBM PC AT compatible side MELSECNET 10 board 1 PORT 1 to PORT 4 first to fourth boards ActStationNumber Fixed to OxFF Target station side module station number ActUnitNumber Fixed to 0x00 3 DETAILS OF THE ACT CONTROLS MELSEC 3 When connected station CPU is QnACPU a Configuration Connected MELSECNET 10 Relayed station CPU module module Relayed network Relayed Relayed station CPU module IBM PC AT compatible b Property patterns EE EE CPU elaye
94. le Q series compatible E71 QE71 For ActNetworkNumber and ActStationNumber specify the value set in the parameter setting of the target station side Q series compatible E71 or QE71 e Set the MNET 10 routing information in the parameter setting of the Q series compatible E71 or QE71 Also when making setting specify other than the automatic response system any of the IP address calculation system table conversion system and combined system as the MNET 10 routing system 3 17 3 DETAILS OF THE ACT CONTROLS MELSEC P Default Val Property Patterns ropert efault Value ES Target station side ActNetworkNumber Fixed to 0x00 module network Fixed to 0x00 Fixed to 0x00 ocn number ActPortNumber mn 1 compatible side COM port number Target station side ActStationNumber Fixed to OXFF module station Fixed to OXFF Fixed to OXFF number QCPU Q mode 0x00 MELSECNET 10H only other than QCPU Q mode 0x01 ActThroughNetworkType including MELSECNET 10 Note that the setting must be the same as set in the network parameter of the GPP function 10000 Any value specified by user in ms units Target station side Target station side S Fixed to 0x00 Fixed to 0x00 module station module station number number 2 Note the following points when making access via the Ethernet module Q series compatible E71 QE71 For ActNetworkNumber and ActStationNumber specify the value set in
95. licable ACT controls This function is available for all ACT controls 2 Feature Writes data randomly to devices 3 Format VB IRet object WriteDeviceRandom szDeviceList ISize IData 0 Long IRet Returned value Output String szDevicelist Device name Input Long ISize Number of read points Input Long IData n Written device values Input VC object WriteDeviceRandom szDeviceList ISize IplData Long IRet Returned value Output CString szDevicelist Device name Input Long ISize Number of read points Input Long kIplData Written device values Intput 4 Explanation device values for ISize are written to the devices specified in szDeviceList The written device values are stored in IData or IplData Using the line feed symbol separate the devices in the character string specified in the device list The last device need not be followed by the line feed symbol Example DO nMO n 5 Device specifying methods Specify the devices in the following methods Example When MO D0 K8M0 is specified Example When DO CN200 D1 including CN200 and later of FXCPU is specified number of points is in total 2 Upper Bytes 2 Lower Bytes 2 Upper Bytes Number of points is 3 Oo o a H of CN200 L of CN200 M16 to M31 2 MO to M15 2 Example When DO FDO D1 including FD device is specified Number of points is 3 2 Upper Bytes 2 Lower Bytes LL of FD
96. ligent special function module intelligent special function module load on the own station CPU making the following setting invalid makes it unnecessary to specify ActUnitNumber Only ActlONumber is used to specify the module number Module number is made valid Module number is made invalid For multidrop connection via Q series compatible C24 CC Link making the following setting invalid makes it unnecessary to specify ActDestinationlONumber However when the following setting is made invalid ActDidPropertyBit must be made valid Use ActUnitNumber to specify number of the last access target station is made valid number of the last access target station is made invalid 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 Lists of Properties Possessed by the ACT Controls This section lists the properties possessed by the ACT controls and their default values How to use the manual in Section 3 3 1 to Section 3 3 23 is provided below How to use the manual in Section 3 3 1 to Section 3 3 23 Configuration Sketch of system configuration 3 DETAILS OF THE ACT CONTROLS 3 3 2 ActQJ71E71TCP fontrol following table indicates the properties possessed by the ActQJ71E71TCP control ind their default values 1 Configuration Property patterns Connected Station CPU telayed Station Connected Q series Relayed Relayed Network station CPU compatible E71 module QC
97. lists 2 To use the ACT controls on Visual Basic or Visual Section 2 1 Section 2 1 provides how to make settings on Visual Basic and Visual C to use the ACT controls 3 To know the programming procedure Section 2 2 Section 2 2 contains programming procedures 4 To know the device types to be specified in the functions Section 2 3 Section 2 3 lists the device types b To know the details of the ACT controls Chapter 3 Chapter 3 provides the details of the ACT controls Read this chapter when creating a program 6 To know the details of the functions Chapter 4 Chapter 4 gives the details of the functions Read this chapter when creating a program 7 To know how to use the sample programs Chapter 5 Chapter 5 provides the sample programs and how to use them Use them as reference when creating a program 8 To know the definitions of the error codes Chapter 6 Chapter 6 lists the error codes returned by the ACT controls and the error codes returned by the CPUs modules and network boards 9 To know the accessible devices and ranges The ACT operating manual contains the accessible devices and ranges Refer to the ACT operating manual Abbreviations and Terms in This Manual Unless otherwise specified the following generic terms and abbreviations are used in this manual to describe SWOD5C ACT E ActiveX Communication Support Tool Generic Term Abbreviation Description ACT Abbreviation of
98. m any of the IP address calculation system table conversion system and combined system as the MNET 10 routing system 3 23 3 DETAILS OF THE ACT CONTROLS MELSEC Default Val ty atterns y t Value 0 Target station side ActNetworkNumber 0x00 Fixed to 0x00 module network Fixed to 0x00 Fixed to 0x00 number 1 i i ies ible C24 ActParity ODD PARITY Match to the setting of Q series compatible 1 ActPortNumber PORT 1 IBM PC AT compatible side COM port number Target station side ActStationNumber Fixed to OXFF module station Fixed to OXFF Fixed to OXFF number QCPU Q mode 0x00 MELSECNET 10H only other than QCPU Q mode 0x01 ActThroughNetworkType including MELSECNET 10 Note that the setting must be the same as set in the network parameter of the GPP function 10000 Any value specified by user in ms units Target station side Target station side TUN Fixed to 0x00 Fixed to 0x00 module station module station number number 2 Note the following points when making access via the Ethernet module Q series compatible E71 QE71 For ActNetworkNumber and ActStationNumber specify the value set in the parameter setting of the target station side Q series compatible E71 or QE71 Set the MNET 10 routing information in the parameter setting of the series compatible E71 or QE71 Also when making setting specify other than the automatic response system any of the IP address
99. module from Input where values will be read Long Buffer memory address Input Long IReadSize Read size Input Integer iData n Values read from buffer memory Output VC IRet object ReadBuffer IStartlO IReadSize Long IRet Returned value Output Long IStartlO First number of module from Input where values will be read Long Address Buffer memory address Input Long IReadSize Read size Input Short kIpsData Values read from buffer memory Output 4 FUNCTIONS MELSEC 4 Explanation As the module number specified in IStartlO specify a value found by dividing the actual number by 16 The buffer values for IReadSize at the buffer memory address specified in Address the special function module located at the first number specified in IStartlO are read When using the ActFXCPU control or ActLLT control specify the block number 0 to 7 of the special expansion equipment as the module s first number and any of 0 to 32767 as the buffer memory address 5 Returned value Normal termination 0 is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES 1 An error is returned if access to the motion controller CPU is made 2 For iData or IpsData prepare a memory area having the number of points specified in IReadSize If there is no memory area a critical phenomenon such as an application error
100. n is other than QCPU mode QCPU mode 1023 Connected station Connected station ActlONumber 1 Fixed to Ox3FF Fixed to Ox3FF side module side module Ox3FF address address ctMuliDropChannelNumber WW Fixed to 0300 to 0x00 Fixed to 000 to 0x00 Fixed to 0x02 Fixed to 0x00 Target station side ActNetworkNumber Fixed to 0x00 module network Fixed to 0x00 Fixed to 0x00 number 255 Target station side ActStationNumber OxFF Fixed to OXFF module station Fixed to OxFF Fixed to OXFF number QCPU Q mode 0x00 MELSECNET 10H only other than QCPU Q mode 0x01 ActThroughNetworkType including MELSECNET 10 Note that the setting must be the same as set in the network parameter of the GPP function 10000 Any value specified by user in ms units 0 Target station side Target station side ActUnitNumber 0x00 Fixed to 0x00 Fixed to 0x00 module station module station number number 1 As the I O address specify the value found by dividing the actual first number by 16 2 Note the following points when making access via the Ethernet module Q series compatible E71 QE71 For ActNetworkNumber and ActStationNumber specify the value set in the parameter setting of the target station side Q series compatible E71 or QE71 Set the MNET 10 routing information in the parameter setting of the Q series compatible E71 or QE71 Also when making setting specify other than the automatic response system
101. n settings utilit 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 2 ActQJ71E71TCP control The following table indicates the properties possessed by the ActQJ71E71TCP control and their default values 1 Configuration 2 Property patterns Connected qur ET Station CPU elayed Station Connected Q series Relayed station CPU compatible E71 module QCPU Relayed Network QCPU QnA ACPU ee Q mode cpu er Relayed network MELSECNET 10H MELSECNET 10 station module Emme vere aS CC Link Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 3 Property list Property Patterns ade 7j 0 Connected station ActConnectUnitNumber 1 Fixed to 0x00 side module station Fixed to 0x00 Fixed to 0x00 0x00 number ActCpuType CPU P CPU CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 Fixed to 0x00 Ox3FF Ox3FF ActDidPropertyBit 0x01 invalid 0x01 invalid 0x00 valid 0x00 valid ActDsidPropertyBit 0x01 invalid 0x01 invalid 0x00 valid 0x00 valid lActHostAddress 1 1 Host name or IP address of connected station side module Connected station Connected station 1023 f ActlONumber FF Fixed to OX3FF Fixed to side relayed module side relayed module 0x3 address address Ac
102. nd ActiveX controls For details refer to the rules and reference books of COM and ActiveX controls 1 The ActiveX controls used on ACT are those of the STA model 2 When passed to another apartment the interface pointer must be marshaled Provide synchronization using the CoMarshallerThreadlInterfacelnStream or CoGetlnterfaceAndReleadseStream COM function 2 Instructions for use of VB Only the dispatch interface is usable 3 Instructions for use of VC dispatch interface custom interface a Both the dispatch interface and custom interface are usable b BSTR type In the functions which acquire the methods and properties using the BSTR pointer type memory must be secured inside the ActiveX controls and released in user programs This is based on the rules of COM and ActiveX controls Example BSTR szCpuName LONG lCpuCode Obj GetCpuType amp szCpuName amp lOpuCode MessgBox 96s CpuCode d szCpuName ICpuCode SysFreeString szCpuName 4 FUNCTIONS MELSEC 4 Instructions for use of VC custom interface a HRESULT type Use the SUCCEEDED or FAILED macro to check whether the HRESULT type i e returned value of COM resulted in normal or abnormal termination Example HRESULT hResult LONG IRet hResult Obj Open amp IRet SUCCEEDE hResult if Ret SUCCESS else MessgeBox Communication Error x IRet else MessgeBo
103. nection via series compatible C24 QJ61BTf1 1 ActintelligentPreferenceBit value LONG Specify the own network Specify another network of multidrop destination Specify the station number for MELSECNET 10 H or CC Link Specify 0x00 when specifying the own station Handled as the own station when access to the CPU of the CPU board is made ActStationNumber Specify as follows for multidrop connection via Q series compatible C24 QJ61BTf1 1 LONG ActintelligentPreferenceBit value Specify the own network Specify another network of multidrop destination Specify the module number of the computer link module or the station number when the target is the QCPU compatible intelligent special function module However specify 00x0 when setting ActUnitNumber the QnA series own station module loaded to the own station CPU LONG Invalid when the target is not the computer link communication or QCPU compatible intelligent special function module For multidrop link specify the module number of the target computer link module Specify the module number of the computer link module QE71 or Q series compatible E71 For multidrop link specify the module number of the requesting computer link module For multidrop link via CPU COM communication however the module number of the requesting Across RN E station is not needed specify 00 0 Specify 0x00 for other than multidrop link LONG For the QE71 and Q serie
104. ng of C24 10000 Any value specified by user in ms units 1 0 oe 1 0x00 Target station side module station number 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 17 ActQCPUQUSB control The following table indicates the properties possessed by the ActQCPUQUSB control and their default values 1 Configuration 2 Property patterns Connected MINER Station CPU elayed Station paler Rel Relayed Network cpu em CPU J IBM PC AT compatible Relayed network mensconerio 2 2 e MELSECNET II Computertink 9 x 9 x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 2 Use the QnA or ACPU side CC Link module whose ROM version is S or later station CPU module Relayed Relayed 3 Property list Property Patterns Property Default Value o 34 CPU CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 Fixed to 0x00 Fixed to OX3FF Fixed to OX3FF ActDidPropertyBit 0x01 invalid 0x01 invalid 0x00 valid 0x00 valid ActDisdPropertyBit 0x01 invalid 0x01 invalid 0x00 valid 0x00 valid 0x01 target station is 0 01 target station is QCPU mode 0x00 QCPU mode 0x00 F F ActintelligentPreferenceBit odi ixed to 0x00 ixed to 0x00 target station is other target statio
105. ng type Used for computer link communication where the connected module is the ActAJ71QC24 QC24 N Program setting type ActAJ71UC24 Used for computer link communication where the connected module is the UC24 setting type ActAJ71C24 Used for computer link communication where the connected module is the C24 setting type Used for USB communication where the connected PLC CPU is the QCPU ActQCPUQUSB Q mode Program setting type AGOGGGAORA Used for CC Link G4 communication where the connected module is the ct n AJ65BT G4 QnA mode Program setting type Used for CC Link G4 communication where the connected module is the ActCCG4A AJ65BT G4 A mode Program setting type Program setting type Used for CC Link communication Program setting type Program setting type Program setting type 3 DETAILS OF THE ACT CONTROLS MELSEC 3 2 Details of the Properties The following tables give the details of the properties which must be set to create a user application When entering a property value directly into the property window of VB or VC change a character string such as a hexadecimal number or CPU type into a decimal property value Property Name Type ActLogicalCtationNumber LONG Logical station number set on the communication settings utility Specify the network number on the MELSECNET 10 H Specify 0x00 when specifying the own station Specify as follows for multidrop con
106. nications could not be made or the station passed through by routing Check that the network parameter setting is correct 0x01800001 No command error The corresponding method does not support 0x01800002 Memory lock error Exit the program and restart the IBM PC AT compatible Exit the program and restart the IBM PC AT compatible 0x01800003 Memory securing error Exit other programs and secure free memory area Exit the program and restart the IBM PC AT compatible 0x01800004 DLL load error Exit other programs and secure free memory area Reinstall ACT 0x01801002 Multi line open error Exit the program and restart the IBM PC AT compatible Exit the program and restart the IBM PC AT compatible 0x01800005 Resource securing error Exit other programs and secure free memory area Exit the program and restart the IBM PC AT compatible 0x01801005 Specified port error Reinstall ACT Exit the program and restart the IBM PC AT compatible 0x01801006 Specified module error Reinstall ACT 1 When the network board is relayed a time out error may occur Check the cable state 0x01801003 not yet executed Exit the program and restart the IBM PC AT compatible 6 1 6 ERROR CODES MELSEC Error Definition Corrective Action Check the CPU type set to ActCpuType Check that the system configuration is not an unsupported 0x01801007 Specified CPU error configuration Exit the program and restart the IBM PC AT com
107. nlnitDialog Add About menu item to system menu ABOUTBOX must be in the system command range ASSERT IDM ABOUTBOX amp OxFFF0 IDM ABOUTBOX ASSERT IDM ABOUTBOX lt 0 000 CMenu pSysMenu GetSystemMenu FALSE if pSysMenu NULL CString strAboutMenu strAboutMenu LoadString IDS ABOUTBOX if strAboutMenu IsEmpty pSysMenu gt AppendMenu MF_SEPARATOR pSysMenu gt AppendMenu MF_STRING IDM ABOUTBOX strAboutMenu Setthe icon for this dialog The framework does this automatically when the application s main window is not a dialog Setlcon m hlcon TRUE Set big icon Setlcon m hlcon FALSE Set small icon TODO Add extra initialization here 5 SAMPLE PROGRAMS f ACT Compornent Instance Create ActAJ71QE71UDP Control HRESULT hr CoCreatelnstance CLSID ActAJ71QE71UDP NULL MELSEC CLSCTX INPROC SERVER IActAJ71QE71UDP LPVOID mp IAJ71QE71UDP if IGUCCEEDED hr AfxMessageBox CoCratelnstance Failed exit 0 ActEasylF Control hr CoCreatelnstance CLSID ActEasylF NULL CLSCTX_INPROC_SERVER 1 LPVOID amp mp_IEasylF if SUCCEEDED hr AfxMessageBox CoCratelnstance Failed exit 0 ie return TRUE return TRUE unless you set the focus to a control void CCustomSampleEngDlg OnSysComman
108. ntrol and open the line again 5 SAMPLE PROGRAMS MELSEC 3 Sample file list The sample files are installed into the following folders at default installation C MELSEC ACT SAMPLE VC SAMPLE sample rc Resource file C MELSEC ACT SAMPLE VC SAMPLE sample dsw Project work space C MELSEC ACT SAMPLE VC SAMPLE sample dsp Project file 4 Screen The sample program screen will be explained fc CustomS ampleE ng x Control C ActEasylf Method Open Communication GetCpuType Result Return Device Name GetDevice A Device Value 0 SetDevice Output Close Communication DEED Close Used to choose the control to be used Open Communication Used to open the communication line GetCpuType Used to read the PLC CPU type Enter the device from to where a value will be read written Enter the device value to be written Close Communication Used to close the communication line Used to read the data of the device entered into the Device Name text box Used to write the data of the device entered into the Device Name text box Return Value Shows the result of executing the function Shows the CPU type code and read device value Output Data Shows the CPU type 5 SAMPLE PROGRAMS 5 Program sampleEngDlg cpp implementation file include stdafx h include sampleEng h EE include ActDefine h ACT Common Macro Header For Set
109. o OX3FF side module address 0 Target station side ActNetworkNumber 0x00 Fixed to 0x00 module network Fixed to 0x00 Fixed to 0x00 number 255 Target station side Target station side ActStationNumber OxFF Fixed to OxFF module station module station Fixed to OxFF number number ActTimeOut 10000 Any value specified by user in ms units 0 Target station side 0x00 Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 module station number 1 As the I O address specify the value found by dividing the actual first number by 16 2 Note the following points when making access via the Ethernet module QE71 For ActNetworkNumber and ActStationNumber specify the value set in the parameter setting of the target station side QE71 Set the MNET 10 routing information in the parameter setting of the QE71 Also when making setting specify other than the automatic response system any of the IP address calculation system table conversion system and combined system as the 10 routing System 3 Usable for only the QnACPU version 9707B or later 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 11 ActACPU control The following table indicates the properties possessed by the ActACPU control and their default values 1 Configuration 2 Property patterns Connected Station CPU Relayed Station CPU station CPU module zit MELSECNETHOH x x x x x MESECNEU0 2 x 2 x
110. o be used Clicking the button opens the communication line through CPU COM communication By clicking the GetCpuType button the type code of the PLC CPU which is currently connecting the line appears in the Output Data text box top and the CPU type in the Output Data text box bottom Entering the device from where you want to read a value into the Device Type text box and clicking the button shows the device data in the Output Data text box top To write a device value to the ASUCPU enter the device where you want to write a value into the Device Type text box and the device value to be written into the Device Value text box and click the button Clicking the Close Communication button closes the communication line If an error occurs at the execution of any function an error code appears in the Return Value text box If an error has occurred refer to 6 ERROR CODES and eliminate the error cause 2 Precautions for use of the sample program a When using the ActEasylF control set the CPU COM communication information to the logical station number 3 on the communication settings utility before starting the sample program running b When changing the control used click the Close Communication button to close the communication line once then change the control and open the line again 5 SAMPLE PROGRAMS MELSEC 3 Sample file list The sample files are installed into th
111. ogical station number operating manual Perform programming using the functions offered by the corresponding ACT control Refer to Section 5 2 Perform debugging using Yes the PLC monitor utility Refer to the operating manual Completion of user application 2 ABOUT THE ACT CONTROLS MELSEC 2 3 Device Types This section explains the devices that may be specified for the functions 1 For the functions ReadDeviceBlock WriteDeviceBlock ReadDeviceRandom WriteDeviceRandom SetDevice and GetDevice specify the devices in the form of device name device number For the device numbers note the differences between octal decimal and hexadecimal numbers 2 When specifying bit devices for ReadDeviceBlock or WriteDeviceBlock specify the device number as a multiple of 16 8 Only the devices indicated in this section are supported Do not use unsupported devices 1 Common The following device types are common to all communication paths Function inot Fx Dedma Function output FY 4 words 1 point Special relay sm Specialregister sD woa o 1 x Hexadecimal Bit OctalforFxcPU Output reay 1 Y Hexadecimal Bit internalrelay 2 Bi Decimal 0 2 Decimal B
112. ol is TCP IP target module E71 QE71 The functions can be executed only when the communication target PLC CPU is in the RUN mode An error is returned if the PLC CPU is in other than the RUN mode 2 When the protocol is UDP IP target module E71 QE71 The functions cannot be executed until the communication target PLC CPU is RUN once An error is returned if the PLC CPU has not been RUN once c The communication line is broken if the CPU becomes faulty or the Ethernet module is reset during Ethernet communication when the protocol is TCP IP In that case perform line close processing Close and then execute reopen processing Open d When two different communication systems protocols are used to make access from one IBM PC AT compatible to one Q series compatible E71 two station numbers i e for TCP IP and for UDP IP must be set Example When ACT uses TCP IP and GPPW uses UDP IP IBM PC AT compatible TCP IP station number for 2 Q series compatible E71 UDP IP station number for GPPW 3 Station number 1 GPPW UDP IP ACT TCP IP Set different station numbers as the TCP IP station number for ACT and UDP IP station number for GPPW If they are set to the same station number an error will occur on the Ethernet module side 2 About target existence check starting interval 1 of Ethernet module If close processing Close is execute
113. operty setting may also be made directly on the property page When property setting is made on the property it need not be made in the program 6 For use in another communication path Run the program after changing the logical station number only when the utility setting type is used or the ACT control properties and functions 5 SAMPLE PROGRAMS 5 2 2 Custom interface MELSEC This sample program is designed to read the type of the connection destination CPU and read write device values using the ActAJ71QE71UDP control ActEasylF control on the custom interface 1 4 Using method The using method is the same as that of the sample program for dispatch interface Refer to Section 5 2 1 Dispatch interface 1 Using method Precautions for use of the sample program The precautions are the same as those of the sample program for dispatch interface Refer to Section 5 2 1 Dispatch interface 2 Precautions for use of the sample program Sample file list The sample files are installed into the following folders at default installation C AMELSEC ACT SAMPLE VC CUSTOMSAMPLE CustomSample rc Resource file C MELSEC ACT SAMPLE VC CUSTOMSAMPLE CustomSample dsw Project work space C MELSEC ACT SAMPLE VC CUSTOMSAMPLE CustomSample dsp Project file Screen The screen is the same as that of the the sample program for dispatch interface Refer to Section 5 2 1 Dispatch interface 4 Screen 5 SAMPLE PROGRAMS
114. patible Reinstall ACT 0x01801008 Target station access error Review the target station Exit the program and restart the IBM PC AT compatible Reinstall ACT Exit the program and restart the compatible 0x0180100D GetProcAddress failure Reinstall ACT Exit the program and restart the IBM PC AT compatible 0x0180100E DLL non load error Reinstall ACT Another Object in execution 0x0180100F Method cannot be executed because of Execute again after some time exclusive control in progress Device error The device character string specified in the 0x01802001 Review the device name method is an unauthorised device character string Device number error 0x01802002 device character string number specified Review the device number the method is an unauthorised device number Check the module side sumcheck setting Sumcheck error Check the sumcheck property of the control 0x01802004 The sumcheck value of the received data is Check the cable abnormal Exit the program and restart the IBM PC AT compatible Reinstall ACT Check the number of points specified in the method Size error Review the system e g PLC CPU module setting and 0x01802005 The number of points specified in the method is cable status unauthorised Exit the program and restart the IBM PC AT compatible Reinstall ACT Block number error 0x01802006 The block specifying number in the device Review the
115. plicable ACT controls MELSEC The applicable ACT controls are indicated below Control Name Usabilit ActEasylF ActAJ71C24 ActQJ71E71TCP Q ActQJ71E71UDP ActAJ71QE71TCP O x O O ActCCGAQnA AcICCBD ActANUBD ActLLT x Usable X Unusable 1 An error is returned if own board access is made 2 An error is returned if access to the QnACPU is made 3 An error is returned if access to the QnACPU is made via the MELSECNET 10 or MELSECNET II Feature Reads time from the clock data of the PLC CPU Format VB IRet object GetClockData iYear iMonth iDay iDayOfWeek iHour iMinute iSecond Long IRet Returned value Output Integer iYear Read year value Output Integer iManth Read month value Output Integer Read day value Output Integer iDayOfWeek Read day of week value Output Integer Read hour value Output Integer iMinute Read minute value Output Integer iSecond Read second value Output VC IRet object ReadBuffer lpsYear lpsDayOfWeek lpsHour IpsMinute lpsSecond Long IRet Returned value Output Short kIpsYear Read year value Output Short kIpsMonth Read month value Output Short Read day value Output Short klpsDaYOfWeek Read day of week value Output Short kIpsHour Read hour value Output Short klpsMinute Read minute value Output Short kIpsSecond Read second value O
116. puter link communication j 3 4 Computer link module LE Ethernet Ethernet Ethernet communication board RS 232C RS 422 conversion RS 232C Ethernet module ACPU QnACPU QCPU FXCPU motion controller CPU CPU COM communication Jm QCPU Q mode CPU USB communication MELSECNET 10 communication MELSECNET 10 board CC Link communication CC Link zi board _ RS 232C RS 422 conversion CC Link G4 CC Link module CC Link G4 communication Software version N or later Software version D or later zd CPU board equivalent CPU board communication to AZUSHCPU S1 GPPW Ladder logic test function LLT Ladder logic test communication 5 offline debugging GPPW SW5D5C GPPW E or later LLT SW5D5C LLT E Ver B or later Must be purchased separately MELSECNET 10 module n CC Link module i Software version N or later 1 OVERVIEW MELSEC 1 2 ACT Control and Function Lists The following sections give the lists of ACT controls and functions 1 2 1 ACT control list The following table lists the ACT controls included in each DLL offered by ACT DLL Name Included Control Name Used to make communication settings easily on the communication
117. r DeviceName Error MsgSir LoadString IDS_STRING102 AfxMessageBox MsgStr MB ICONINFORMATION return IValue m DeviceValue if m SelectCntl 0 ActAJ71QE71UDP Control IRet m ActAJ71QE71UDP SetDevice m Device lValue Exec SetDevice Method else ActEasylF Control IRet ActEasyIF SetDevice m Device lValue Exec SetDevice Method 5 SAMPLE PROGRAMS Renew ReturnValue m RetVal Format 0x9608x IRet catch COleDispatchException Exception OLE IDispatch Interface Error MsgStr LoadString IDS_STRING103 AfxMessageBox MsgStr ICONINFORMATION Exception gt Delete CWnd UpdateData FALSE Close Communication Route RESIS ER OH EO HER ERO HE OO f void CSampleEngDlg OnCloseCom long IRet CString MsgStr CWnd UpdateData TRUE Clear Return Value Display m RetVal m RetVal2 m_RetVal3 try if m SelectCntl 0 ActAJ71QE71UDP Control IRet m ActAJ71QE71UDP Close 5 Close Method else ActEasyIF Control IRet m_ActEasylF Close Exec Close Method Renew ReturnValue m RetVal Format 0x9608x IRet catch COleDispatchException Exception OLE IDispatch Interface Error MsgStr LoadString IDS_STRING103 AfxMessageBox MsgStr ICONINFORMATION Exception gt Delete MELSEC 5 SAMPLE PROGRAMS MELSEC CWnd UpdateData FALSE 1 Pr
118. r is returned if the clock data to be set are not correct values As to the value specified in iYear or sYear a four digit year is valid for the QCPU Q mode or a two digit year for any other CPU Note that the year valid for the QCPU Q mode is between 1980 and 2079 An error will occur if a four digit year is set to any CPU other than the QCPU Q mode value to be specified in iDayOfWeek or sDayOfWeek is as follows Day of Week o Sumay e Monday Tuesday 5 Returned value Normal termination 0 is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES POINT 1 Clock data cannot be read from the A0J2HCPU A2CCPU and A2CJCPU as they do not have clock data 2 For the QCPU A mode and ACPU clock data can be set only when the target station is in the STOP status 8 For the QCPU A mode and ACPU the clock setting special relay 9028 changes to OFF after clock data setting 4 For the FXCPU clock setting can be made to the FX1N FX1S FX2N or FX2NC when it has a built in clock or to the FX2 or FX2c when it is fitted with the RTC cassette An error is returned if the FXCPU is other than the FX1N FX1S FX2 FX2c FX2N and FX2NC 5 Note that an error of transfer time is produced in clock setting 4 FUNCTIONS MELSEC 4 2 13 GetCpuType PLC CPU type read 1 Applicable ACT controls This function is available for all
119. ram and restart the IBM PC AT compatible Review the time out value of the property Review the time out value on the communication settings Time out value setting error utility 0x0180800D Xm Setting of the COM port time out value failed for an application which uses the COM port Make COM port setting on the control panel of the OS Exit the program and restart the IBM PC AT compatible Shared memory open error Check whether the ladder logic test function LLT has started Open processing of shared memory failed Exit the program and restart the IBM PC AT compatible 0x01808101 Duplex close error Exit the program and restart the IBM PC AT compatible Handle close error Exit the program and restart the IBM PC AT compatible 0x01808102 closing of the COM port handle failed Driver close error Exit the program and restart the IBM PC AT compatible 901808109 closing of the driver handle failed Review the system e g PLC CPU module setting and cable status Send error Make COM port setting on the control panel of the OS Data send failed Make Ethernet board and protocol settings on the control panel Exit the program and restart the IBM PC AT compatible Send data size error 0x01808202 Exit the program and restart the compatible Data send failed Queue clear error Exit the program and restart the IBM PC AT compatible Clearing of the COM port queue fa
120. rectory 22224 3 Double click the item to be set and browse the include file Directory name uem ActDefine H is stored in User specified folder gt lt Act gt C AMELSEC SAchInclude Include at the time of installation Network 2 ABOUT THE ACT CONTROLS 2 Registering the ACT control 1 Right click the form to choose Insert ActiveX Control Et Align Left Edge F Align Top Edges 7 Check Mnemonics A ClassWizard DH Insert ActiveX Control 215 2 Select the ACT control you want to use Activex control osse v MITSUBISHI amp ctACPLI Control MITSUBISHI A amp ct amp FBD Control Cancel MITSUBISHI 71 24 Control MITSUBISHI Act amp J71E71TCP Control MITSUBISHI Act amp J71E71UDP Control MITSUBISHI Act amp J710C24 Control 4 MITSUBISHI Act amp J71QE71TCP Contre MITSUBISHI Act amp J71QE71UDP Contr MITSUBISHI 4ct amp J71UC24 Control MITSUBISHI ActAnUBD Control Path CAMELSECNACTNCONTROLSACTPCCOM DLL m 44 3 The selected ACT control is pasted to the form Cancel 2 ABOUT THE ACT CONTROLS MELSEC 3 Adding the member variable Emm E 1 Click the form to choose Class Wizard La Cancel 2 When the left dialog box appears choose the lt lt Member Message Maps Member Variables Automation ActiveX Events Class Info Project C
121. rogram and restart the IBM PC AT compatible Exit other programs and secure free memory area No license error 0 0000001 The license is not given to the IBM PC AT compatible Using the license FD give the license to the IBM PC AT compatible Set data read error Specify the correct logical station number 0 0000002 Reading of the set data of the logical station Set the logical station number on the communication number failed settings utility 6 ERROR CODES MELSEC Error Definition Corrective Action OxF0000003 Already open error The Open method was executed in the open status When changing the communication target CPU execute the Open method after performing Close Not yet open error After executing the Open method execute the 0 0000004 The Open method is not yet executed corresponding method OxF0000005 Initialisation of the object possessed internally in Initialisation error ACT failed Exit the program and restart the IBM PC AT compatible Reinstall ACT OxF0000006 Memory securing error Exit the program and restart the IBM PC AT compatible x Securing of ACT internal memory failed Exit other programs and secure free memory area Function non support error 0 0000007 The corresponding method does not support The method does not support OxF1000001 OxF1000002 OxF1000003 OxF1000004 OxF1000005 OxF1000006 OxF1000007 Character code conversion error Character cod
122. rol AND RTS DTR control and RTS control TRC DTR OR RTS 0x08 DTR control or RTS control ActHostAddress BSTR which indicates the connection host name IP address for Ethernet communication ActCpuTimeOut LONG Specify the CPU watchdog timer for Ethernet communication Unit x 250ms ActTimeOut LONG Set the time out value of communication between the IBM PC AT compatible and PLC Unit ms Specify whether sumcheck is made or not Valid only via computer link module P ActSumCheck roperty va Description Property window input value LONG NO SUM CHECK 0 Without sumcheck SUM CHECK 1 With sumcheck Specify the requesting network number when the QE71 or Q series compatible E71 is ActSourceNetworkNumber specified LONG Specify the same network number as for the connected QE71 or Q series compatible E71 network number specified in the network parameter Specify the requesting station number IBM PC AT compatible side station number when the ActSourceStationNumber QE71 or Q series compatible E71 is specified LONG Make setting to avoid setting the same station number as that of the QE71 set within the same Ethernet loop Specify the port number of the target when Ethernet communication is specified For access to another network specify the relay destination port number For other than the automatic response system make setting as indicated in the following table A
123. rties and functions 5 SAMPLE PROGRAM S MELSEC MEMO 6 ERROR CODES MELSEC 6 ERROR CODES This chapter describes the error codes returned by the ACT controls and the error codes returned by the CPUs modules and network boards 6 1 Error Codes Returned by the ACT Controls The following table gives the error codes returned by the ACT controls Error Definition Corrective Action RUN time disable error 0 01010002 Operation that was performed must be done Execute after setting to the STOP status 1 during RUN Sumcheck error 0x01010005 Check for system noise Packet sumcheck was abnormal PLC No error Check the station number set on the communication setup 0x01010010 Communication could not be made with the utility specified station number Check the station number set to ActStationNumber Check that the system configuration is not an unsupported Other data error configuration 0x01010013 Communication cannot be made for some Check that the CPU type setting is correct Exit the program and restart the IBM PC AT compatible 0 Contact our telephone center Remote request error 3 d Cancel the remote operation being performed in the other x01010018 Remote operation is being performed in the path path different from the communicating path Check that reset operation is not performed for the other 0x01010020 Link error end of communication the control station master station x Link commu
124. s compatible E71 specify the relay target station number fixed to 0x00 for access within the own network For access to another network via MELSECNET 10 specify the station number set in the parameter of the connected Ethernet module Specify the module I O number For multidrop link or intelligent special function module access specify the actual number ActlONumber LONG first number 16 of the target computer link module or intelligent special function module specify the number of the relayed or requesting station for multidrop link Specify OX3FF when making access to another station via the own station CPU or network 3 DETAILS OF THE ACT CONTROLS MELSEC Property Specify the target CPU to communicate with Description In the parameter specify any of the CPU types in the following table Property value Property window input value CPU QO2CPU 0x22 Target CPU QO2 H CPU CPU QO6CPU 0x23 06 CPU Q12CPU 0x24 Q12HCPU Q25HCPU Q02 H CPU A CPU QO6CPU 0x142 QOGHCPU A Q2ASCPU CPU 2 0x11 Q2ACPU 0x11 io ASHCPU CPU Q25CPU 0x25 CPU QO2CPU A 0x141 Q2ACPU S1 CPU_Q2AS1CPU 0x12 Q2ASCPU S1 ActCpuType Q2ASHCPU S1 LONG CPU Q3ACPU 0x13 CPU Q4ACPU 0x14 Q4ACPU Q4ARCPU CPU 2 0x102 A0J2HCPU CPU A1FXCPU 0x103 ATFXCPU A1SCPU S1 A1SCPUC24 R2 A1SJCPU CPU
125. s for the system so that you can take measures against any communication error caused by a cable connection fault or the like in online operations performed from the peripheral device to the PLC N CAUTION Read the manual carefully before performing the online operations especially forced output and operating status change which will be executed with the peripheral device connected to the running CPU module Not doing so can damage the machine or cause an accident due to misoperation REVISIONS The manual number is given on the bottom left of the back cover Date Manual Number Apr 2000 Apr 2000 SH NA 080078 A Firstediion NA 080078 A First edition Japanese Manual Version SH 080080 A This manual confers no industrial property rights or any rights of any other kind nor does it confer any patent licenses Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual 2000 MITSUBISHI ELECTRIC CORPORATION A 2 Operating Instructions 1 About Ethernet communication a When access is made to the QnACPU AnUCPU QCPU A mode or motion controller CPU via the E71 the device range is equivalent to that of the AnACPU b When making access to the PLC CPU through Ethernet communication the functions may not be executed depending on the PLC CPU status 1 When the protoc
126. sponding to target station QO2CPU 0 Target station side module ActNetworkNumber Fixed to 0x00 9 Fixed to 0x00 0x00 network number 1 Mu ActPortNumber PORT 1 IBM PC AT compatible side COM port number 255 Target station side module Target station side module ActStationNumber Fixed to OxFF 9 9 OxFF station number station number ActTimeOut 10000 Any value specified by user in ms units 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 10 ActQnACPU control The following table indicates the properties possessed by the ActQnACPU control and their default values 1 Configuration 2 Property patterns Connected zl mani cer Relayed Network QCPU E onnecte elaye station zi module el x x x x x IBM PC AT compatible Pelayed network MELSECNET 10 fe Relayed Relayed i 2 station module Ethernet Computerin x x CC Link O Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 3 Property list Property Patterns Property Default Value 2 19200 ActBaudRate BAUDRATE BAUDRATE 9600 BAUDRATE 19200 BAUDRATE 38400 19200 8 TCR DTR OR Depending on used cable _RTS 17 1023 Connected station Fixed to Fixed to OX3FF Fixed t
127. tCCGAQnA control nnns the aatinaa daoia aaiae 3 34 3 3519 ActCCG4A control te E te p ate ee te m ret E aa 3 35 3 9 20 ActMnetl OBD Control isc ihi iei ee oot E LEE DeL Ee Oe Ho re co 3 36 3 3 21 ActG CBD c ritrol err c e cie laeta 3 39 3 3 22 ACtANUBD control npe ERE RR ene nte Mee 3 43 3 9 29 ActbLl denied pied 3 44 4 FUNCTIONS 4 1 to 4 32 4 1 Programming Instructions toti ee otii tete ates 4 1 4 2 Details of the Functions Dispatch Interface 4 3 4 2 1 Open Communication line 4 3 4 2 2 Close Communication line closing 4 4 4 2 3 ReadDeviceBlock Device batch read 4 5 4 2 4 WriteDeviceBlock Device batch write sess 4 7 4 2 5 ReadDeviceRandom Device random read sse 4 9 4 2 6 WriteDeviceRandom Device random qwrite eese 4 11 4 2 7 SetDevice Device data 4 13 4 2 8 GetDevice Device data 4 14 4 2 9 ReadBuffer Buffer memory read 4 15 4 2 10 WriteBuffer Buffer memory write 4 17 4 2 11 GetClockData Clock data 4 19 4 2
128. tEasvIF Can communicate with any communication path Ud MEN Use the communication settings utility to set the information for communication tility setting type Used for Ethernet communication where the connected module is the Q hacuriez rcp 258 97 Etema E71 TCP IP communication Used for Ethernet communication where the connected module is the Q hocurierwupe Leder enema E71 UDP IP communication Used for Ethernet communication where the connected module is the QE71 Used for Ethernet communication where the connected module is the QE71 Used for Ethernet communication where the connected module is the E71 Used for Ethernet communication where the connected module is the E71 ActAJ71E71UDP UDP IP communication Program setting type AcIQCPUQ Used for CPU COM communication where the connected PLC CPU is the QCPU Q mode Program setting type Used for CPU COM communication where the connected PLC CPU is the ActQCPUA QCPU A mode Program setting type Used for CPU COM communication where the connected PLC CPU is the ActQnACPU QnACPU Program setting type Used for CPU COM communication where the connected PLC CPU is the ACACRY ACPU including motion controller CPU Program setting type Used for CPU COM communication where the connected PLC CPU is the ActFXCPU Program setting type FXCPU ActQJT1C24 Used for computer link communication where the connected module is the Q series compatible C24 rogram setti
129. tMultiDropChannelNumber Fixed to 0x00 Fixed to 0x00 Fixed to 0x02 Fixed to 0x00 Connected station Connected station side Q series side Q series compatible E71 compatible E71 network number network number ActSourceNetworkNumber IBM PC AT compatible side network number ActSourceStationNumber 4 IBM PC AT compatible side station number 1 For access to another station via 0 for the property pattern of 2 specify the station number of the connected station side Q series compatible E71 set in the Ethernet parameter of the connected station side Q series compatible E71 2 For the property pattern of 1 2 specify the value set in the target station side parameter for ActNetworkNumber and ActStationNumber 3 Specify the same network number as the MELSECNET 10 network number set to the series compatible E71 in the Ethernet parameter setting of the target station side Q series compatible E71 4 Specify the station number on the IBM PC AT compatible side to avoid setting the same station number as set to the Q series compatible E71 within the same Ethernet loop Network number of Network number of target station side target station side module module 3 DETAILS OF THE ACT CONTROLS MELSEC Property Patterns 7 4 Connected station Connected station side Q series side Q series compatible E71 compatible E71 station number station number Connected sta
130. tation CPU ERR Relayed Network QCPU M EXCPU Connected MELSECNET 10H IBM PC AT Relayed network compatible Relayed Relayed station CPU module Accessible ETT within Aus x Inaccessible 1 Including motion controller CPU 2 Operates as the one equivalent to AnACPU C Property list Property Patterns savar 19200 ActBaudRate BAUDRATE Match to the setting of C24 _ 19200 8 ActControl TCR_DTR_OR Depending on used cable _RTS ActCpuType CPU ees CPU type corresponding to target station ActDataBits DAT Match to the setting of C24 1 ActParity ODD PARITY Match to the setting of C24 1 ME ActPortNumber PORT 1 IBM PC AT compatible side COM port number 255 ActStationNumber 1 OxFF Fixed to Target station side module station number 0 ActStopBits STOPBIT Match to the setting of C24 ONE ActSumCheck SUM 1 9 Match to the setting of C24 ActTimeOut 10000 Any value specified by user in ms units 0 Connected station side module station ActUnitNumebr Target station side module station number 0x00 number 1 Note the following points depending on whether the connected station side MELSECNET 10 module is the control station or ordinary station When the connected station side MELSECNET 10 module is the control station Specify the actual station number of the target station side MELSECNET 10 module in Act
131. tation CPU Connected E71 Relayed QCPU pie ACPU Relayed Network QCPU QnA ACPU B station CPU module A mode CPU CPU x1 Relayed vM IMELSECNET 10H p Re 0 2 x2 x Relayed Relayed station CPU module Ethernet x x x x x Computerin x x x x x FTN Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Operates as the one equivalent to AnACPU IBM PC AT compatible 3 Property list Property Patterns ActCpuTimeOut 40 Any value specified by user in 250ms units 262 ActCpuType CPU AINCPU CPU type corresponding to target station 1280 ActDestinationPortNumber 0x500 Port number of connected station side module Host name or IP address of connected station side module 255 ActStationNumber 1 OxFF Fixed to OxFF Target station side module station number ActTimeOut 10000 Any value specified by user in ms units 1 Note the following points depending on whether the connected station side MELSECNET 10 module is the control station or ordinary station When the connected station side MELSECNET 10 module is the control station Specify the actual station number of the target station side MELSECNET 10 module in ActStationNumber When the
132. tation number ActHostAddress 1 1 1 1 Host name or IP address of connected station side module 0 mor ActUnitNumber Fixed to 0x00 Fixed to 0x00 station side module 0x00 station number 1 For access to another station via MELSECNET 10 for the property pattern specify the station number of the connected station side QE71 set in the Ethernet parameter of the connected station side QE71 2 For the property pattern of 2 specify the value set in the target station side parameter for ActNetworkNumber and ActStationNumber 3 Specify fixed 5001 when the Ethernet parameter setting of the connected station side QE71 is other than the automatic response system Specify fixed when the Ethernet parameter setting of the connected station side QE71 is the automatic response system 4 Specify the same network number as the MELSECNET 10 network number set to the QE71 in the Ethernet parameter setting of the target station side QE71 5 Specify the station number on the IBM PC AT compatible side to avoid setting the same station number as set to the QE71 within the same Ethernet loop 6 Do not use 1 to 1024 of ActPortNumber 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 6 ActAJ71E71TCP control The following table indicates the properties possessed by the ActAJ71E71TCP control and their default values 1 Configuration 2 Property patterns Connected Station CPU Station CPU Relayed S
133. ted BSTR area SysFreeString szCpuName CWnd UpdateData FALSE CERE ka gk ESAS dokgee ELE Get Device Value RESIS III IRI III EO HER EO HE ORE A void CSampleEngDlg OnGetDevice long IRet long IValue CString MsgStr CWnd UpdateData TRUE Clear ReturnValue Display m RetVal m RetVal2 m RetVal3 if m Device Not Enter DeviceName Error MsgSir LoadString IDS_STRING102 AfxMessageBox MsgStr MB ICONINFORMATION return try if m SelectCntl 0 ActAJ71QE71UDP Control IRet m ActAJ71QE71UDP GetDevice m Device amp lValue Exec GetDevice Method else Control IRet m ActEasyIF GetDevice m Device amp lValue Exec GetDevice Method if IRet 0x00 Success m_RetVal2 Format 0x 04x d IValue Value Device Value 5 SAMPLE PROGRAMS MELSEC Renew ReturnValue m RetVal Format 0x9608x IRet catch COleDispatchException OLE IDispatch Interface Error MsgStr LoadString IDS_STRING103 AfxMessageBox MsgStr ICONINFORMATION Exception gt Delete CWnd UpdateData FALSE RESIS III III IIR Set Device Value REISS III IOI III III IIR void CSampleEngDlg OnSetDevice long long IRet CString MsgStr CWnd UpdateData TRUE Clear ReturnValue Display m_RetVal m_RetVal2 m_RetVal3 if m Device Not Ente
134. tion Connected station ActStationNumber 2 side module station side module station number number QCPU Q mode 0x00 MELSECNET 10H only other than QCPU Q mode 0x01 including MELSECNET 10 Note that the setting must be the same as set in the network parameter of the GPP function Target station side Target station side module station module station number number valid 2 For the property pattern of 1 or 2 specify the value set in the target station side parameter for ActNetworkNumber and ActStationNumber 3 DETAILS OF THE ACT CONTROLS MELSEC 3 3 3 ActQJ71E71UDP control The following table indicates the properties possessed by the ActQJ71E71UDP control and their default values 1 Configuration 2 Property patterns Connected series Relayed QCPU Relayed Network ana ACPU compatible E71 E Q mode Relayed network 2 x x x x muse E Pe Relayed Relayed station CPU module aae ll se Aboot Ieee see Computerin x x x ccu x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU Connected station CPU 3 Property list Property Patterns Pas emer Oe 0 Connected station ActConnectUnitNumber 1 Fixed to 0x00 Side module station Fixed to 0x00 Fixed to 0x00 0x00 number ActCp
135. tion UC24 CPU module MELSECNET 10H Relayed network MELSECNET 10 MELSECNET II Relayed Relayed station CPU module Computer link CC Link Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Operates as the one eqSuivalent to AnACPU compatible c Property list Property Patterns ashe 19200 ActBaudRate BAUDRATE Match to the setting of UC24 _ 19200 8 ActControl TCR_DTR_OR Depending on used cable _RTS 262 ActCpuType CPU_A1NCPU CPU type corresponding to target station 8 8 Match to the setting of UC24 0 Target station side module ActNetworkNumber Fixed to 0x00 9 Fixed to 0x00 0x00 network number 1 i ActParity ODD PARITY Match to the setting of UC24 1 ActPortNumber PORT 1 IBM PC AT compatible side COM port number 255 Target station side module Target station side module ActStationNumber Fixed to 9 9 OxFF station number station number 0 STOPBIT Match to the setting of UC24 ONE SUM CHECK Match to the setting of UC24 1 i 10000 Any value specified by user in ms units 0 Target station side module Connected station side Connected station side ActUnitNumber 3 0 00 station number module station number module station number 3 29 3 DETAILS OF THE ACT CONTROLS MELSE
136. tion made with the PLC CPU using the CPU board Ladder logic test communication Abbreviation of communication made with the ladder logic test function LLT Utility setting type Abbreviation of user program creation using the communication settings utility Program setting type Abbreviation of user program creation without using the communication settings utility ACT controls Generic term of the ActiveX controls offered by ACT Microsoft Windows Microsoft Windows NT Microsoft Visual Basic and Microsoft Visual C are either trademarks or registered trademarks of Microsoft Corporation in the United States and or other countries Ethernet is the registered trademark of Xerox Corporation Other company and product names herein may be either trademarks or registered trademarks of their respective owners 1 OVERVIEW MELSEC 1 OVERVIEW This chapter provides the function outline of the ACT controls offered by Type SWOD5C ACT E Active X communication support tool 1 1 Outline of ACT Controls These controls are used to create user programs for communication with a PLC CPU This enables the user to make communication without being aware of the hardware and communication protocol on the other end IBM PC AT compatible You make communication with the specified PLC easily without being aware of the communication protocol Type SWOD5C ACT E Active X communication support tool RS 232C FTT Com
137. to free the allocated area SysFreeString szCpuName CWnd UpdateData FALSE JE EE ESSER a f Get Device Value Jet S SOR EROR E ROI ROO olo gigi EERE otii esee ES void CCustomSampleEngDlg OnGetDevice long IRet long IValue 5 SAMPLE PROGRAMS MELSEC CString MsgStr BSTR szDev NULL HRESULT hr CWnd UpdateData TRUE Clear ReturnValue Display m RetVal m RetVal2 m RetVal3 if m Device Not Enter DeviceName Error MsgSir LoadString IDS_STRING102 AfxMessageBox MsgStr MB ICONINFORMATION return szDev m Device AllocSysString Allocate the BSTR Type String area After use you have to free it if m SelectCntl 0 ActAJ71QE71UDP Control Custom Interface hr mp IAJ71QE71UDP GetDevice m Device AllocSysString amp IValue amp IRet Exec GetDevice Method else Control Custom Interface hr mp IEasyIF GetDevice m Device AllocSysString amp lValue amp IRet Exec GetDevice Method ifSUCCEEDED hr Compornent Communication is succeeded if IRet 0 00 Success m RetVal2 Format 0x9604x 96q IValue IValue Device Value Renew ReturnValue m RetVal Format 0x9608x IRet else MsgSir LoadString IDS_STRING103 AfxMessageBox MsgStr ICONINFORMATION Free the allocated area SysFreeString szDev CWnd UpdateData FALSE
138. to the ANNCPU AnACPU or QnACPU via the MELSECNET 10 b On the UC24 and C24 computer link modules remote PAUSE operation will result in an error for all connections c For the QC24 note that specifying the first number of a nonexisting module and reading writing G gt will not return an error for the module whose software version is k or earlier d In any connection form where the target station of the UC24 or C24 is the QnA an error is returned if SetClockData or GetClockData is executed 5 Instructions for relaying the MELSECNET II When access is made to the QnACPU AnUCPU QCPU A mode or motion controller CPU via the MELSECNETV II the device range is equivalent to that of the AnACPU 6 Restrictions on use of the FXCPU a When the FXCPU is used access to the TN devices timer present values or CN devices counter present values is not permitted if the device numbers specified are split across 199 or earlier and 200 or later b As the FXCPU does not have a PAUSE switch as the PLC CPU an error is returned if remote pause is specified in SetCpuStatus c Note that specifying the first number of a nonexisting module and executing the WriteBuffer method will not return an error d For the index registers Z V of the FXCPU data cannot be written to 2 or more consecutive points using WriteDeviceBlock Data may be written to only one point 7 CheckDeviceString Do not use the
139. tructions cf aid e dfe d bins reae NARA Sete ease HE che A 3 GONTENTS 5 ertet nia Hv a P ei n Re e A 6 ABOUT 9 How toise ThiS 10 Abbreviations and Terms This 244 0 2 0 0000 0000 101 0 A 11 1 1 Quiline of ACT Controls etit tea ea In aan le a LES ETRAS IR AEN TRE ANE 1 1 1 2 ACT Control and F rictiornLists iini ra hr a hg ah Ag e ek again rae 1 2 T2 AAG T COMUOM Sees aves than ote Geet ave abbas e v aves than cle ea 1 2 1 2 2 Eunctiom us oor n nr Oe RERO dna 1 3 2 1 Settings Made for Use of the ACT 8 2 1 2 4 T Whemusing na toten tento ete tetendit 2 1 231 2 WHEMUSING N Otis edis 2 8 2 2 Programming Procedures ree tet ee e ee EM ee e eb E e Free eec E e ns 2 7 2 2 L When USING VB uie punc ocd bien IBS ISIN S 2 7 2 2 2 When USING de CR Hee Ee ci d e edet cdd 2 8 2 3 Device Types nu ona art 2 9 2 4 Accessible Devices and nennen 2 11 3 1 Details of the ACT 5 2 00 enne 3 1 3 2 Details of th
140. uType CPU um CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 Fixed to 0x00 Ox3FF Ox3FF ActDidPropertyBit 0x01 invalid 0x01 invalid 0x00 valid 0x00 valid ActDsidPropertyBit 0x01 invalid 0x01 invalid 0x00 valid 0x00 valid lActHostAddress 1 1 Host name or IP address of connected station side module Connected station Connected station 1023 ActlONumber FF Fixed to OX3FF Fixed to side relayed module side relayed module 0x3 address address howatropchametumbe Fixed to 0x00 Fixed to 0x00 Fixed to 0x02 Fixed to 0x00 Connected station Connected station side Q series side Q series compatible E71 compatible E71 network number network number ActPortNumber 4 5001 IBM PC AT compatible side port number 1 ActSourceNetworkNumber 3 0x01 IBM PC AT compatible side network number 1 For access to another station via MELSECNET 10 for the property pattern of specify the station number of the connected station side series compatible E71 set in the Ethernet parameter of the connected station side Q series compatible E71 2 For the property pattern of or 2 specify the value set in the target station side parameter for ActNetworkNumber and ActStationNumber 8 Specify the same network number as the MELSECNET 10 network number set to the series compatible E71 in the Ethernet parameter setting of the target station side Q series compatible E71
141. uffer of own station Automatic refresh buffer Hexadecimal cc ink module Hexadecimal 2 ABOUT THE ACT CONTROLS MELSEC 3 About device extension representation The following table indicates whether the device extension representations are usable or not for the available CPUs They cannot be used with ReadDeviceBlock and WriteDeviceBlock When the ActAJ71E71TCP control or ActAJ71QE71TCP control is used device expansion representation is unusable Target CPU Device Extension QCPU Motion Representation QnACPU ACPU FXCPU CPU Digit specification example KAMO 2 MEE example 00 1 3 ame el ee example M100Z0 Usable Unusable Unusable when QE71 is relayed 2 FX FX DX DY and T C ST contact coil cannot be specified 8 Z V T C ST present value cannot be specified 4 FX FX DX DY T C ST contact coil 2 and S cannot be specified 2 4 Accessible Devices and Ranges Refer to the ACT operating manual for the accessible devices and ranges for corresponding communication 2 ABOUT THE ACT CONTROLS MELSEC MEMO 3 DETAILS OF THE ACT CONTROLS MELSEC 3 DETAILS OF THE ACT CONTROLS This chapter describes the details of the ACT controls the details of the properties and the possessed property list 3 1 Details of the ACT Controls The following table lists the definitions and usable setting types of the ACT controls Control Name Usable Setting Type Ac
142. ule ES Computerin x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Use the QnA or ACPU side CC Link module whose ROM version is S or later 3 Property list Propert Default Value perty x 2 BAUDRATE 9600 BAUDRATE_19200 BAUDRATE 38400 BAUDRATE_57600 BAUDRATE 115200 19200 ActBaudRate BAUDRATE 19200 8 ActControl TCR DTR OR Depending on used cable _RTS ActCpuType CPU coon CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 Fixed to 0x00 Fixed to Ox3FF Fixed to OX3FF ActDidPropertyBit 0x01 invalid 0x01 invalid 0x00 valid 0x00 valid ActDisdPropertyBit 0x01 invalid 0x01 invalid 0x00 valid 0x00 valid 0x01 target station is 0 01 target station is QCPU Q mode QCPU Q mode ActintelligentPreferenceBit Fixed to 0x00 Fixed to 0x00 0x00 target station is 0 00 target station is other than QCPU than QCPU mode mode 1023 Connected station Connected station ActlONumber 1 Fixed to Ox3FF Fixed to Ox3FF module side module I O 0x3FF address address ActMultiDropChannelNumber Fixed to 0x00 Fixed to 0x00 Fixed to 0x02 Fixed to 0x02 1 As the I O address specify the Wm m by dividing the actual first O number by 16 2 Note the following points when making access via the Ethernet modu
143. ule or network board 6 ERROR CODES MELSEC 6 3 HRESULT Type Error Codes Normally the ActiveX control returns the HRESULT type returned value So does the ACT control When the custom interface is used the returned value is equivalent to the returned value of method When the dispatch interface is used the HRESULT type returned value can be acquired by performing exception processing The following table indicates the HRESULT type returned values of the ACT controls sc Normal termination Function processing terminated normally Function processing as ActiveX control terminated normally but operation access to S FALSE Normal termination PLC failed E POINTER Abnormal termination The pointer passed to the function is abnormal E OUTOFMEMORY Abnormal termination Memory securing or object creation failed If exception processing for acquiring the HRESULT type returned value has not been performed the dispatch interface shows the error dialog box on the OS level when E POINTER E XXXXX defined returned value or the like is returned from the ACT control 6 ERROR CODES MELSEC MEMO Type SWODSC ACT E ActiveX Communication Support Tool Programming Manual SWODSC ACT E P E MODEL 13JF62 SH NA 080078 A 0004 MEE s MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE MITSUBISHI DENKI BLDG MARUNOUCHI TOKYO 100 8310 TELEX J24532 CABLE MELCO TOKYO NAGOYA WORKS 1 14
144. utput 4 19 4 FUNCTIONS MELSEC 4 Explanation An error is returned if correct clock data is not set to the PLC CPU As the value stored into iYear or 5 a four digit year is returned for the QCPU Q mode or a two digit year for any other CPU Note that the year for the QCPU Q mode is between 1980 and 2079 value stored into iDayOfWeek or IpsDayOfWeek is as follows Day of Week Sunday Monday Tuesday Wednesday Thursday Friday Saturday 5 Returned value Normal termination 0 returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES 1 Clock data cannot be read from the A0J2HCPU A2CCPU and A2CJCPU as they do not have clock data 2 For the QCPU A mode and ACPU clock data can be set only when the target station is in the STOP status 8 For the FXCPU clock data be read from the FX1N 15 FX2N or FX2NC when it has a built in clock or from the FX2 or 2 when it is fitted with the RTC cassette An error is returned if the FXCPU is other than the FX1N FX1S FX2 FX2C FX2N and FX2NC 4 Note that an error of transfer time is produced in clock setting 4 FUNCTIONS 4 2 12 SetClockData Clock data write 1 2 3 Applicable ACT controls MELSEC The applicable ACT controls are indicated below Control Name Usabilit AcIQU71C24 END END ActAJ71QC24 ActAJ71C24
145. ver Packed with the product Type A80BDE J61BT11 CC Link System Master Local Interface Board User s Manual For SWSDNF CCLINK 0800110 Describes the features specifications part names and setting of the CC Link master board and the 139814 installation uninstallation and others of the driver Packed with the product Type A80BDE J61BT13 CC Link Interface Board User s Manual SW3DNF CCLINk 1B 0800036 Describes the features specifications part names and setting of the CC Link local board and the 134194 installation uninstallation and others of the driver Packed with the product A80BDE A2USH S1 PLC CPU Board User s Manual For SWODNF ANU B 1B 0800087 Describes the features specifications part names and setting of the CPU board and the installation 134808 uninstallation and others of the driver Packed with the product Note SWOD5C ACT E ActiveX Communication Support Tool Operating Manual is contained in the CD ROM together with the software package as a set When you want to purchase the manual alone it is optionally available as the printed matter of the manual number Model code in the above table How to Use This Manual How to Use This Manual is given purpose by purpose for use of ACT Refer to the following outlines and use this manual 1 To know the feature and ACT control lists Chapter 1 Chapter 1 gives the ACT control outline and ACT control
146. x COM ERROR 4 FUNCTIONS MELSEC 4 2 Details of the Functions Dispatch Interface This section explains the details of the functions The details of the functions in this section assume that the dispatch interface is used For the custom interface refer to Section 4 3 Details of the Functions Custom Interface 4 2 1 Open Communication line opening 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Opens the communication line 3 Format VB VC IRet object Close Long IRet Returned value Output 4 Explanation The line is connected on the basis of the value set to the property for Open method 5 Returned value Normal termination 0 is returned Abnormal termination A value other than 0 is returned Refer to Chapter 6 ERROR CODES POINT 1 If the property for Open method is changed after completion of Open the other end of communication is not changed To change the communication settings close the communication line once then set the other end of communication and open the communication line again 2 Open may terminate normally if the CPU type entered into the ActCpuType property is different from the CPU used for communication In such a case the connection range usable methods and device range may be reduced for example When performing Open set the correct CPU type to the ActCpuT 4 FUNCTIONS MELSEC 4 2
147. x ErrMsg ErrType End End Sub Private Sub GetCpuButton Click Dim IRet As Long Dim szCpuName As String Dim IplCpuCode As Long On Error GoTo Error Error Handler 5 SAMPLE PROGRAMS Clear Return Value Display ResultTxt 0 Text ResultTxt 1 Text ResultTxt 2 Text If 1 0 True Then ActACPU Control ActACPU1 GetCpuType szCpuName IplCpuCode Else ActEasyIF control IRet ActEasyIF1 GetCpuType szCpuName IplCpuCode End If Renew ReturnValue ResultTxt 0 Text Hex IRet If IRet 0 Then ResultTxt 1 Text Ox Hex IplCpuCode ResultTxt 2 Text szCpuName End If Exit Sub Error ErrMsg Error Err MsgBox ErrMsg ErrType End End Sub Private Sub GetDeviceButton_Click Dim IRet As Long Dim szDevice As String Dim IplData As Long On Error GoTo Error Error Handler Clear Return Value Display ResultTxt 0 Text ResultTxt 1 Text ResultTxt 2 Text If 0 Then MsgBox Not Enter DeviceType Error Exit Sub Else szDevice Text1 0 Text End If Exec Method Exec Method MELSEC 5 SAMPLE PROGRAMS If Option 0 Value True Then ActACPU Control IRet ActACPU1 GetDevice szDevice IplData Method Else ActEasyIF Control IRet ActEasyIF1 GetDevice szDevice Exec Method End If Renew ReturnValue ResultTxt 0 Text Hex IRet If
148. ysMenu gt AppendMenu MF_STRING IDM ABOUTBOX strAboutMenu Setthe icon for this dialog The framework does this automatically when the application s main window is not a dialog Setlcon m hlcon TRUE Set big icon 5 12 5 SAMPLE PROGRAMS MELSEC Setlcon m hlcon FALSE Set small icon TODO Add extra initialization here return TRUE return TRUE unless you set the focus to a control void CSampleEngDlg OnSysCommand UINT LPARAM IParam if nID amp OXFFFO IDM ABOUTBOX CAboutDlg digAbout digAbout DoModal CDialog OnSysCommand nID IParam If you add a minimize button to your dialog you will need the code below to draw the icon For MFC applications using the document view model this is automatically done for you by the framework void CSampleEngDlg OnPaint if IsIconic CPaintDC dc this device context for painting SendMessage WM ICONERASEBKGND WPARAM dc GetSafeHdc 0 Center icon in client rectangle int cxIcon GetSystemMetrics SM CXICON int cylcon GetSystemMetrics SM CYICON CRect rect GetClientRect amp rect int x rect Width 1 2 int y rect Height cylcon 1 2 Draw the icon dc Drawlcon x y m hlcon else CDialog OnPaint 5 SAMPLE PROGRAMS MELSEC The system calls this to obtain the cursor to display while the user drags the minimized window HCURS
Download Pdf Manuals
Related Search
Related Contents
ACP88 Owner`s Manual English Polycom CX 300 User Guide Riello Net Dialog 1000VA FLOCULANT LIQUIDE MITSUBISHI RU+7 User manual モニタリング基本計画書 IMAGEJ FINDFOCI Plugins BN-HH-G02 User Manual KDL-40Z5100 - Manuals, Specs & Warranty Copyright © All rights reserved.
Failed to retrieve file