Home

MX Component Version 2 Programming Manual

image

Contents

1. 3 Property list Property Patterns dk ge gje EE gt ee Jes Fe ee 0 Connected station ActConnectUnitNumber 1 Fixed to 0x00 side module station Fixed to 0x00 Fixed to 0x00 0x00 number ActCpuT CPUt ding to t t stati ctCpuType CPU_Q02CPU ype corresponding to target station Target station side Target station side For single CPU For single CPU Ox3FF fixed Ox3FF fixed 0 For multiple CPUs For multiple CPUs ActDestinationlONumber 0x00 Fixed to 0x00 Fixed to 0x00 Connected CPU 0x3FF Connected CPU 0x3FF No 1 0x3E0 No 1 0x3E0 No 2 0x3E1 No 2 0x3E1 No 3 Ox3E2 po No 4 0x3E3 A ActDidPropertyBit Fixed to 0x01 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 ActDsidPropertyBit Bel Fixed to 0x01 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 ActHostAddress 1 1 1 1 Host name or IP address of connected station side module Target station side For single CPU Ox3FF fixed For multiple CPUs 7 For multiple CPUs Connected station Connected station Connected CPU 0x3FF ActlONumber 6 Connected CPU 0x3FF Side relayed module jede relayed module No 1 0x3E0 No 1 0x3E0 O address I O address No 2 0x3E1 No 2 0x3E1 For single CPU Ox3FF fixed 1 For access to another station via MELSECNET 10 for the property pattern of 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 compa
2. Relayed Relayed station CPU module IBM PC AT compatible b Property patterns Connected Own Bond Station CPU Relayed Station CPU wn Boar QCPU Relayed Network EEN aou Sg Q mode Q mode A mode CPU ne x x Px tx to mesecne x merseoner x x x x Peng x x x x Computerin x x x com f l x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list Property Patterns EE EE E EE EE SE HE SE 1025 ActCpuType CPU BOARD CPU type corresponding to target station Target station side Target station side For single CPU For single CPU Ox3FF fixed Ox3FF fixed For multiple CPUs For multiple CPUs ActDestinationlONumber Na Fixed to 0x00 Fixed to 0x00 Connected CPU 0x3FF Connected CPU 0x3FF No 1 0x3E0 No 1 Ox3E0 No 2 Ox3E1 No 2 0x3E1 No 3 0x3E2 EH No 4 0x3E3 ActDidPropertyBit Fixed to 0x00 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 ActDsidPropertyBit oe Fixed to 0x00 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 To next page 3 DETAILS OF THE ACT CONTROLS MELSOFT Property Patterns Ga GER a o For single CPU 0x3FF fixed For multiple CPUs e TE Connected station Connected station SC Fixed to 0x00 SH Eet side relayed module side relayed module No 1 0x3E0 I O address I O a
3. 3 3 13 ActQJ71C24 ActMLQJ71C24 control The following table indicates the properties possessed by the ActQJ71C24 ActMLQJ71C24 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 ms Station CPU elayed Station Kee Relayed QCPU ENO QCPU QCPU EE FXCPU SPY Gaul S module Q mode Q model A mode CPU Ai ren Relayed network IBM PC AT compatible Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU Relayed Relayed station CPU module c Property list Property Patterns e vet o oer o 19200 ActBaudRate BAUDRATE _ 19200 ActControl TCR_DTR_OR Depending on used cable _RTS 34 y i ActCpuType CPU_Q02CPU CPU type corresponding to target station Target station side Target station side For single CPU For single CPU 0x3FF fixed 0x3FF fixed 0 For multiple CPUs For multiple CPUs ActDestinationlONumber 0x00 Fixed to 0x00 Fixed to 0x00 Connected CPU 0x3FF Connected CPU 0x3FF No 1 0x3E0 No 1 0x3E0 No 2 0x3E1 No 2 0x3E1 No 3 0x3E2 3 No 4 0x3E3 1 ActDidPropertyBit 0x01 Fixed to 0x01 Fixed to 0x01 Fixed to 0x00 Fixed to 0 2 Note the following points when making access via the Ethernet module Q series compatible E71
4. ActMnet10BD ActMnetHBD ActCCBD ActAnUBD ActLLt ActQCPUQBus U Utility setting type P Program setting type 3 DETAILS OF THE ACT CONTROLS MELSOFT 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 Visual Basic or Visual C change a character string such as a hexadecimal number or CPU type into a decimal property value Property Name Type Sen 3 PN 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 connection via Q series compatible C24 QJ61BT11 ee ActintelligentPreferenceBii 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 QJ61BT11 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 Q series compatible intelligent special
5. b When AJ71E71 or AJ7 1QE71 is used If the two lower byte error code that occurred during E71 or QE71 communication is not given in the E71 or QE71 manual check whether the DIP switch SW2 at the front of the E71 or QE71 module matches the value set to the ActPacketType property If the DIP switch setting is incorrect the packet format ASCII binary is different disabling correct recognition of the error code returned from the module c At access to another station At access to another station the error code of the relayed module used MELSECNET H MELSECNET 10 MELSECNET II CC Link computer link Ethernet module may enter the two lower bytes In such a case the two upper bytes that indicate Error detection module may not always match the faulty module Therefore after checking the system configuration also check the manuals of the used CPU relayed network module and network board 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 API 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 Normal termination Function processing terminated normally W Function processing as ActiveX control termin
6. D Visual C Start Visual C Refer to Section 2 1 2 Create a form and paste the ACT control yY for corresponding communication Register the ACT control to Visual C Caz enr oa ee ox Refer to Using Class Wizard define the pasted Create a form and paste the ACT Section 2 1 2 ACT control as a dialog member J control to the form ActEasyIF control Set the properties of the pasted ACT Refer to the Using Class Wizard define the pasted control operating manual ACT control as a dialog member Set the property of the pasted control Refer to the Set only the logical station number operating manual h Perf i ing the functi ffered by the erform programming using the functions offered bythe f Refer to Chapters 3 4 corresponding ACT control Perform debugging using Yes the PLC monitor utility Refer to the operating manual Completion of user application gt 2 ABOUT THE ACT CONTROLS MELSOFT 2 2 3 When using VBA When using VBA create a user application in the following procedure Power on the IBM PC AT compatible and start Windows Install MX Component Refer to the operating manual startup Make settings using the utility setting type lt Utility setting type gt lt Program setting type gt Start Microsoft Excel 2000 or Microso
7. 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 ActCpuType property 4 FUNCTIONS 4 2 2 Close Communication line closing 1 Applicable ACT controls This function is available for all ACT controls Feature Closes the communication line Format Visual Basic Visual C VBA IRet object Close Long IRet Returned value VBScript varRet object Close VARIANT varRet Returned value LONG type Explanation The line connected using the Open function is closed Returned value Normal termination 0 is returned Abnormal termination value other than 0 is returned Refer to Chapter 6 ERROR CODES MELSOFT Output Output 4 FUNCTIONS 4 2 3 ReadDeviceBlock Device batch read 1 Applicable ACT controls 2 Feature Batch reads data from devices Format Visual Basic VBA IRet object ReadDeviceBlock szDevice ISize IDat
8. 1 Including motion controller CPU c Property list Property Patterns Propert Default Value pe 1025 i ActCpuType CPU BOARD CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 0x00 ActDidPropertyBit 0x00 Fixed to 0x00 Fixed to 0x01 Fixed to 0x00 ActDsidPropertyBit 0x00 Fixed to 0x00 Fixed to 0x01 Fixed to 0x00 Target station side For single CPU Ox3FF fixed For multiple CPUs 0x00 Fixed to 0x00 Connected CPU 0x3FF Fixed to Ox3FF No 1 0x3E0 No 2 0x3E1 No 3 0x3E2 No 4 0x3E3 ActNetworkNumber 0x00 Fixed to 0x00 Target station side module network number ActPortNumber Board No of IBM PC AT compatible side MELSECNET 10 board SE PORT 1 PORT 1 to PORT 4 first to fourth boards ActStationNumber ieee Fixed to OxFF Target station side module station number 0 ActUnitNumber 0x00 Fixed to 0x00 1 As the I O address specify the value found by dividing the actual first O number by 16 0 0 0 0 0 0 1 ActMultiDropChannelNumber 0x00 Fixed to 0x00 3 39 3 39 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 When connected station CPU is QnACPU a Configuration Connected MELSECNET 10 Relayed station CPU module module Relayed network Relayed Relayed station CPU module L E IBM PC AT compatible b Property patterns Connected Bee Station CPU
9. 4 Explanation e Check whether ISize varSize of the device group specified in szDeviceList varDeviceList is in the status specified in IData IpIData or varData Specify the check time in IMonitorCycle varMonitorCycle When the status is established the OnDeviceStatus function of the user application is executed e 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 Visual Basic VBA VBScript DO amp voLf amp D1 amp vbLf amp D2 Visual C DO nD1 nD2 e The maximum number of device points that may be specified in ISize varSize is 20 points 4 FUNCTIONS MELSOFT e In IMonitorCycle varMonitorCycle specify a value within the range 1 second to 1 hour set between 1 to 3600 in seconds Specifying any other value outside the above range will result in an error e Store the registered device value list in IData IpIData or varData Device specifying methods Specify the devices in the following methods Example 1 When devices are specified as follows 3 points When using Visual Basic VBA VBScript MO amp vbLf amp DO amp vbLf amp K8M0 When using Visual C MO nDO nK8MO 2 Upper Bytes 2 Lower Bytes RS EE M16 to M31 2 MO to M15 2 Example 2 When devices including CN200 and later of FXCPU are specified 3 points in all 3 When using Visual Basic
10. ActStationNumber Fixed to 0xOFF Fixed to OxOFF Fixed to OXOFF e Any value specified by user in ms units Target station side module ActUnitNumber Fixed to 0x00 Fixed to 0x00 pe station number 1 As the I O address specify the value found by dividing the actual first O number by 16 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 15 ActAJ71UC24 ActMLAJ71UC24 control The following table indicates the properties possessed by the ActAJ71UC24 ActMLAJ71UC24 control and their default values 1 When there is relayed module in addition to connected station side UC24 a Configuration b Property patterns Connected Station CPU Station CPU Relayed Station CPU 555 erme Salen or GEI Relayed Network QCPU QCPU Ar rer onnecte station UC24 ME A mode CPU 1 Q mode A mode CPU zi m SE lge MELSECNET H Fea ETER BECA Relayed network MELSECNET 10 x xei x compatible D D 2 OD MELSECNET II gt 1 8 d r ol station CPU module Computer link ETE Jer bone x x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Operates as the one eqSuivalent to AnACPU c Property list Property Patterns ane ee 19200 ActBaudRate BAUDRATE Match to the setting of UC24 19200 8 ActControl TOR DTR OR Depending on used cable RTS ActCpuType aun AIN ae CPU type corresponding t
11. m Output RetumCode Juieg Description Choose the control to be used Enter the logical station number that was specified in communication settings on the communication setting utility Enter the device names from to where values will be read written Enter the number of points of the devices from to where values will be read written Enter the device values to be written Used to open the communication line Used to close the communication line GetCpuType Used to read the PLC CPU type LogicalStationNumber ReadDeviceRandom Used to read the data of the devices entered in the DeviceName text box WriteDeviceRandom Used to write the data of the devices entered in the DeviceName text box ReturnCode Shows the result of executing the corresponding method Shows the CPU type CPU type code and read device values 5 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 MELSOFT 5 2 Visual C Sample Programs This section explains the sample programs for Visual C which were created using the dispatch interface and custom interface These sample programs were created on Visual C 6 0 5 2 1 Dispatch interface This sample program is designed to read the type of the connection destination CPU and read write device values using the ActAJ71QE71UD
12. A mode Relayed network IMELSECNET H d Relayed Reiayed MELSECNET 0 ole Property patterns ation CPU s ch MELSECNET Il EH Sai lege Indicates the accessible ranges of the used Ethernet re control and the patterns of the properties CC Link IBM PC AT compatible O Accessible Property pattern within circle x Inaccessible a Including motion controller CPU Pr Patt Dem Kvale ropety Patterns Connected station ActConnectUnitNumber 1 Fixed to 0x00 side module station Fixed to 0x00 Fixed to 0x00 number JActCpuType CPU type corresponding to target station Target station side Target station side For single CPU For single CPU Ox3FF fixed Ox3FF fixed For multiple CPUs For multiple CPUs IActDestinationlONumber Fixed to 0x00 Fixed to 0x00 Connected CPU 0x3FF Connected CPU O3FF Property list 1 Property Gives the property name 2 Default value e Gives the default value of the property The 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 Visual Basic or Visual C The default values of t
13. 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 communication made with the PLC CPU using the CPU board Q series bus communication Abbreviation of communication made with the PLC CPU on the same base using the PC CPU module GX Simulator communication Abbreviation of communication made with the GX Simulator 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 MX Component 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 SPREAD Copyright C 1999 Far Point Technologies Inc 1 OVERVIEW MELSOFT 1 OVERVIEW This chapter provides the function outline of the ACT controls offered by MX Component 1 1 Outline of ACT controls These controls are used to create user programs fo
14. CPU module Q mode Er Relayed Reiayed 4 i E IBM PG AT compatible Relayed network station CPU module Computer link ccu Le x2l relorel gt O 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 3 Property list Property Patterns et ne 34 ActCpuType CPU Q02CPU CPU type corresponding to target station Target station side Target station side For single CPU For single CPU Ox3FF fixed Ox3FF fixed For multiple CPUs For multiple CPUs Fixed to 0x00 Fixed to 0x00 Connected CPU 0x3FF Connected CPU 0x3FF No 1 0x3E0 No 1 0x3E0 No 2 Ox3E1 No 2 Ox3E1 No 3 0x3E2 No 4 0x3E3 ActDidPropertyBit 1 Fixed to 0x01 Fixed to 0x01 Fixed to 0x00 ActDisdPropertyBit ea 1 Fixed to 0x01 Fixed to 0x01 Fixed to 0x00 0x01 target station is 0x01 target station is e 0 QCPU Q mode 0x00 QCPU Q mode 0x00 ActIntelligentF refrernceBit 0x00 ee tege target station is other target station is other than QCPU Q mode than QCPU Q mode ActDestinationlONumber 2 Note the following points when making access via the Ethernet module Q series compatible E71 QE71 e 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 M
15. Configuration 2 Property patterns Connected Station CPU Station CPU Relayed Station CPU Connected E71 Relayed annet Sten CPU QnA ACPU Relayed Network QCPU QCPU QnA ee tation CPU dul rs sta module A mode CPU 1 Q mode A model CPU oe m MELSECNET H ae eo eee oe MELsECNETIo x x2 x Ox Relayed Relayed meisson gt forejo x station CPU module Ethernet x x ere ee re corn x x Tx x gt 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 Ge GC gt o o o ActCpuTimeOut E Any value specified by user in 250ms units ActCpuType aa AIN Ne CPU type corresponding to target station EE 1280 P ActDestinationPortNumber 0x500 Port number of connected station side module ActHostAddress 1 1 1 1 Host name or IP address of connected station side module ActPacketType PACKET_ PACKET_BINARY or PACKET_ASCII BINARY ActPortNumber 1 IBM PC AT compatible side port number 255 ActStationNumber 2 OxFF Fixed to OxFF Target station side module station number ActTimeOut 10000 Any value specified by user in ms units ALO EE The free port number of the IBM PC AT compatible is assigned automatically Other than 0 The specified port number is used to generate the UDP socket
16. CpuName s CpuCode d szCpuName ICpuCode SysFreeString szCpuName 4 FUNCTIONS MELSOFT 4 Instructions for use of Visual C 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 lRet if SUCCEEDE hResult if Ret SUCCESS I else MessgeBox Communication Error x IRet else 4 MessgeBox COM ERROR Occurd 4 FUNCTIONS MELSOFT 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 2 Applicable ACT controls This function is available for all ACT controls Feature Opens the communication line Format Visual Basic Visual C VBA IRet object Open Long IRet Returned value Output VBScript varRet object Open VARIANT varRet Returned value LONG type Output Explanation The line is connected on the basis of the value set to the property for Open method Returned value Normal termination 0 is returned Abnormal termination A value other than 0 is returned
17. FX2 FX2c FX2 FX2c FX2 F X2c FX2n F X2NC FX2N FX2NC FX2N FX2NC A171SH A172SH A2C A173UH A2C A173UH A2C A273UH A273UH A273UH A70BDE J71QLP23 GE A70BDE J71QLP23 A2N A80BDE J61BT11 A80BDE J61BT11 ASOBDE J61BT13 A80BDE J61BT13 m2sHopust asm asm Joempeaens aas a2aceu aa azas _ Q8oBDu7LP21 25 oeenmusazl A2ACPU S1 A2AS1 A2AS1 Q80BD J71LP21G Q80BD J71LP21G 4 FUNCTIONS MELSOFT b Type code list Type Code CPU Network Board Type When CPU own When GX Simulator CPU Network Board Type When CPU own When GX Simulator board is connected is connected board is connected is connected A2ACPUP21 R21 S1 A273UHCPU S3 A2H ASH 92H A2ACPU S1 93H Q80BD J71LP21G 90H A2ACPUP21 R21 a 93H Q80BD J71BR11 90H 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 4 FUNCTIONS MELSOFT 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 When 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
18. Property list Ge SE ee Qx2 19200 ActBaudRate BAUDRATE _ 19200 8 ActControl TCR_DTR_OR Depending on used cable _RTS ActCpuType CPU on CPU type corresponding to target station BAUDRATE 9600 BAUDRATE 19200 BAUDRATE 38400 BAUDRATE 57600 BAUDRATE 115200 Target station side Target station side For single CPU For single CPU Ox3FF fixed Ox3FF fixed For multiple CPUs For multiple CPUs ActDestinationlONumber E Fixed to 0x00 Fixed to 0x00 Connected CPU 0x3FF Connected CPU 0x3FF No 1 0x3E0 No 1 0x3E0 No 2 Ox3E 1 No 2 Ox3E 1 No 3 0x3E2 3 No 4 0x3E3 ee Fixed to 0x01 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 eoscPronewat Ry zeien to 0x01 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 0x01 target station is 0x01 target station is QCPU Q mode QCPU Q mode ActintelligentPreferenceBit Fixed to 0x00 Fixed to 0x00 0x00 target station is Ox00 target station is 109 other than QCPU Q other than QCPU Q mode mode To next page 3 DETAILS OF THE ACT CONTROLS Property Patterns Ge GE EE NTT Target station side For single CPU FEI EE Ox3FF fixed For multiple CPUs i l c eg en For multiple CPUs Connected station Connected station ActlONumber 1 eae Connected CPU oxaFF side module UO side module IO Hefe No 1 0x3E0 address address No 2 Ox3E1 No 2 0x3E1 ActMultiDropChannelNumber Fixed to 0x00 Fixed to 0x00 0x00 or 0x02 Fixed to 0x02 0 Target station side ActNetworkNumb
19. QE71 e 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 any of the IP address calculation system table conversion system and combined system as the MNET 10 routing system To next page 3 23 3 23 3 DETAILS OF THE ACT CONTROLS S Gage SE Patterns ropert efault Value ce ao ox mr ActDisdPropertyBit Fixed to 0x01 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 ActintelligentPreferenceBit Se Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 For single CPU Target station side Ox3FF fixed For single CPU For multiple CPUs l 0x3FF fixed Connected CPU ox3FF 70 Multiple CPUs Connected station Connected station ActlONumber 1 No 1 0x3E0 Connected CPU 0x3FF side module I O side module UO No 2 0x3E1 No 1 0x3E0 address address No 2 0x3E1 ActMultiDropChannelNumber Fixed to 0x00 Fixed to 0x00 0x00 or 0x02 Fixed to 0x00 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 C 1 ActPortNumber PORT 1 IBM PC AT compatible side COM port number Target station side ActStationNumber Fixe
20. Specify the target CPU to communicate with In the parameter specify any of the CPU types in the following table Property value Property value Property window input Target CPU Property window input Target CPU value value CPU Q00JCPU 0x30 QO0JCPU CPU A2SHCPU 0x109 A2SHCPU S1 CPU Q0OCPU 0x31 QO00CPU CPU_A3NCPU 0x10A CPU_QO1CPU 0x32 Q01CPU A2ACPU S1 CPU A2ACPU 0x10C CPU Q02CPU 0x22 Q02 HJCPU A2ACPUP21 R21 S1 E A3ACPU CPU_A3ACPU 0x10D A3ACPUP21 R21 CPU QO6CPU 0x23 Q06HCPU A2UCPU S1 CPU Q12CPU 0x24 Q12HCPU CPU Q25CPU 0x25 Q25HCPU CPU A2UGPU 0x10E A2USCPU S1 A2ASCPU S1 CPU_Q02CPU_A 0x141 S1 0x10F CPU board CPU QO6CPU A 0x142 Q06HCPU A Q2ACPU Q2ASCPU CPU_Q2ACPU 0x11 Q2ASHCPU A3UCPU CPU A3UCPU 0x110 A2ASCPU S30 CPU A4UCPU 0x111 A4UCPU ActCpuType Q2ACPU S1 LONG CPU_Q2AS1CPU 0x12 Q2ASCPU S1 CPU FXOCPU 0x201 CPU FXONCPU 0x202 Q2ASHCPU S1 CPU_Q3ACPU 0x13 Q3ACPU CPU_Q4ACPU 0x14 Q4ACPU Q4ARCPU CPU_A0J2HCPU 0x102 A0OJ2HCPU E CPU A1FXCPU 0x103 A1FXCPU A1SCPU S1 CPU A1SCPU 0x104 A1SCPUC24 R2 A1SJCPU CPU_A1SHCPU 0x105 A1SHCPU A1SJHCPU CPU_A1NCPU 0x106 A1NCPU A2CCPU CPU A273UHCPU 0x603 A273UHCPU S3 CPU A2CCPU 0x107 A2CCPUC24 PRF A173UHCPU S1 A2CJCPU For own board A2NCPU S1 CPU BOARD 0x401 CPU A2NCPU 0x108 acces
21. VBA VBScript DO amp vbLf amp CN200 amp vbLf amp D1 When using Visual C DO NCN200 nD1 2 Upper Bytes 2 Lower Bytes RS o H of CN200 L of CN200 Example 3 When devices including FD are specified 3 points in all When using Visual Basic VBA VBScript DO amp vblf amp FDO A vbLf Di When using Visual C DO nFDO nD1 2 Upper Bytes 2 Lower Bytes 1 LL of FD 1 D1 1 Not used 0 is stored x2 Lower bits are stored in device number order 3 For CN200 or later of FXCPU 2 words are read from 1 point by random read 4 FUNCTIONS MELSOFT 6 Returned value Normal termination 0 is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES 1 Device status monitoring may not be performed at the specified status monitor time intervals depending on such conditions as the personal computer performance currently executed application load and time required for communication with the PLC Simultaneous use of any other ACT control function would also be the cause of disabling device status monitoring at the specified status monitor time intervals 2 For IData IpIData or lpvarData prepare a memory area having the number of points specified in ISize varSize If no memory area is available a serious phenomenon such as an application error may occur 3 Execution of EntryDeviceStatus during status monitoring will result in an error Wh
22. 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 3 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 inputs Fx Dedma a Function output FY Decimal Bm LI 4 words 1 point 1 Special relay JL sm Dem mm 4 Specialregister sD Decimal woa 4 Input relay 3 JL Hexadecimal Bit OstalforFXOPU Output relay Y 1 Hexadecimal Bit JI OstalforFXORU internalrelay Lu Dem mm 42 Decimal mm 2 Decimal Bm 2 decimal Bt O Decimal Bm Decimal word O w Hexadecimal weng IL y O Ts Decimal Bm o oo o l O To Dema mm o ooo TN Geng woa i Y O S Pp gt E c o c Word S S S Decima Bt i For ACPU use timer to specify i it Retentive timer Hexadecimal Bi O Hexadecimal Word 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 M L and S devices have the same regions independently of the device setting in the parameters Decimal Bit For ACPU use timer to specify For ACPU use timer to specify
23. x Inaccessible 1 Including motion controller CPU 2 Operates as the one equivalent to AnACPU IBM PC AT compatible 3 Property list Property Patterns A EE ActCpuTimeOut Any value specified by user in 250ms units 262 ActCpuType CPU_A1NCPU CPU type corresponding to target station a 1280 P ActDestinationPortNumber 0x500 Port number of connected station side module ActHostAddress 1 1 1 1 Host name or IP address of connected station side module 2 ActPacketType MEN PACKET BINARY or PACKET ASCII PACKET ASCII i 255 SE i ActStationNumber z 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 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 Ox00 in ActStationNumber 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 7 ActAJ71E71UDP ActMLAJ71E71UDP control The following table indicates the properties possessed by the ActAJ71E71UDP ActMLAJ71E71UDP control and their default values 1
24. x x x treme x x x x Computerin x x x x x eu S x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list m al Patterns Property Default Value 1025 ActCpuType CPU_BOARD CPU type corresponding to target station ActDestinationlONumb Fi See eee 0 ActlONumb Fi FF 0x00 E 0 T t stati id dul ActNetworkNumber Fixed to 0x00 Fixed to 0x00 ial alae TE 0x00 network number Board No of IBM PC AT compatible side CC Link board ActPortNumber 1 PORT 1 to PORT 4 first to fourth boards T t stati Link T TEE E Fixed to OxFF arget station side CC Lin arget station side module module station number station number T Link ActUnitNumber Fixed to 0x00 Fixed to 0x00 arget station side OL A module station number 3 DETAILS OF THE ACT CONTROLS MELSOFT 4 When connected station CPU is ACPU a Configuration Connected K Relayed station CPU CC Link module module Relayed network Relayed Relayed station CPU module IBM PC AT compatible b Property patterns RE RET RE CPU elayed Station ACPU 1 QCPU QCPU QnA ACPU FXCPU Q mode A mode CPU x1 MELSEGNETM x x x x x IMeLSEGNETA0 x x x x x r Metseonetn gt I gt I I x x EE ceim Ise x x x Accessible
25. 0 is returned Refer to Chapter 6 ERROR CODES 4 FUNCTIONS MELSOFT 4 2 9 ReadBuffer Buffer memory read 1 Applicable ACT controls The applicable ACT controls are indicated below Control Name Usabilit Control Name Usabilit SS ActMLQCPUQ ActAJ71E71TCP ActMLAJ71E71TCP RCCPUA AchMLacPua 0 ActQnACPU ActMLQNACPU AxtQCPUQUSB ActMLQCPUQUSB ACtACPU ActMLACPU JActCCG4QNA ActMLCCG4anA O ActCCG4A ActMLCCG4A O IActQu71024 ActMLQJ71024 O ActAJ71QC24 ActMLAJ71QC24 O E ES ter ActMLAJ71C24 ActAnUBD ActMLANUBD Ox6 ActQJ71E71TCP ActMLQJ71E71TCP a ActLLT ActMLLLT ActQJ71E71UDP ActMLQJ71E71UDP ActQCPUQBus ActMLQCPUQBus HE ActAJ71QE71TCP ERE EE JE O Usable x Unusable 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 4 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 FX2NCc 6 An error is returned if access to the QnACPU is made via the MELSECNET 10 or MELSECNETI II x7 Depending on the communication path Ethernet communication MELSECNET 10 communication etc there will be restrictions as placed on the corresponding communication path controls 2 Feature Reads the buffer memory values of the specia
26. 1 msme LE ESCHER x meisronenn LL SS R ES Ethernet x x ccain S x x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list Property Patterns er GC 1025 ActCpuType CPU_BOARD CPU type corresponding to target station Target station side Target station side For single CPU For single CPU Ox3FF fixed Ox3FF fixed 0 For multiple CPUs For multiple CPUs ActDestinationlONumber Fixed to 0x00 Connected CPU 0x3FF Connected CPU 0x3FF 0x00 No 1 0x3E0 AG No 2 Ox3E1 et No 3 0x3E2 No 4 0x3E3 0 ActlONumber 0x00 Fixed to 0x00 Fixed to Ox3FF Fixed to Ox3FF 0 Target station side module ActNetworkNumber Fixed to 0x00 Fixed to 0x00 0x00 network number Alpene 1 Board No of IBM PC AT compatible side CC Link board PORT 1 PORT 1 to PORT 4 first to fourth boards 255 Target station side CC Link Target station side module ActStationNumber Fixed to OxFF g S OxFF module station number station number 0 Connected station side ActUnitNumber Fixed to 0x00 Fixed to 0x00 i 0x00 module station number 3 DETAILS OF THE ACT CONTROLS MELSOFT 2 When connected station CPU is QCPU A mode a Configuration Connected K Relayed station CPU CC Link module module Relayed network Relayed Relayed station CPU module IBM PC AT comp
27. 1 PORT 1 to PORT 4 first to fourth boards 255 Target station side Target station side Connected station ActStationNumber OxFE Fixed to OxFF module station module station side module station number number number Target station side nee Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 module station number 1 Note the following for access to be made via the Ethernet module Q series compatible E71 QE71 Specify ActNetworkNumber and ActStationNumber using the values set in the target station side G series compatible E71 or QE71 Set MNET 10 routing information in the Q series compatible E71 or QE71 parameter setting 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 MELSOFT 3 3 22 ActCCBD ActMLCCBD control The following table indicates the properties possessed by the ActCCBD ActMLCCBD control and their default values 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 Connected Re Gan Beats Station CPU Si elayed Station wn Boar QCPU elayed Networl acpu acPu ara fro See Q mode Q mode A mode CPU
28. 1 FXCPU IBM PC AT compatible Relayed network Independent mode 2 Computer link Relayed Relayed Synchronous p 8 p station CPU module mode 2 Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Indicates the CH2 side setting CH1 side fixed to independent mode c Property list Property Patterns Ge EE 19200 BAUDRATE Match to the setting of Q series compatible C24 19200 ActConnectUnitNumber Connected station side module station number ActControl TCR Ge OR Depending on used cable RTS ActCpuType CPU pe CPU type corresponding to target station Target station side For single CPU Ox3FF fixed 0 For multiple CPUs ActDestinationlONumber Fixed to 0x00 Connected CPU 0x3FF Fixed to 0x00 0x00 No 1 0x3E0 No 2 Ox3E 1 No 3 0x3E2 No 4 0x3E3 1 ActDidPropertyBit 0x01 Fixed to 0x01 Fixed to 0x00 Fixed to 0x01 1 ActDsidPropertyBit 0x01 Fixed to 0x01 Fixed to 0x00 Fixed to 0x01 0 ActintelligentPreferenceBit 0x00 Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 To next page 3 DETAILS OF THE ACT CONTROLS MELSOFT Property Patterns Ge GE For single CPU Ox3FF fixed For multiple CPUs ActioNumberse4 Connected CPU 0x3FF Connected station side Fixed to OX3FF No 1 0x3E0 module I O address No 2 0x3E1 No 3 Ox3E2 No 4 0x3E3 0 ActMultiDropChannelNumber 0x00 Fixed to 0x00 0x00 or 0x02 Fixed to 0x00
29. 200 Tank capacity Linked with device D100 Indicates the tank status Tank status Normal device value 0 Blue lamp lit Linked with device D101 Error device value lt gt 0 Red lamp lit 5 SAMPLE PROGRAMS MELSOFT 5 5 ASP Sample Program This sample program is designed to read PLC CPU data and read device values using the ActMLEasylF control 1 3 4 File structure a Sample asp data input screen Initial display screen used to set data for monitoring b SampleControl asp data getting screen Used to get the input data of Sample asp store them into the global variables and check them for errors c SampleMon asp data display screen Displays data in accordance with the input data of Sample asp Displays a message if an error occurs Using method Store Sample asp SampleControl asp and SampleMon asp in the same folder on the WWW server Browse the URL of Sample asp on the Microsoft Internet Explorer and display the initial screen Entering MonitorTiming LogicalStationNumber DeviceName and DeviceSize on the initial screen and pressing the MonitorStart button start Open processing ReadDeviceBlock processing GetCpuType processing and Close processing The input data appear in MonitorTiming LogicalStationNumber DeviceName and DeviceSize on the data display screen Message displays error occurrence processing when an error occurs in the corresponding
30. 3 Operates as the one equivalent to AnACPU c Property list Property Patterns Property Default Value D 19200 BAUDRATE Match to the setting of UC24 _ 19200 8 TCR_DTR_OR Depending on used cable _RTS I 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 MELSOFT 3 3 16 ActAJ71C24 ActMLAJ71C24 control The following table indicates the properties possessed by the ActAJ71C24 ActMLAJ71C24 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 Relayed Station CPU QCPU IQnA ACPU Relayed Network QCPU QCPU QnA ACPU EXCPU c24 Relayed A mode ICPU 1 Q mode A mode CPU zi ee IMELSECNET 0 x amp 2 x o loso o Mesonen x amp f re Ethem LI Connected station CPU Relayed network Relayed Relayed station CPU module IBM PC AT compatible x Ethernet x Computer link CC Link Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Operates as the one equivalent to AnACPU c Property list Property Patterns
31. 3 3 10 7 200011 0 00 00 1 2 3 4 5 6 7 3 3 10 KS 20000000 1 2 3 4 5 6 7 8 3 10 19 20010000 1 2 3 D 5 G 7 3 10 20 20017171 0 00 00 1 2 3 4 5 5 7 3 3 10 3 22 aam J Gen J Data2 t Data 2 Dast E 6 4 Datas 30 4 Data EI Data 32 2 3 H H H H H Datas EG Datag EN 1 2 3 4 5 6 7 8 3 D Sa 36 s IW 41 gt b LOGGING I lt Die Ready NUM Enter the logical station number that was specified in communication settings on the communication setting utility Enter the first device of the devices whose data will be read Enter the logging interval LogicalStationNumber LoggingTimeing 0 01 1 30 0 Example Logging at intervals of 1 second Logging at intervals of 1 hour 30 minutes Message 5hows the function execution result Character string ReturnCode hh mm ss Shows the function execution result Hexadecimal value Shows the logging system time Data01 to 10 Show the logged device values Shows the past 10 logged values of 10 devices in the form of line graphs LoggingStart Used to start logging 5 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 MELSOFT 5 3 2 Access Sample Program This sample program is designed to log and monitor the device values of the PLC C
32. ActNetworkNumber Fixed to 0x00 Fixed to 0x00 og network number Target station side module Target station side module ActStationNumber Fixed to OxFF Sg station number station number 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 24 ActLLT ActMLLLT control The following table indicates the properties possessed by the ActLLT ActMLLLT control and their default values Property Default Value Property Pattern 34 ActCpuType CPU Q02CPU CPU type corresponding to target station 10000 Any value specified by user in ms units 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 25 ActQCPUQBus Act MLQCPUQBUus control The following table indicates the properties possessed by the ActQCPUQBus ActMLQCPUQBus control and their default values 1 Configuration if file FERN No 1 No 2 No 3 PC CPU module 2 Property Default Value Property Pattern Er CPU ke 2CPU CPU type corresponding to target station Target station No 1 0x3E0 ActlON ctlONumber SE No 2 0x3E1 No 3 0x3E2 Use any of the following controls for access to the PLC CPU via the corresponding module controlled by the PC CPU module Controls Used Relayed Module For VB VC VBA For VBScript MELSECNET H module ActMnetHBD ActMLMnetHBD CC Link module ActCCBD ActMLCCBD 4 FUNCTIONS MELSOFT 4 FUNCTIONS This chapter provides the pr
33. B or later Must be purchased separately i ten On the same base Q series bus communication PC CPU module At Q mode d d 1 OVERVIEW MELSOFT 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 MX Component Included Control Name i DLL Name i Application For VB VC VBA For VBScript Used to make communication settings easily on the ActMulti DLL ActEasylF ActMLEasylF PE ActQCPUQ ActMLQCPUQ ActQCPUA ActMLQCPUA Tr k EE NM ActPcCom DLL ActQnACPU ActMLQnACPU SR ds rd Deane corresponding PLC CPU ActACPU ActMLACPU ActFXCPU ActMLFXCPU ActQJ71C24 ActMLQJ71C24 ActAJ71QC24 ActMLAJ71QC24 k ication via th i ActComLk DLL Used to make communication via the computer link communication settings utility to make communication ActAJ71UC24 ActMLAJ71UC24 module serial communication module ActAJ71C24 ActMLAJ71C24 ActQJ71E71TCP ActMLQJ71E71TCP ActQJ71E71UDP ActMLQJ71E71UDP ActAJ71QE71TCP ActMLAJ71QE71TCP ActEther DLL Used to make communication via the Ethernet module ActAJ71QE71UDP ActMLAJ71QE71UDP ActAJ71E71TCP ActMLAJ71E71TCP ActAJ71E71UDP ActMLAJ71E71UDP Used to mak ication via the USB port of th ActPcUsb DLL ActQCPUQUSB ActMLQCPUQUSB SEO ee HUSE pot GUNA ActCCG4QnA ActMLCCG4QnA Used to make communication
34. 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 Ox00 in ActStationNumber 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 8 ActaCPUQ ActMLQCPUQ control The following table indicates the properties possessed by the ActQCPUQ ActMLQCPUQ control and their default values 1 Configuration 2 Property patterns Connected 3 Station CPU Relayed Station CPU Qopu PelavedNework Qopy acpu ana Joen Connected Relayed Q mode EXCPU station CPU Q mode A mode CPU 1 EC ETEN module a IBM PGJAT compatible Relayed network MELSECNETN0 lolol x Fayed Soe a Merseonerm x x x x x PR Ethernet LS x x Compucrink gt x cotink x2 x2l xe Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU x 2 Use the QnA or ACPU side CC Link module whose ROM version is S or later 3
35. ICpuType Long IRet Returned value Output String szCpuName PLC CPU type character string Output Long ICpuType PLC CPU type code Output Visual C IRet object GetCpuType szCpuType IpICpuType Long IRet Returned value Output BSTR szCpuName PLC CPU type character string Output Long IpICpuType PLC CPU type code Output VBScript varRet object GetCpuType varCpuName lpvarCpuCode VARIANT varRet Returned value LONG type Output VARIANT IpvarCpuName PLC CPU type character string Output character string type VARIANT IpvarCpuCode PLC CPU type code LONG type Output 4 Explanation e The type of the PLC which is making communication is stored into szCpuName lpvarCpuName and its type code into ICpuType IpICpuType or lpvarCpuCode e The PLC CPU type character string is returned in UNICODE 4 FUNCTIONS MELSOFT 5 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 Type Character String Type Character String CPU Network Board Type CPU Network Board Type When GX Simulator Board Type is connected Board Type is connected Q00JCPU Q00JCPU A2ACPUP21 R21 S1 ausi A 2U 2U QO2HCPU Q02CPU A2USCPU S1 A2US1 QO6HCPU QO6HCPU _ A2ASCPU 3U A2U A2U A2U A2U A2U A2U A3U QO02CPU Q02CPU A A2USHCPU S1 A3N A3A A3A A3U AU AER Xo FXo FXos FXo FXos FXo FXos FXo FXos FXON FX FXis FXIN FXIN
36. Network Boards nrrsnrrnvrrnvrrnvrrnvrrnvrrnvrrnvrrnnrrnnrrnne 6 9 6 3 HRESULT Type Error Code vin vadet ee ar sia ieirik inn 6 10 About Manuals The following lists the manuals for this software package Refer to the following table when ordering manuals Related Manuals Manual Name Manual Number Model Code MX Component Version 2 Operating Manual Startup Provides procedures for installing and uninstalling MX Component and for browsing the operating 13 JU10 manual Sold separetely MX Component Version 2 Operating Manual SH 080154 Gives how to perform setting and operation of each utility on MX Component Sold separetely 13JU11 Type A70BDE J71QLP23 A70BDE J71QLP23GE A70BDE J71QBR13 A70BDE J71QLR23 MELSECNET 10 Interface Board User s Manual For SW3DNF MNET10 IB 0800035 Describes the features specifications part names and setting of the MELSECNET 10 board and the 13JL93 installation uninstallation and others of the driver Sold separetely Type A80BDE J61BT11 Control amp Communication Link System Master Local Interface Board User s Manual For SW4DNF CCLINK B IB 0800175 Describes the features specifications part names and setting of the CC Link master board and the 13JR28 installation uninstallation and others of the driver Sold separetely Type A80BDE J61BT13 Control amp Communication Link System Local Interface Board User s Manual For SW4DNF CCLINK B IB 0800176 Describes the features specificat
37. Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list T a Patterns Property Default Value 1025 ActCpuType CPU_BOARD CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 SC ActlONumber Fixed to 0x00 BEE e pen O 0 ActNetworkNumber Fixed to 0x00 0x00 ActPortNumber Board No of IBM PC AT compatible side CC Link board 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 Sj a a 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 23 ActAnUBD ActMLAnUBD control The following table indicates the properties possessed by the ActAnUBD ActMLAnUBD control and their default values 1 Configuration 2 Property patterns Connected R en ee f Relayed Station CPU Extension base unit are elayed Networl QCPU QCPU QnA ACPU ert 8 Relayed Q mode A mode CPU zi dee TE ER user o EE x ae FIETEN St a Sela EE O Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Operates as the one equivalent to AnACPU IBM PC AT compatible Relayed station CPU Relayed module 3 Property list Property Patterns ae EE 271 ActCpuType CPU CPU type corresponding to target station _A2USHS1CPU Target station side module
38. S S S C N S C N s Decimal 8 C N B W S Bit Bit device Word Word device 2 14 2 14 2 ABOUT THE ACT CONTROLS MELSOFT Device No Type Representation Index register DE R Decimal weg o O File register E zr Decimal weg y O Extended file register Decimal 4 Link input JL Je Hexadecimal Bit 4 Linkoutput Je Hexadecimal pm ee Direct Linkrelay Jep Hexadecima pn Io O ink gt 6 Link special relay J sB Hexadecimal st A Linkregister Jem Hexadecimal Bt To memory 7 9 decimal Bit Bit device Word Word device 3 To specify the extended file register describe between the block number part and file register part Specifying R specifies R of block No 0 Specifying EROVR returns an error Specifying ER zk gt 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 6 For J 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 9 In a multi QCPU configuration an error will occur if the shared memory of the host QCPU is specified Also indep
39. Set the correct value to the port number of the property 0x01808002 p POP p Make communication settings again on the Exit the program and restart the IBM PC AT compatible Reinstall MX Component 6 ERROR CODES MELSOFT Error Code Error Definition COM port handle error RO The handle of the COM port cannot be acquired Check for an application which uses the COM port The COM port objet cannot be copied Exit the program and restart the IBM PC AT compatible The SOCKET object cannot be copied Check for an 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 P f Exit the program and restart the IBM PC AT compatible ae Check for an application which uses the COM port DCB value acquisition error l 0x0180800B Aen fetteg of the COM vort DCB value failed Make COM port setting on the control panel of the OS P Exit the program and restart the IBM PC AT compatible Check for an application which uses the COM port 0x0180800C poe cong ee Make COM port setting on the control panel of the OS g Setting of the COM port DCB value failed p 9 p j Exit the program 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 f i a5 Setting of the COM port time out value failed Check for
40. ae GE 19200 BAUDRATE Match to the setting of C24 19200 8 TOR DTR OR Depending on used cable RTS 262 o ActCpuType CPU_A1NCPU CPU type corresponding to target station 8 ActDataBits DATABIT_8 Match to the setting of C24 1 ActParity ODD_PARITY Match to the setting of C24 1 ActPortNumber PORT_1 IBM PC AT compatible side COM port number 255 e Stan OxFF Fixed to OxFF Target station side module station number 0 STOPBIT Match to the setting of C24 _ONE 1 SUM_CHECK Match to the setting of C24 10000 Any value specified by user in ms units 0 d Connected station side module station 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 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 Ox00 in ActStationNumber 2 Access via network is enabled only to the network on the side specified in valid module for another station access in the connected station side network parameters 3 31 3 31 3 DETAILS OF THE ACT CONTROLS MELSOFT 2 When connected station side C24
41. amp DO amp vbLf amp K8MO When using Visual C MO nDO nK8MO 2 Upper Bytes 2 Lower Bytes T a M16 to M31 2 MO to M15 2 Example 2 When devices including CN200 and later of FXCPU are specified 3 points in all 3 When using Visual Basic VBA VBScript DO amp vbLf amp CN200 amp vbLf amp D1 When using Visual C DO NCN200 nD1 2 Upper Bytes 2 Lower Bytes Oo o sa o H of CN200 L of CN200 SS a ae TEE 1 Example 3 When devices including FD are specified 3 points in all When using Visual Basic VBA VBScript DO amp vbLf amp FDO amp vbLf amp D1 When using Visual C DO nFDO nD1 Oo o oa o O 1 D1 1 Not used 0 is stored x2 Lower bits are stored in device number order 3 For CN200 or later of FXCPU 2 words are read from 1 point by random read 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 varSize is up to OX7FFFFFFF points 2 For IData IpIData or varData prepare a memory area having the number of points specified in ISize varSize If there is no memory area a critical phenomenon such as an application error may occur 4 FUNCTIONS MELSOFT 4 2 7 SetDevice Device data setting 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Sets
42. and T C ST contact coil cannot be specified 3 Z V T C ST present value cannot be specified 4 FX FX DX DY T C ST contact coil Z and S cannot be specified 2 4 Accessible Devices and Ranges Refer to the MX Component operating manual for the accessible devices and ranges for corresponding communication 3 DETAILS OF THE ACT CONTROLS MELSOFT 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 Definition Setting For VB VC VBA For VBScript Type Can communicate with any communication path ActEasylF ActMLEasylF wnat a 3 EN y Use the communication settings utility to set the information for communication ActQJ71E71TCP ActMLQJ71E71TCP Used for Ethernet communication where the connected module is the Q series compatible E71 TCP IP communication ActQJ71E71UDP ActMLQJ71E71UDP Used for Ethernet communication where the connected module is the Q series compatible E71 UDP IP communication Used for Ethernet communication where the connected module is the QE71 ActAJ7 1QE71TCP ActMLAJ71QE71TCP MG S Se MR SG TCP IP communication ActAJ71QE71UDP ActMLAJ71QE71UDP Used for Ethernet communication where the connected module is the QE71 UDP IP communication ActAJ71E71 T
43. by the ACT controls Error Definition 0x00000000 Normalend PT RUN time disable error 0x01010002 Operation that was performed must not 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 Contact our telephone center Remote request error 0x01010018 Remote operation is being performed in the path different from the communicating path Cancel the remote operation being performed in the other path Check that reset operation is not performed for the other Link error end of communication the control station master station Link communications could not be made or the station passed through by routing Check that the network parameter setting is correct 0x01800001 INocommanderor fre 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 x01800003 Memory securi
44. circle x Inaccessible 1 Including motion controller CPU 3 Property list P Default Val Property Patterns roperty efault Value ActCpuTimeOut un FER 17 ActCpuType CPU Q2AGPU CPU type corresponding to target station oe 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 ActNetworkNumber 0x00 0x00 Target station side module network number 2 ActPacketType ME PACKET_BINARY or PACKET ASCII PACKET ASCII i 255 ae ActStationNumber OxFF OxFF Target station side module station number 10000 Any value specified by user in ms units 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 5 ActAJ7 1QE71UDP ActMLAJ71QE71UDP control The following table indicates the properties possessed by the ActAJ71QE71UDP ActMLAJ71QE71UDP control and their default values 1 Configuration 2 Property patterns Connected Relaved Station CPU d seni Station CPU mayen Station onnecte elaye Relayed Network station ged QE71 medie QnACPU QCPU QCPU QnA ACPU FXCPU Q mode A mode CPU 1 er mecsecnetno x x o x gt lt Ea eA a esoe x lt x 1 1 Erem x x lol x x O Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 3 Property list z SE Property Patterns rope
45. control and their default values 1 Configuration 2 Property patterns Connected Relayed Station CPU Station CPU Mr Rel N k GPU elayed Networ QCPU QCPU QnA ACPU Connected Relayed A mode E station CPU module a mode A mode ena S CT Bee MELSECNETH x IBM PGJAT compatible Pe 2yed network MELSECNET 10 MELSECNET I Relayed Relayed D tena station CPU module Ethernet EA Oox eu V x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 3 Property list Property Patterns E e cl gt sl 9600 ActBaudRate BAUDRATE 9600 8 ActControl TOR DTR OR Depending on used cable RTS 321 BAUDRATE 9600 BAUDRATE 19200 BAUDRATE 38400 BAUDRATE 57600 BAUDRATE 115200 ActCpuType CPU CPU type corresponding to target station _Q02CPU_A Target station side module ActNetworkNumber Fixed to 0x00 Fixed to 0x00 on network number ActPortNumber E 1 IBM PC AT compatible side COM port number Target station side module Target station side module ActStationNumber Fixed to OxFF g g om station number station number ActTimeout 10000 Any value specified by user in ms units 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 10 ActQnACPU ActMLQnACPU control The following table indicates the properties possessed by the ActQnACPU ActMLQn
46. e Pole o o a Masoem Comu gt I gt JG cem gt O Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list 3 ert atens Property Default Value p oa et Target station side For single CPU 0x3FF fixed For multiple CPUs Fixed to 0x00 Connected CPU 0x3FF Fixed to Ox3FF No 1 0x3E0 No 2 Ox3E1 No 3 Ox3E2 No 4 0x3E3 Board No of IBM PC AT compatible side MELSECNET H board PORT 1 PORT 1 to PORT 4 first to fourth boards 3 DETAILS OF THE ACT CONTROLS MELSOFT 4 When access is made via MELSECNET 10 mode using QnACPU as connected station CPU Operates when the MELSECNET H board is in the MELSECNET 10 mode a Configuration Connected MELSECNET H Relayed station CPU module module Relayed network Relayed Relayed station CPU module IBM PG AT compatible b Property patterns Connected Station CPU Relayed Station CPU Own Board See Relayed Network QCPU QCPU QnA ACPU Sean Q mode A mode CPU x1 DEER amp e o l IMELSECNET x x x x gt Emme EECHER EES lComputerink x gt o lecunk x I JJ Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list g i EN l Property Patterns Ge eautve a a Tee 1
47. following points when making access via the Ethernet module Q series compatible E71 QE71 e 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 MELSOFT For single CPU 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 18 ActCCG4QnA ActMLCCG4QnNA control The following table indicates the properties possessed by the ActCCG4QnA ActMLCCG4QnA control and their default values 1 Configuration 2 Property patterns Connected 3 Station CPU Relayed Station CPU Connected f Relayed Relayed Network z P P A ACP station Sch CO Link module module QNACPU EE ep Q mode A mode CPU x1 Gelee CC Link G4 E Elch module Relayed Relayed x IBM PGJAT QnA mode station CPU module E EE SH Computerin x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 3 Property list Property Patterns hiia Ge ey 19200 BAUDRATE Match to the setting of CC Link G4 module 19200 ActConnectUnitNumber Conne
48. include file KNE EEG 1 Start Visual C and choose the Tools Options menu Tools Window Help Source Browser Alt F12 E Close Source Browser File A Visual Component Manager A Register Control Fas Error Lookup Pri ActiveX Control Test Container OLE COM Object Viewer Pr Spy Pr MFC Tracer Customize SI at w Macro Record Quick Macro Ctrl Shift R Play Quick Macro Ctrl Shift P l 2 Choose the lt lt Directories gt gt tab and set Include files in Editor Tabs Debug Compatibility Build Directories i Show directories for Platform Show directories for fwina2 Include files x Directovies 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 Directory GIS 3 Double click the item to be set and browse the include file Directory name SE ActDefine H is stored in lt User specified folder gt lt Act gt CAMELSECA amp ctnclude r lt Include gt at the time of installation a Network 2 ABOUT THE ACT CONTROLS MELSOFT 2 Registering the ACT control ee 1 Right click the form to choose Insert ActiveX Control Cancel op Edges EI Check Mnemonics amp Classwizard Event Properties 2 Select the ACT control you want to use Activex control Maks MITSUB
49. module Abbreviation of the MELSEC Q series compatible PC CPU module CONTEC CO LTD make GX Developer Abbreviation of Type SW_D5C GPPW E SW_ID5F GPPW E GPP function software package GX Simulator Abbreviation of Type SW ID5G 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 MELSECNET H board Abbreviation of Type Q80BD J71LP21 25 Q80BD J71LP21G Q80BD J71BR11 MELSECNET H board CC Link board Abbreviation of Type A80BDE J61BT11 CC Link system master local interface board and Type A80BDE J61BT13 CC Link interface board CPU board Abbreviation of Type A80BDE A2USH S1 PLC CPU board Generic term of the AVJ2HCPU A1SCPU A1SCPU S1 A1SCPUC24 R2 ANNCPU A1SHCPU A1SJCPU A1SJHCPU A1NCPU A2CCPU A2CCPUC24 A2CCPUC24 PRF A2CJCPU A2NCPU A2NCPU S1 A2SCPU A2SCPU S1 A2SHCPU A2SHCPU S1 A3NCPU and A1FXCPU Generic term of the A2ACPU A2ACPU S1 A2ACPUP21 R21 A2ACPUP21 S1 A3ACPU and A3ACPUP21 R21 Generic term of the A2UCPU A2UCPU S1 A2USCPU A2USCPU S1 A2ASCPU A2ASCPU S1 A2ASCPU S30 A2USHCPU S1 A3UCPU and A4UCPU Generic term of the Q2ACPU Q2ACPU S1 Q2ASCPU Q2ASCPU S1 Q2ASHCPU Q2ASHCPU S1 Q3ACPU Q4ACPU and Q4ARCPU Generic term of the ANNCPU AnACPU and AnUCPU QCPU A mode Generic term of the QO2CPU A Q02HCPU A and
50. object GetClockData lpsYear lpsMonth IpsDay lpsDayOfWeek lpsHour lpsMinute lpsSecond IpIRetCode HRESULT SHORT SHORT SHORT SHORT SHORT SHORT SHORT LONG hResult Returned value of COM Output lpsYear Read year value Output gt lpsMonth Read month value Output lpsDay Read day value Output k IlpsDayOfWeek Read day of week value Output IpsHour Read hour value Output gt psMinute Read minute value Output lpsSecond Read second value Output lpIRetCode Returned value of communication function Output 4 FUNCTIONS MELSOFT 4 3 12 SetClockData Clock data write hResult object SetClockData sYear sMonth sDay sDayOfWeek sHour sMinute sSecond IpIRetCode 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 lplRetCode Returned value of communication function Output 4 3 13 GetCpuType PLC CPU type read hResult object GetDevice szDeviceList IpIData IpIRetCode HRESULT hResult Returned value of COM Output BSTR szCpuName PLC CPU type character string Output LONG IpICpuType PLC CPU type code Output LONG lpIRetCode Returned value of communication function Output 4 3 14 Se
51. processing Return Code shows the result of the corresponding processing CpuType shows the type of the PLC CPU connected ReadData Hex displays the device data of the PLC CPU connected If an error has occurred refer to 6 ERROR CODES and remove the error cause The data display screen repeats updating at the intervals of MonitorTiming Pressing the button returns to the initial screen Precautions for use of the sample program Before running this sample program make communication settings on the communication setting utility Sample file list By default the sample program is installed in the following folders C MELSEC Act Sample VBScript SampleASP Sample asp ASP file C MELSEC Act Sample VBScript SampleASP SampleControl asp ASP file C MELSEC Act Sample VBScript SampleASP SampleMon asp ASP file 5 SAMPLE PROGRAMS MELSOFT 5 Screen The sample program screens will be explained a Sample asp data input screen AY http 10 97 29 49 ActTest Eng Sample E asp Microsoft Internet Explorer File Edit View Favorites Tools Help Kal rd E Back Stop Refresh Home Search Favorites History Mail Prit Edit Address htip 10 97 29 49 ActTest Eng Sample E asp zl Go Links MonitorTiming 5 LogicalStationNumber 0 DeviceName 50400 DeviceSize 10 MonitorStart E Done x Local intranet MonitorTiming Enter the monitoring intervals LogicalStationNumber
52. specify the value found by dividing the actual first VO number by 16 To next page 3 11 3 11 3 DETAILS OF THE ACT CONTROLS rm Patterns Property Default Value mr o ActMultiDropChannelNumber Fixed to 0x00 Fixed to 0x00 0x00 or 0x02 6 Fixed to 0x00 Connected station Connected station side Q series side Q series compatible E71 compatible E71 network number network number ActPassword Empty Password set to the Q series compatible E71 on the connected station side ActPortNumber 4 5001 IBM PC AT compatible side port number 1 ActSourceNetworkNumber 3 0x01 IBM PC AT compatible side network number MELSOFT Network number of Network number of ActNetworkNumber 2 target station side target station side module module 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 H 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 Any value specified by user in ms units Target station side Target station side Fixed to 0x00 Fixed to 0x00 module station module station number number 2 For the property pattern of or specify the value set in the target station side parameter for ActNetworkNumber and ActStat
53. that the whole system will operate safely In addition predetermine corrective actions 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 A CAUTION e Read the manual carefully before performing the online operations especially forced output and operating status change which will be executed with the personal computer 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 Print Date Manual Number Mar 2001 SH NA 080155 A First edition Japanese Manual Version SH 080152 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 2001 MITSUBISHI ELECTRIC CORPORATION Operating Instructions When using Microsoft Windows NT Workstation Operating System Version 4 0 and Microsoft Windows 2000 Professional Operating System When using Windows NT Workstation 4 0 and Windows 2000 Professional MX Component may be installed and used only on the administrator s authority About Ethern
54. the logical station Set the logical station number on the communication number failed settings utility 6 ERROR CODES MELSOFT Error Definition Already open error E SE When changing the communication target CPU execute 0xF0000003 The Open method was executed in the open f GE the Open method after performing Close status 0xF0000004 Not yet open error After executing the Open method execute the D The Open method is not yet executed corresponding method Initialisation error PRS i Exit the program and restart the IBM PC AT compatible 0xF0000005 Initialisation of the object possessed internally in i Reinstall MX Component MX Component failed Memory securing error 4 J Exit the program and restart the IBM PC AT compatible 0xF0000006 Securing of MX Component internal memory Exit other programs and secure free memory area failed Function non support error i 0xF0000007 The corresponding method does not support The method does not support Check the character string specified in the method The ASCII character string acquired from the PLC CPU is Character code conversion error abnormal 0xF1000001 Character code conversion UNICODE ASCII Review the system e g PLC CPU module setting and code or ASCII code UNICODE failed cable status Exit the program and restart the IBM PC AT compatible Retry the GetCpuType method First I O number error Check the value of the first I O number specified in t
55. 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 Shows the result of executing the function Shows the CPU type code and read device value Shows the CPU type Return Output 5 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 MELSOFT This sample program is designed to read the type of the connection destination CPU and read write device values using the ActAJ71QE71UDP control or ActEasylF control on the custom interface 1 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
56. 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 MELSOFT 4 2 14 SetCpuStatus Remote control 1 Applicable ACT controls The applicable ACT controls are indicated below Control Name Usabilit Control Name Usabilit ActEasylF ActMLEasylF O ActAJ71QE71UDP ActMLAJ71QE71UDP O ActQCPUQ ActMLQCPUQ ActAJ71E71TCP ActMLAJ71E71TCP GEN IAGQCPUA ActMLQCPUA Oi ActAJ71E71UDP ActMLAS7TETIUDP O JActQnACPU ActMLQNACPU ActQCPUQUSB ActMLacPUQUSB_ AtACPU ActMLACPU JActCCG4QNA ActMLCCG4QnA O ActEXCPU ActMLFXCPU JActCCG4A Accu O ActQJ71024 ActMLQJ71024 O IActAJ71Q024 ActMLAJ71QC24 O ActAJ71C24 ActMLAJ71C24 SE ActAnUBD ActMLAnUBD Ox 3 ActQJ71E71TCP ActMLQJ71E71TOP Ac
57. two station numbers i e for TCP IP and for UDP IP must be set Example When MX Component uses TCP IP and GX Developer uses UDP IP IBM PC AT compatible TCP IP station number for MX Component 2 Q series compatible E71 UDP IP station number for GX Developer 3 Station number 1 GX Developer UDP IP MX Component TCP IP Set different station numbers as the TCP IP station number for MX Component and UDP IP station number for GX Developer If they are set to the same station number an error will occur on the Ethernet module side 31 About switch settings of E71 and QE71 If the four lower digits of the error code that occurred during Ethernet communication using the E71 or QE71 is not indicated in the E71 or QE71 manual check the DIP switch SW2 setting of the E71 or QE71 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 32 Instructions for relaying the MELSECNET II When access is made to the QnACPU AnUCPU QCPU A mode or motion controller CPU via the MELSECNET II the device range is equivalent to that of the AnACPU 33 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 i
58. via the CC Link G4 ActCcG4 DLL ActCCG4A ActMLCCG4A module ActMnet10BD ActMLMnet10BD ActMnetHBD ActMLMnetHBD Used to make communication with or via the network ActBoard DLL ActCCBD ActMLCCBD board ActAnUBD ActMLAnUBD ActLLT DLL ActLLT ActMLLLT Used to make communication with the GX Simulator Used to mak b t th the P ActPcQbf DLL ActQCPUQBus AciMLQCPUQBus Ve le GO Sene GUS Communication MINER module 1 OVERVIEW 1 2 2 Function list MELSOFT 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 Open fOpens a communication 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 Reads data from buffer memory WriteBuffer Writes data to buffer memory GetClockData Reads clock data from PLC CPU SetClockData Writes clock data to PLC CPU Reads PLC CPU type Registers device status monitor 2 Functions available for the ACT controls Refer to CHAPTER 4 FUNCTIONS for full information on the functions available for the ACT controls 2 ABOUT THE ACT CONTROLS MELSOFT 2 ABOUT THE ACT CONTROLS This chapter explains the settings made for use of the
59. 0 ActNetworkNumber 000 Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 ActParity Match to the setting of Q series compatible C24 ODD PARITY ActPortNumber SSC 1 IBM PC AT compatible side COM port number ActStationNumber Fixed to OxOFF Fixed to OxOFF Fixed to OxOFF QCPU Q mode 0x00 MELSECNETHH 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 modul ActUnitNumber Gas Fixed to 0x00 NT PENE Fixed to 0x00 0x00 station number 1 As the I O address specify the value found by dividing the actual first O number by 16 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 it is set to No OFF a communication error will occur disabling proper communication 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 14 ActAJ71QC24 ActMLAJ71QC24 control The following table indicates the properties possessed by the ActAJ71QC24 ActMLAJ71QC24 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 BESSE Station CPU elayed Station Relayed Network C
60. 025 S ActCpuType CPU_BOARD CPU type corresponding to target station ActDestinationlONumber Fixed to 0x00 Ge ActDidPropertyBit Fixed to 0x00 Fixed to 0x01 Fixed to 0x00 ActDsidPropertyBit Fixed to 0x00 Fixed to 0x01 Fixed to 0x00 Target station side For single CPU Ox3FF fixed d For multiple CPUs Connected station Fixed to 0x00 Fixed to Ox3FF Connected CPU 0x3FF side relayed module 000 No 1 Ox8E0 I O address No 2 Ox3E1 No 3 0x3E2 No 4 0x3E3 1 Note the following for access to be made via the Ethernet module Q series compatible E71 QE71 e Specify ActNetworkNumber and ActStationNumber using the values set in the target station side Q series compatible E71 or QE71 Set MNET 10 routing information in the Q series compatible E71 or QE71 parameter setting 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 2 As the I O address specify the value found by dividing the actual first O number by 16 To next page 3 DETAILS OF THE ACT CONTROLS MELSOFT TN OE e Property Default Value o I em lt q ActMultiDropChannelNumber Fixed to 0x00 0 Target station side Target station side Connected station ActNetworkNumber 0x00 Fixed to 0x00 module network module network side module network number number number Board No of IBM PC AT compatible side MELSECNET H board PORT
61. 6 ERROR CODES 4 FUNCTIONS MELSOFT 4 2 8 GetDevice Device data acquisition 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Acquires data from one point of device 3 Format Visual Basic VBA IRet object GetDevice szDevice IData Long IRet Returned value Output String szDevice Device name Input Long IData Acquired data Output Visual C IRet object GetDevice szDevice lplData Long IRet Returned value Output CString szDevice Device name Input Long IpIData Acquired data Output VBScript varRet object GetDevice varDevice pvarData VARIANT varRet Returned value LONG type Output VARIANT varDevice Device name iut character string type p VARIANT IpvarData Acquired data LONG type Output 4 Explanation The data of one point of device specified in szDevice varDevice is stored into IData IpIData or IpvarData 5 Device specifying methods Specify the devices in the following methods lt When bit device is specified gt lt When word device is specified gt Example MO Example DO 2 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lower Bytes 2 1 lt When double word device is specified gt lt When CN200 or later of FXCPU is specified gt Example K8MO Example CN200 M16 to M31 2 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
62. 71Q0C24 Control 3 27 3 3 15 ActAJ71UC24 ActMLAJ71UC24 contre 3 29 3 3 16 ActAJ71C24 ActMLAJ710C24 contra 3 31 3 3 17 ActQCPUQUSB ActMLQCPUQUSB contre 3 33 3 3 18 ActCCG4QnA ActMLCCG4QnA Control 3 35 3 3 19 ActCCG4A ActMLCCG4A Control 3 36 3 3 20 ActMnet10BD ActMLMnet10BD contra 3 37 3 3 21 ActMnetHBD ActMLMnetHBD contra 3 41 3322 AGIGGBD ACIMLC CBD Keel re EE 3 48 3 3 23 ActAnUBD ActMLANUBD Control 3 52 3 3 24 ACT ACIMELEM el re TEE EE 3 53 3 3 25 ActQCPUQBus ActMLQCPUQBUS contra 3 54 4 1 Programming INStrUCtIONS renneri nnn a ieii 4 1 4 2 Details of the Functions Dispatch Interface AAA 4 3 4 2 1 Open Communication line opening ver rernrnnrnn ver nennnnnrenvernernnenrernennnnnnerernennnenrersnnnennn 4 3 4 2 2 Close Communication line closing asrrrrrrvrrnrnnrnnrnrnrnrnnnnnrerrennnnnrenrernennrenrerrennennnerrernennnennerennnenne 4 4 4 2 3 ReadDeviceBlock Device batch read AAA 4 5 4 2 4 WriteDeviceBlock Device batch write AAA 4 7 4 2 5 ReadDeviceRandom Device random read A 4 9 4 2 6 WriteDeviceRandom Device random wrtel vnr nnnnnrrnrnnnnnrnnnnnerrnrrsnenrnneennr 4 11 4 2 7 SetDevice Device data setting A 4 13 4 2 8 GetDevice Device data ACQUISITION rrnvnnvnnnnnrnnvnnrnnnrnnvnnvernennnnnrenvernennrenrerrernnnnnerrernennerrernennnenne 4 14 4 2 9 ReadBuffer Buffer memory read 4 15 4 2 10 WriteBuffer Buffer memory write AAA 4 17 4 2 11 GetClockData Clock data read 4 19 4 2 12 SetCloc
63. A2USHCPU S1 FXCPU and motion controller CPU are fixed to 9600bps The A2USHCPU S1 may be set to 19200bps About use of the Q4ARCPU a When using the UDP IP protocol of Ethernet communication use the Q4ARCPU whose year and month of manufacture is 0012 or later and the QE71 whose function version is B or later b The duplexing function cannot be used Restrictions on use of the FXCPU a 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 b 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 10 About clock data of the PLC CPU a For the ACPU including the motion controller CPU clock data setting may be made only when the PLC CPU is in the STOP status For the QCPU Q mode QCPU A mode QnACPU and FXCPU clock data setting may be made if the PLC CPU is in the RUN status b For the AQJ2ZHCPU A2CCPU and A2CJCPU setting cannot be made as they do not have the clock function c For the ACPU setting can be made independently of whether the clock setting special relay M9028 is ON or OFF Note that the special relay M9028 turns OFF after execution For the QCPU Q mode QCPU A mode and QnACPU setting can be made independently of whether
64. ACPU control and their default values 1 Configuration 2 Property patterns Connected gere Station CPU elayed Station Relayed Network Connected Relayed QnACPU QCPU QCPU samp station CPU module Q mode A mode CPU ai sd MELSECNETH x IBM PC AT compatible Relayed network MELSECNET 10 MELSECNET I Relayed Relayed D Er station CPU module Ethernet x R eg link Gin JL Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 3 Property list repay Default Value o ope ty atterns Property Er 19200 ActBaudRate BAUDRATE BAUDRATE 9600 BAUDRATE 19200 BAUDRATE 38400 3 19200 8 ActControl TOR DTR OR Depending on used cable RTS 17 1023 Connected station 0x3FF Fixed to Ox3FF Fixed to Ox3FF Fixed to Ox3FF side module I O 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 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 O number by 16 2 Note the following points when making access via the Ethernet m
65. 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 Microsoft Visual Basic 6 0 Perform the following setting operation when using Visual Basic 1 Setting the include file i Hroiect Microso sual Basic desion 1 Start Visual Basic and choose the Project Add Module File Edit View Project Format Debug Run Qu q Add Form menu ES Add MDI Form Cea EA Add Module Eg 4 Add Class Module 5 8 Add User Control A Jabi ei Add Property Page py Te Add User Document l Add DHTML Page Vie Add Data Report Add WebClass ER ER Add File Ctrl D Au Remove Formi OO CH A References a Components Ctrl T Ke Project1 Properties Eat bail l 2 Choose the lt lt Existing gt gt tab and select ActDefine bas New Esisting Look in 3 Include el fe i El ActDefine bas is stored in lt User specified folder gt lt Act gt lt Include gt at the time of installation File name ActDefine bas Files of type Basic Files bas x Cancel Help I Don t show this dialog in the future 3 Registering ActDefine bas adds it to Modules Project1 Project1 E Forms FL Formi Formt EF Modules Module1 ActDefine bas 2 ABOUT THE ACT CONTROLS MELSOF
66. 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 1 It can be set for the E71 of AJ71E71 S3 or later 14 Replacement of Ethernet module If you changed the Ethernet module during Ethernet communication due to debugging failure or like the other node IBM PC AT compatible must be restarted Since the Ethernet addresses MAC addresses differ between devices 15 Software version of CC Link master local module As the CC Link master local module used in CC Link communication or CC Link G4 communication only when the AJ65BT G4 is used use the module of software version N or later The module of software version M or earlier will not operate properly 16 Software version of CC Link G4 module As the CC Link G4 module used in CC Link G4 communication only when the AJ65BT G4 is used use the module of software version D or later The module of software version C or earlier will not operate properly 17 About relaying from the MELSECNET 10 loaded station When
67. BD ActMLMnetHBD control The following table indicates the properties possessed by the ActMnetHBD ActMLMnetHBD control and their default values 1 When access is made via MELSECNET H mode using QCPU Q mode as connected station CPU a Configuration Connected MELSECNET H Relayed station CPU module module ayed network Relayed Relayed station CPU module Tid _ re IBM PC AT compatible b Property patterns Connected Station CPU Relayed Station CPU 2 Q mode A mode CPU 1 MELSEGNETH x x x x MELSECNET 10 a Fase EE Peng f x x x x Own Board Relayed Network Sonate fa fd CC Link x CO Zen Lee pattern within SEN x Inaccessible 1 Including motion controller CPU 2 Operates only when QCPU Q mode is used c Property list Property Patterns b M a A a TT 5 5 1 1025 ActCpuType CPU_BOARD CPU type corresponding to target station Target station side Target station side For single CPU For single CPU Ox3FF fixed 0x3FF fixed For multiple CPUs For multiple CPUs ActDestinationlONumber Gog Fixed to 0x00 Fixed to 0x00 Connected CPU 0x3FF Connected CPU 0x3FF No 1 0x3E0 No 1 0x3E0 No 2 0x3E1 No 2 0x3E1 No 3 Ox3E2 3 No 4 0x3E3 ActDidPropertyBit Fixed to 0x00 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 ActDsidPropertyBit ise Fixed to 0x00 Fixed to 0x01 F
68. C AT compatible 0x10000002 failed Reinstall MX Component H P 0x10000003 Open failed DiskDrive the lBM PG AT compatible Exit the program and restart the IBM PC AT compatible Execute again after some time 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 0x10000011 Memory securing error Exit the program and restart the IBM PC AT compatible Reinstall MX Component ox10000017 The specified size number of devices is unauthorised 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 MX Component 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 program and restart the IBM PC AT compatible Exit other programs and secure free memory area 0x10000040 No license error 0xF0000001 The license is not given to the IBM PC AT 0x1000000C Using the license FD give the license to the IBM PC AT compatible compatible Set data read error Specify the correct logical station number 0xF0000002 Reading of the set data of
69. CP ActMLAJ71E71TCP Used for Ethernet communication where the connected module is the E71 TCP IP communication ActAJ71E71UDP ActMLAJ71E71UDP Used for Ethernet communication where the connected module is the E71 UDP IP communication ActQCPUQ ActMLOCPUQ Used for CPU COM communication where the connected PLC CPU is the QCPU Q mode ActQCPUA ActMLQCPUA Used for CPU COM communication where the connected PLC CPU is the QCPU A mode ActQnACPU ActMLOQnACPU Used for CPU COM communication where the connected PLC CPU is the QnACPU Used for CPU COM communication where the connected PLC CPU is the A P ActMLACP Ge base ez including motion controller CPU ActEXCPU ActMLFXCPU Used for CPU COM communication where the connected PLC CPU is the EA FXCPU ActQJ71C24 ActMLQJ71C24 Used for computer link communication where the connected module is the series compatible C24 ActAJ71QC24 ActMLAJ71QC24 NN den link communication where the connected module is the ActAJ71UC24 ActMLAJ71UC24 Used for computer link communication where the connected module is the UC24 ActAJ71C24 ActMLAJ71C24 Used for computer link communication where the connected module is the C24 ActQCPUQUSB ActMLQCPUQUSB oe USB communication where the connected PLC CPU is the QCPU Q A CCG Q A ActM CCG Q A Used fo CC L k G4 co unication where the connected module is the Used for CC Link G4 communication where the connected module is the ActCCG4A ActML 4A HEGE GE AJ65BT G4 A mode
70. CT controls are indicated below Control Name Usabilit Control Name Usabilit ActEasylF ActMLEasylF ActAJ71QE71UDP ActMLAJ71QE71UDP O ActQCPUQ ActMLQCPUQ ActAJ71E71TCP ActMLAJ71E71TCP ActQCPUA ActMLQCPUA ActAJ71E71UDP ActMLAJ71E71UDP JActQnACPU ActMLQNACPU AxtQCPUQUSB ActMLQCPUQUSB AtACPU ActMLACPU J ArtooGaanaaetMLocGaom O ActEXCPU ActMLFXCPU JActCCG4A Accu O Ed sen C24 ActMLAJT1 C24 ActAnUBD ActMLAnUBD hamrer imamen O IActQu71E71UDP ActMLQJ71E71UDP CG ArtQcpuamus adtMLQcPUaBs O 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 MELSECNETI II 4 Depending on the communication path Ethernet communication MELSECNET 10 communication etc there will be restrictions as placed on the corresponding communication path controls 2 Feature Writes time to the clock data of the PLC CPU 3 Format Visual Basic VBA 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 iDay 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 Mi
71. E PROGRAMS 3 Sample file list MELSOFT The sample files are installed into the following folders at default installation C MELSEC Act Sample Vc SampleEng sampleEng rc C MELSEC Act Sample Vc SampleEng sampleEng dsw C MELSEC Act Sample Vc SampleEng sampleEng dsp C MELSEC Act Sample Vc SampleEng sampleEng cpp C MELSEC Act Sample Vc SampleEng sampleEngDlg cpp C MELSEC Act Sample Vc SampleEng ActDefine h C MELSEC Act Sample Vc SampleEng actaj71qe71udp cpp C MELSEC Act Sample Vc SampleEng actaj71qe71udp h C MELSEC Act Sample Vc SampleEng acteasyif cpp C MELSEC Act Sample Vc SampleEng acteasyif h Resource file Project work space Project file Class define file Dialog Implementation source file ACT Header file ActAJ71QE71UDP Control source file ActAJ71QE71UDP Control header file ActEasylF Control source file ActEasylF Control header file 4 Screen The sample program screen will be explained fe CustomSampleEng x e Control C ActEasylf Method Open Communication GetCpuType Result Return Device Name GetDevice Se Device Value 0 SetDevice Output Close Communication Close Control 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 Used to choose the control to be used Close Communication Used to close the communication line Used
72. Enter the logical station number Enter the device name from where data will be read Enter the number of points of the devices from where data will be read MonitorStart Used to start monitor processing b Data getting screen SampleControl asp The data getting screen is a page used to store the data entered on the data input screen into the global variables and check them for errors This screen is not displayed on the Internet Explorer screen 5 SAMPLE PROGRAMS MELSOFT c Data display screen SampleMon asp A http 10 97 29 49 ActTest Eng SampleMon E asp Microsoft Internet Explorer File Edit View Favorites Tools Help Kal S eh ole ma ol Back Stop Refresh Home Search Favorites Histo Mail Prit Edt Address htip 10 97 29 49 ActT est Eng SampleMonE asp ov ope Links Monitor Timing 5 E LogicalStationNumber 0 DeviceName SD400 DeviceSize 10 Message Return Code 0 CpuType Q25HCPU ReadData Hex 0 1 2 3 4 5 6 7 0x00000000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 Ox0000 Ox0000 2 0x00000008 0x0000 0x0000 El Back z E Done x Local intranet 6 ERROR CODES MELSOFT 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
73. ISHI Act4 CPU Control MITSUBISHI Act FBD Control Cancel MITSUBISHI Act J71C24 Control MITSUBISHI Act J71E71TCP Control MITSUBISHI Act J71E71UDP Control MITSUBISHI Act J710C24 Control 4 MITSUBISHI Act J710E71TCP Contre MITSUBISHI Act4J71QE71UDP Contr MITSUBISHI Act4J71UC24 Control MITSUBISHI Act nUBD Control p Path C MELSECSACTSCONTROL NACTPCCOM DLL 3 The selected ACT control is pasted to the form Cancel 2 ABOUT THE ACT CONTROLS MELSOFT 3 Adding the member variable ees ER 1 Click the form to choose Class Wizard LG Cancel d i EE 2 When the left dialog box appears choose the lt lt Member Message Maps Member Variables Automation ActiveX Events Class Info Project Class name eae Variables gt gt tab ep zl fact x SE 3 5 5 CAL AMyProedlsVACTVAET Th CA AMyPteetsVACT VALT opp ee 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 D z 7 3 When the left screen appears read the information and A The Aniya Gore ITS Ee has not been inserted into the project Developer Studio will do li k th OK b tt i OK n Cancel ene S SS l Confirm Classes II 4 Check the class checkbox and click the button The checked class es will be generated from the Activex Control Click on class name to browse or edit its at
74. J71QC24 O E ES ter ActMLAJ71C24 ActAnUBD ActMLANUBD Ox6 ActQJ71E71TCP ActMLQJ71E71TCP a ActLLT ActMLLLT e E ActMLQJ71E71UDP ActQCPUQBus ActMLQCPUQBus HE EGNE e O Usable x Unusable An error is returned if access to the ANUCPU QCPU A mode A173UHCPU S1 or BE 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 4 An error is returned if the CPU is other than FX2n and FXanc 5 An error is returned if the CPU is other than FXon Eva FX2c FX2n and FXanc 6 An error is returned if access to the QnACPU is made via the MELSECNET 10 or MELSECNET II 7 Depending on the communication path Ethernet communication MELSECNET 10 communication etc there will be restrictions as placed on the corresponding communication path controls 2 Feature Writes values to the buffer memory of the special function module 3 Format Visual Basic VBA IRet object WriteBuffer IStartlO Address IWriteSize iData 0 Long IRet Returned value Output Long IStartlO First O 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 Visual C IRet object WriteBuffer IStartlO Address IWriteSize IpsData Long IRet Returned value Output Long IStartlO First I O number of module to Input where values will be
75. MX Component Version 2 MITSUBI SHI m MELSOFT GJ Om Mh intenance rogramming MELSOFT Integrated FA Software l SW2D5C ACT E 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 Nn Indicates that incorrect handling may cause hazardous conditions D DANGER resulting in death or severe injury 7 N CAUTION Indicates that incorrect handling may cause hazardous conditions resulting in medium or slight personal injury or physical damage NS Note that the CAUTION 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 lt gt DANGER e When performing data changes or status control from the personal computer to the running PLC configure up an interlock circuit outside the PLC system to ensure
76. NET 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 To next page 3 DETAILS OF THE ACT CONTROLS Property Patterns Ge Ge EE 16 Target station side For single CPU FF f ee Ox3FF fixed For multiple CPUs e 2 i DEE E For multiple CPUs Connected station Connected station ActlONumber x 1 i Connected CPU 0x3FF side module I O side module UO No 1 0x3E0 No 1 0x3E0 address address No 2 Ox3E1 No 2 Ox3E1 ActMultiDropChannelNumber Fixed to 0x00 Fixed to 0x00 0x00 or 0x02 Fixed to 0x00 0 Target station side ActNetworkNumber 0x00 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 MELSECNETHH 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 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 VO number by 16 gt 2 Note the
77. O varStartlO are read e When using the Act ML FXCPU control or Act ML LLT control specify the block number 0 to 7 of the special expansion equipment as the module s first I O number and any of 0 to 32767 as the buffer memory address e Reserve an array of IReadSize varReadSize or more for iData IpIData or lpvarData 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 lpsData or lpvarData prepare a memory area having the number of points specified in IReadSize varReadSize If there is no memory area a critical phenomenon such as an application error may occur 3 When buffer memory read ReadBuffer is performed for the QCPU Q mode read operation may be performed for only the Q series dedicated module Read from the shared memory of the QCPU Q mode cannot be performed either 4 FUNCTIONS MELSOFT 4 2 10 WriteBuffer Buffer memory write 1 Applicable ACT controls The applicable ACT controls are indicated below Control Name Usabilit Control Name Usabilit SS ActMLQCPUQ ActAJ71E71TCP ActMLAJ71E71TCP RCCPUA AchMLacPua 0 ActQnACPU ActMLQNACPU AxtQCPUQUSB ActMLQCPUQUSB ACtACPU ActMLACPU JActCCG4QNA ActMLCCG4anA O ActCCG4A ActMLCCG4A O IActQu71024 ActMLQJ71024 O ActAJ71QC24 ActMLA
78. P 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 CHAPTER 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 button to close the communication line once then change the control and open the line again 5 SAMPL
79. PU module setting and cable status Exit the program and restart the IBM PC AT compatible Reinstall MX Component Review the block specifying number in the device character string specified in the method Review the system e g PLC CPU module setting and cable status Check the cable Exit the program and restart the IBM PC AT compatible Set the correct CPU type as the CPU type of the property Set the correct CPU type on the communication settings utility Review the system e g PLC CPU module setting and cable status 6 ERROR CODES MELSOFT Error Definition Station number specifying error 0x01802016 The method does not support the operation Review the station number performed for the specified station number Written clock data error 0x0180201C Clock data specified for write cannot be written Review the clock data to be written properly since that data is in error Online clock data write error Write of clock data failed 180201D PI the PLC CPU in the STOP status SS EEH Clock data cannot be written since the PLC ae PE SARN CPU is during RUN Check the value of the first I O number specified in the First I O number error method 0x01802020 The first I O number specified in the method is Using the GPP function check the PLC CPU parameters an unauthorised value I O assignment Exit the program and restart the IBM PC AT compatible First address error Check the value of the buffer address specified in
80. PU using the ActEasylF control This sample program was created on Access 2000 1 Using method Open the database Type the logical station number which was specified in communication settings on the communication setting utility in the LogicalStationNumber text box Type the logging interval in the LoggingTiming text box Clicking the LoggingStart button starts logging Clicking the LoggingStop button stops logging Note that the logging data on the screen are not cleared If an error occurs during execution the error message and error code appear in the message box If an error has occurred refer to 6 ERROR CODES and remove the error cause Precautions for use of the sample program a Before running this sample program make communication settings on the communication setting utility b When changing the input value click the button to stop logging once then change the input value and click the button to start logging c In this sample program devices DO to D4 are preset as the devices to be monitored and D10 to 17 as the devices to be logged Also monitoring is designed to occur at 1 second intervals d This sample program logs device values up to 100 times If the number of logging times exceeds 100 the oldest logging data is deleted and the newest logging data is registered 3 Sample file By default the sample program is installed into the following folder C MELSEC Act Samp
81. QO6HCPU A QCPU Q mode Generic term of the Q00JCPU QO0CPU Q01CPU Q02CPU Q02HCPU QO6HCPU Q12HCPU and Q25HCPU Note that especially when the CPU is indicated as a different model the QOOJCPU QOOCPU and QO1CPU are described as the Q00J Q00 Q01CPU and the QO2CPU Q02HCPU Q06HCPU Q12HCPU and Q25HCPU as the Q02 Q02H Q06H Q12H Q25HCPU FXCPU Generic term of the FXo FXos FXon FX1 FX1N FX1NC FX1S FX2 FX2c FX2n 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 Q mode QCPU A mode QnACPU ACPU FXCPU and motion controller CPU Generic term of the A1SCPUC24 R2 A1SJ71C24 PRF A1SJ71C24 R2 A1SJ71C24 R4 A2CCPUC24 A2CCPUC24 PRF AJ71C24 S6 and AJ71C24 58 Generic term of the AJ71UC24 A1SJ71UC24 R2 A1SJ71UC24 R4 and A1SJ71UC24 PRF Generic term of the AJ71QC24 AJ71QC24 R2 AJ71QC24 R4 A1SJ71QC24 R2 and A1SJ71QC24 R2 Generic term of the AJ71QC24N AJ71QC24N R2 AJ71QC24N R4 A1SJ71QC24N and A1SJ71QC24N R2 QC24 N Generic term of the QC24 and QC24N Q series compatible C24 Generic term of the QJ71C24 and QJ71C24 R2 Generic Term Abbreviation Description Computer link module Serial communication module Generic term of the C24 UC24 QC24 N and Q series compatible C24 Described as the serial communication module especially to indicate the QC24 N
82. T 2 Registering the ACT controls NEE 1 Choose the Project Components menu File Edit View Project Format Debug Run Qi D Add Form X 151 Add MDI Form i Add Module XI Add Class Module 181 Add User Control Il Add Property Page W i Add User Document Add DHTML Page 2 Add Data Report Add WebClass Add File Ctrl D i General gt sl 7 l rz Remove Formi References Project1 Properties l 2 Select the lt lt Controls gt gt tab and choose the DLL which ee includes the ACT controls you want to use a a pne H AA Ja e C Microsoft Winsock Control 6 0 J MITSUBISHI ActBoard Controls CI MITSUBISHI ActCcG4 Controls MI MITSUBISHI ActComLk Controls CJ MITSUBISHI ActEther Controls CI MITSUBISHI ActLlt Controls CI MITSUBISHI ActMulti Controls MITSUBISHI ActPcCom Controls MITSUBISHI ActPcUsb Controls J MITSUBISHI ActWizard Control CIMSFlexGrid Wizard Cl Outrider SpinButton Control C Package and Deployment Wizard v Las D I Selected Items Only Active Setup Control Library Location C WINDOWS SYSTEM ASCTRLS OCX Cancel Apply gs Di Gi Bi Di 3 The ACT controls included in the selected DLL are added to the toolbox 2 ABOUT THE ACT CONTROLS MELSOFT 2 1 2 When using Microsoft Visual C 6 0 Perform the following setting operation when using Visual C 1 Setting the
83. a lplRetCode HRESULT hResult Returned value of COM Output BSTR szDevice Device name Input LONG ISize Number of read points Input LONG gt IpIData Read device values Output LONG lpIRetCode Returned value of communication function Output 4 3 4 WriteDeviceBlock Device batch write hResult object WriteDeviceBlock szDevice ISize IpIData IpIRetCode HRESULT hResult Returned value of COM Output BSTR szDevice Device name Input LONG ISize Number of write points Input LONG lpIData Written device values Input LONG IpIRetCode Returned value of communication Output function 4 FUNCTIONS MELSOFT 4 3 5 ReadDeviceRandom Device random read hResult object ReadDeviceBlock szDevice ISize IpIData IpIRetCode HRESULT hResult Returned value of COM Output BSTR szDevice Device name Input LONG ISize Number of read points Input LONG gt IpIData Read device values Output LONG IpIRetCode Returned value of communication function Output 4 3 6 WriteDeviceRandom Device random write hResult object WriteDeviceRandom szDeviceList ISize IpIData IpIRetCode HRESULT hResult Returned value of COM Output BSTR szDevice Device name Input LONG ISize Number of write points Input LONG lpIData Written device values Input LONG lpIRetCode Returned value of communication function Output 4 3 7 SetDevice Device data setting hResult object SetDevice szDeviceList IpIData IpIRetCode HRESULT hResult Returned
84. a 0 Long String Long Long Long CString Long Long VARIANT VARIANT VARIANT VARIANT Explanation e The device values for ISize varSize are batch read from the devices beginning with the device specified in szDevice varDevice e The read device values are stored in IData IpIData or IpvarData e Reserve an array of ISize varSize or more for Data IpIData or IpvarData IRet szDevice ISize IData n IRet szDevice ISize gt pIData varRet varDevice varSize IpvarData This function is available for all ACT controls Returned value Device name Number of read points Read device values Returned value Device name Number of read points Read device values Returned value LONG type Device name character string type Number of read points LONG type Read device values LONG array type MELSOFT Output Input Input Output Visual C IRet object ReadDeviceBlock szDevice ISize p Data Output Input Input Output VBScript varRet object ReadDeviceBlock varDevice varSize lpvarData Output Input Input Output 4 FUNCTIONS MELSOFT 5 Device specifying methods Specify the devices in the following methods lt When bit device is specified gt lt When word device is specified gt Example 3 points from MO Example 3 points from DO 2 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lower Bytes MO to M15 2 7 1 M16 to M31 2 1 M32 to MAT 2 GO jo lt When CN200 an
85. al communication function of Q00J Q00 Q01CPU When the following conditions are all satisfied communication between the personal computer and the Q00J Q00 Q01CPU is made at 9600bps speed 1 The connected CPU is the QOOCPU or QO1CPU 2 The serial communication function of the connected CPU is valid 3 The personal computer side baud rate setting differs from the Q00J Q00 Q01CPU side baud rate setting To increase the communication speed match the personal computer side baud rate with the Q00J Q00 Q01CPU side baud rate 39 Precautions for starting multiple Excel files on Windows Me Note that Windows Me has been confirmed to stop if you run multiple Excel files which use many control objects This phenomenon is not attributable to this product a Conditions on which this phenomenon has been confirmed to occur Graphic driver Matrox make MGA Mystique display driver OS Windows Me English version Number of controls pasted to Excel files A total of 150 or more controls used in the whole BOOK lt Other devices checked by Mitsubishi reference gt CPU Pentium 166MHz Memory 64MB Hard disk 8GB free space 6GB b Cause The phenomenon has been confirmed to occur when the Matrox make MGA Mystique graphic card display driver is used This is because Version 4 12 of the MGA Mystique graphic card display driver is not compatible with Windows Me c How to judge whether the phenomenon is the same or not After changi
86. ale Relayed Station CPU wn Boar elayed Networl QnACPU QCPU QCPU QnA ACPU FXCPU Q mode A mode CPU 1 IMELSEGNETM x x x x x w schen loloj x A a MMELSEONET N RER WEIER Ethemet x x 19 a Aa ccam x x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list zs ert atens Property Default Value Teea HE GE b Target station side For single CPU Ox3FF fixed For multiple CPUs Connected station Fixed to 0x00 Fixed to 0x3FF Connected CPU 0x3FF Side relayed module No 1 0x3E0 I O address No 2 0x3E1 No 3 Ox3E2 No 4 0x3E3 ActMultiDropChannelNumber Fixed to 0x00 Target station side Target station side Connected station ActNetworkNumber ol Fixed to 0x00 module network module network side module network number number number acPonnumber Board No of IBM PC AT compatible side MELSECNET 10 board Fy 1 PORT 1 to PORT 4 first to fourth boards 255 Target station side Target station side Connected station ActStationNumber OxFF Fixed to OxFF module station module station side module station number number number Target station side ActUnitNumber Fixed to 0x00 Fixed to 0x00 Fixed to 0x00 module station fo number 1 As the I O address specify the value found by dividing the actual first O number by 16 3 40 3 40 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 21 ActMnetH
87. 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 NRE Shared memory open error Check whether the GX Simulator has started S 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 0101808108 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 f Exit the program and restart the IBM PC AT compatible Data send failed isie Queue clear error Exit the program and restart the IBM PC AT compatible Ge Clearing of the COM port queue failed 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 com
88. ast access target station is made invalid Specify the packet type for communication with the A series or QnA series Ethernet module Property value r Description Property window input value PACKET_ASCII 2 ASCII packet PACKET_BINARY 3 Binary packet Specify the password set to the Q series compatible E71 to unlock that password It is ignored if the communication target is other than the Q series compatible E71 when the ActEasylF or ActMLEasylF control is used Specifying any characters other than alphanumeric characters will result in a character code conversion error 0xF1000001 at the Open time ActPassword BSTR 3 DETAILS OF THE ACT CONTROLS MELSOFT 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 25 is provided below lt How to use the manual in Section 3 3 1 to Section 3 3 25 gt Configuration Sketch of system configuration 3 DETAILS OF THE ACT ZONTROLS 3 3 2 ActQJ71E71TCP ActMLQJ71E71TCP control The following table indicates the properties possessed by the ActQJ71E71TCP ActMLQJ71E71TCP control apd theip default vale 1 Configuration 2 Property patterns Connected Station CPU Relayed Station CPU Connected Q series Relayed Relayed Network QCPU y QCPU QCPU QnA ACPU station CPU tible E71 module a K Q mode CPU 1 Q mode
89. ated normally but operation access to S FALSE Normal termination PLO failed E POINTER Abnormal termination The pointer passed to the function is abnormal E OUTOFMEMORY Abnormal termination Memory securing or object creation failed E FAIL Abnormal termination An indefinite error occurred 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 MELSOFT MEMO MX Component Version 2 Programming Manual MODEL MELS2 ACTE P E MODEL 13JF65 SH NA 080155 A 0104 MEE aa MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE MITSUBISHI DENKI BLDG MARUNOUCHI TOKYO 100 8310 TELEX J24532 CABLE MELCO TOKYO NAGOYA WORKS 1 14 YADA MINAMI 5 HIGASHI KU NAGOYA JAPAN When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission Specifications subject to change without notice
90. atible b Property patterns BE RET BE CPU elayed Station Own Board Qopu ae Network Gey acpu ana ac een A mode Q mode A mode CPU zi IMELSEGNETM x x x x x IMeLSEGNETA0 x x x x x Metseonetn gt ff I x x EE ceim Ise x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list T a Patterns Property Default Value ActCpuT WE CPU t ding to t t stati ctCpuType CPU BOARD ype corresponding to target station ActDestinationlONumber Fixed to 0x00 ActlONumber Fixed to 0x00 BEE Ge pen O 0 ActNetworkNumber Fixed to 0x00 0x00 ActPortNumber Board No of IBM PC AT compatible side CC Link board CH 1 PORT 1 to PORT 4 first to fourth boards Target station side CC Link module station ActStationNumber Fixed to OxFF g Se number ActUnitNumber Fixed to 0x00 Fe Ge Seene 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 When connected station CPU is QnACPU a Configuration Connected Relayed station CPU CG Link module module Relayed network Relayed Relayed station CPU module IBM PC AT compatible b Property patterns BE RET BE CPU elayed Station QnACPU QCPU QCPU QnA ACPU FXCPU Q mode A mode CPU 1 MELSEGNETM x x x x x MELSEGNETA0 x x x x 7 a Merseonerm x x
91. ation Property value PE i Description i Property window input value E NO PARITY o o pari ai ODD_PARITY 1 EVEN_PARITY_ 2 3 DETAILS OF THE ACT CONTROLS MELSOFT Property Name Type Specify the number of stop bits used for computer link communication He er ActStopBit Property window input value LONG STOPBIT_ONE 0 STOPAITS TWO Specify the control setting of the signal line Property value Description aee window input value ActControl TRO DTR 0x01 DTR 0x01 DTR DTRconto LONG TRC RTS RTS control TRC DRT AND RTS on DTR control and RTS control TRC_DTR_OR_RTS 0x08 DTR control or RTS control ActHostAddress BSTR Pointer which indicates the connection host name IP address for Ethernet communication ActCpuTimeOut LONG Specify the CPU watchdog timer for Ethernet communication Unit x 250ms Set the time out value of communication between the IBM PC AT compatible and PLC Unit mme ActTimeOut LONG For MX Component depending on the communication path the internal processing of time out may be repeated 3 times In this case it may take 3 times the time out value that has been set Specify whether sumcheck is made or not Valid only via computer link module ActSumCheck Property value Description Property window input value LONG vene NO SUM CHECK 0 Sum oneek 0 Specify the requesting network number when the QE71 or Q series compatible E71 is ActSourceNetworkN
92. ation after the above operation the function will be performed properly in and after the second communications 20 Precautions for GX Simulator communication Before executing the monitor utility communication setting utility or user program make sure that GX Simulator and GX Developer are operating In addition do not terminate the GX Simulator and GX Developer while the user program is running If you do so you will not be able to terminate the user program normally 21 About forced termination of processes during communication If communication is being made with the same type of control open for multiple processes forcing one process to be terminated by Task Manager or the like may stop the other processes at the communication function execution area 22 About sample programs test programs and sample sequence programs a Sample programs test programs The sample programs are attached for your reference to create user programs The test programs are attached to conduct communication tests Use these programs on your own responsibility b Sample sequence programs The sample sequence programs attached to MX Component assume that only an IBM PC AT compatible personal computer and Ethernet modules exist in the network Depending on your system configuration and parameter settings the programs must be modified Make corrections to make the programs optimum for your system Also use the sample sequence programs on your own respon
93. controller CPU 3 Property list Property Patterns Er wee Te 0 0 Connected station ActConnectUnitNumber 1 Fixed to 0x00 side module station Fixed to 0x00 Fixed to 0x00 0x00 number ActCpuT CPUt ding to t t stati ctCpuType CPU_Q02CPU ype corresponding to target station Target station side Target station side For single CPU For single CPU Ox3FF fixed Ox3FF fixed 0 For multiple CPUs For multiple CPUs ActDestinationlONumber 0x00 Fixed to 0x00 Fixed to 0x00 Connected CPU 0x3FF Connected CPU 0x3FF No 1 0x3E0 No 1 0x3E0 No 2 0x3E1 No 2 0x3E1 No 3 0x3E2 EEN No 4 0x3E3 At ActDidPropertyBit 0x01 Fixed to 0x01 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 ActDsidPropertyBit Fixed to 0x01 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 lActHostAddress Eesen 1 1 Host name or IP address of connected station side module Target station side For single CPU Ox3FF fixed For multiple CPUs Connected station Connected station Connected CPU 0x3FF side relayed module side relayed module No 1 0x3Eo O address I O address No 2 0x3E1 For single CPU Ox3FF fixed For multiple CPUs Connected CPU 0x3FF No 1 0x3E0 No 2 0x3E1 1 For access to another station via MELSECNET 10 for the property pattern of 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 7 As the I O address
94. ct ReadDeviceRandom szDeviceList ISize IpIData Long IRet Returned value Output CString szDeviceList Device name Input Long ISize Number of read points Input Long gt IpIData Read device values Output VBScript varRet object ReadDeviceRandomf varDeviceList varSize lpvarData VARIANT IRet Returned value LONG type Output VARIANT szDeviceList Device name character string type Input VARIANT ISize Number of read points LONG type Input Read device values VARIANT IDat Output San LONG array type P 4 Explanation e The device values for ISize varSize are read from the device group specified in szDeviceList varDeviceList e The read device values are stored in IData IpIData or IpvarData e 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 Visual Basic VBA VBScript DO amp voLf amp D1 amp vbLf amp D2 Visual C DO nD1 nD2 e Reserve an array of ISize varSize or more for IData IpIData or IpvarData 4 FUNCTIONS MELSOFT 5 Device specifying methods Specify the devices in the following methods Example 1 When devices are specified as follows 3 points When using Visual Basic VBA VBScript MO amp vbLf amp DO amp vbLf amp K8MO When using Visual C MO nDO nK8MO 2 Upper Bytes 2 Lower Bytes T a M16 to M31 2 MO to M15 2 Example 2 When dev
95. cted station side CC Link module station number ActControl Re DTR OR Depending on used cable RTS 17 1023 Connected station ActlONumber x 1 OX3FF Fixed to Ox3FF Fixed to Ox3FF Fixed to Ox3FF side relayed module I O address 0 Target station side ActNetworkNumber 0x00 Fixed to 0x00 module network Fixed to 0x00 Fixed to 0x00 number 1 ae 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 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 O number by 16 2 Note the following points when making access via the Ethernet module QE71 e For ActNetworkNumber and ActStationNumber specify the value set in the parameter setting of the target station side QE71 e 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 35 3 35 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 19 ActCCG4A ActMLCCGA4A control The following table indicates the properties possessed by the ActCCG4A ActMLCCGA4A control an
96. d later of FXCPU are specified gt lt When FD device is specified 4 word device gt 6 points from CN200 3 6 points from FDO mple 2 Upper Bytes 2 Lower Bytes L of CN200 H of CN200 2 Upper Bytes 2 Lower Bytes LL of FDO LH of FDO 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 6 Returned value Normal termination 0 is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES POINT 1 The maximum number of read points that may be specified in ISize varSize 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 IpIData or lpvarData prepare a memory area having the number of points specified in ISize varSize If there is no memory area a critical phenomenon such as an application error may occur 4 FUNCTIONS MELSOFT 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 Format Visual Basic VBA IRet object WriteDeviceBlock szDevice ISize IData 0 Long IRet Returned value Output String szDevice Device name Input Long ISize Number of wri
97. d their default values 1 Configuration Relayed module Connected station CPU 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 A mode CPU 1 Q mode A mode CPU 1 IMELSECNETM x x x x x Metsecnetiio x x x x x o x Masoem x x x x x Ethernet x x x x x Computerin x x x x x ecam S x x x x x Property pattern within circle O Accessible x Inaccessible 1 Including motion controller CPU 3 Property list Property Patterns GE GE 8 TOR DTR OR Depending on used cable RTS 262 ActCpuType CPU A1NGPU CPU type corresponding to target station 1 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 MELSOFT 3 3 20 ActMnet10BD ActMLMnet10BD control The following table indicates the properties possessed by the ActMnet10BD ActMLMnet10BD 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 modu
98. d to OxFF module station Fixed to OxFF Fixed to OxFF number QCPU Q mode 0x00 MELSECNETHH 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 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 O number by 16 2 Note the following points when making access via the Ethernet module Q series compatible E71 QE71 e 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 MELSOFT 3 DETAILS OF THE ACT CONTROLS MELSOFT 2 When connected station side Q series compatible C24 is used for multidrop link with relayed module a Configuration b Property patterns i Connected Q series compatible Station CPU Relayed Station CPU Connected station Multidrop link Q mode Q mode A mode CPU
99. d using Microsoft Visual Basic 6 0 Microsoft Visual C 6 0 VBA and VBScript The sample programs are attached to create user programs Please use them on your responsibility 5 1 Visual Basic Sample Program This sample program is designed to read PLC CPU data and read write device values using the ActEasylF control and ActACPU control This sample program was created on Visual Basic 6 0 1 Using method Load the form and choose the control to be used Click the button to open the communication line When you selected the ActEasylF control type the logical number which was specified in communication settings on the communication setting utility in the LogicalStationNumber text box before clicking the button Click the button to close the communication line When you click the GetCpuType button the type and type code of the PLC CPU to which the line is currently connected appear in the Data list box Typing the device names from where you want to read data and the number of points in the DeviceName and DeviceSize text boxes respectively and clicking the ReadDeviceRandom button displays the device data in the Data list box Typing the device names to where you want to write data and the number of points in the DeviceName and DeviceSize text boxes respectively and the device values to be written in the DeviceData text box and clicking the WriteDeviceRandom button writes the device valu
100. ddress No 2 0x3E1 ActMultiDropChannelNumber Fixed to 0x00 Fixed to 0x00 0x00 or 0x02 Fixed to 0x00 Target station side Connected station Connected station ActNetworkNumber De Fixed to 0x00 module network side module network side module network number number number Board No of IBM PC AT compatible side MELSECNET H board aoonumder N 1 PORT 1 to PORT 4 first to fourth boards Target station side Connected station Connected station 255 y f j 8 ActStationNumber OxFF Fixed to OxFF module station side module station side module station number number number Target station side Target station side ActUnitNumber a 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 VO number by 16 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 When access is made via MELSECNET 10 mode using QCPU A mode or ACPU as connected station CPU Operates when the MELSECNET H board is in the MELSECNET 10 mode a Configuration Connected MELSECNET H Relayed station CPU module module Relayed network station CPU module Relayed Relayed IBM PC AT compatible b Property patterns Connected Station CPU Station CPU Relayed Station CPU Own Board CPU Relayed Network CPU CPU A ACPU y ACPU 1 4 9 ed FXCPU A mode Q mode A mode CPU x1 vesener o
101. e ACT contra 2 1 2 1 1 When using Microsoft Visual Basic GD 2 1 2 1 2 When using Microsoft Visual C 60 2 3 2 1 3 When using VBA WE 2 7 21 4 When Tale AE TT 2 9 2 2 Programming Procedures AA 2 10 2 21 When using WEE NEE 2 10 22 22 When USING visual E 2 11 2 2 3 When using VBA EE 2 12 2 2 4 When using Ver 2 13 29 Device WEEN 2 14 2 4 Accessible Devices and Hanges A 2 16 3 1 Details of the ACT Control 3 1 3 2 Details of the Propisana a a highs ded tical EES NaF ana ti EPE CAA br AF dE EPRI ERAF AEA ER IRANA 3 2 3 3 Lists of Properties Possessed by the ACT Controls srnrnnnvnnrnnvnnnnnvnnvenvernennrenvenvennnnnrrnrerrennnenrerrernennn 3 7 3 3 1 ActEasylF ActMLEasylF Control 3 8 3 3 2 ActQJ71E71TCP AcM OlEOTChcontol 3 9 3 3 3 ActQJ71E71UDP ActMLQJ71E71UDP contra 3 11 3 3 4 ActAJ71QE71TCP AM AIOE TChReontrol 3 13 3 3 5 ActAJ71QE71UDP ActMLAJ7 1QE71UDP contra 3 14 3 3 6 ActAJ71E71TCP AcHMLAToOEOTChPRcontol 3 15 A 12 A 12 3 3 7 ActAJ71E71UDP AcML AI E OUDPeontrol 3 16 3 3 8 ActQCPUQ ActMLQCPUQ contra 3 17 3 3 9 ActQCPUA ActMLQCPUA Control 3 19 3 3 10 ActQnACPU ActMLQnACPU control murnvvvvvnvvvvvvrernvvevrnrvrernrnarvevnrvreerernvrerrernrversrsereerersvreesernveen 3 20 33 ae ee PU ActIMEAG RU COMO ics saka rasretm aaret 3 21 3 3 42 ActEXCPU ActMLFXGPU contfoluaslnanisanskenndenneeninianerenias nngen tanten 3 22 3 3 13 ActQJ71C24 ActMLQJ71C24 contra 3 23 3 3 14 ActAJ71QC24 ActMLAJ
102. eeDeviceStatus 0xF1000009 Monitored device data registration error method execute the EntryDeviceStatus method again Register the device points between 1 and 20 in the EntryDeviceStaus method Start end the device status monitor processing again in Device status monitor processing failed to end the EntryDeviceStatus method Reexamine the data type specified for the VARIANT argument 0xF1000011 The VARIANT argument data type is wrong e Check whether the array variable size is large enough e Check whether the data type specified in the corresponding method has been set The device status monitoring time interval is a 0xF1000012 value outside the range 1 second to 1 hour 1 to 3600 Specify the device status monitoring time between 1 and 3600 6 ERROR CODES MELSOFT 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 codes may not be returned as 1 Error code list describes At the beginning confirm 2 Precautions for confirming error code and then refer to 1 Error code list 1 Error code list If the CPU module or network board has detected an error any of the error codes indicated in the following table is returned The two upper bytes denote Error detection module and the two lower bytes denote the error code returned by Error detection module For detail of the error refer to the man
103. en changing any status monitor condition execute FreeDeviceStatus and then execute EntryDeviceStatus 4 If the statuses of multiple devices change at the same time the OnDeviceStatus event is executed every time the status changes Example When MO is monitored Application MX Component MO M1 read requests MO M1 contents MO M1 read requests MO M1 contents MO ON Execution of Event notice MO OnDeviceStatus event MO OFF MO M1 read requests MO M1 contents MO M1 ON Execution of Event notice MO On Device Status ___J event Execution of Event notice M1 OnDeviceStatus __ _ event 5 With this function the ACT control performs device random read periodically and confirms that the status has been established Therefore this function is not designed for the PLC CPU to notify MX Component that the device status has been established Hence depending on the specified status monitor time interval the ACT control may not be able to confirm that the PLC CPU device status has been established 4 FUNCTIONS MELSOFT 4 2 16 FreeDeviceStatus Device status monitor deregistration 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Deregisters the devices that have been registered in EntryDeviceStatus to monitor statuses 3 Format Visual Basic Visual C VBA IRet object FreeDeviceStatus Long IRet Re
104. endently of the host or other CPU an error will occur if write to the shared memory is performed 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 Device No Type Representation Special relay Special relay of own board Remote input X Bit Hexadecimal RX Bit Hexadecimal RY O Word Hexadecimal RY Remote register i Remote register i Buffer memory Word Hexadecimal Buffer memory of own station CC Link module Random access buffer in buffer memory of own station CC Link module b e Automatic refresh buffer of own station Random access buffer Automatic refresh buffer 2 ABOUT THE ACT CONTROLS MELSOFT 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 ActMLAJ71E71TCP ActAJ71QE71TCP or ActMLAJ71QE71TCP control is used device expansion representation is unusable Target CPU Device Extension QCPU QCPU Moti otion Representation QnACPU ACPU FXCPU ee GL Tase zen Peru controller CPU Digit specification example K4M0 2 Bit pe example DO 1 example M100Z0 O Usable Xx Unusable 1 Unusable when QE71 is relayed 2 FX FX DX DY
105. er Fixed to 0x00 module network Fixed to 0x00 Fixed to 0x00 0x00 number ActPortNumber IBM PC AT compatible side COM port number Target station side ActStationNumber on Fixed to OxFF module station Fixed to OxFF Fixed to OxFF number QCPU Q mode 0x00 MELSECNETHH 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 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 O number by 16 2 Note the following points when making access via the Ethernet module Q series compatible E71 QE71 e 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 MELSOFT For single CPU 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 9 ActQCPUA ActMLQCPUA control The following table indicates the properties possessed by the ActQCPUA ActMLQCPUA
106. error will occur if a four digit year is set to any CPU other than the QCPU Q mode e The value to be specified in iDayOfWeek sDayOfWeek or varDayOfWeek is as follows Day of Week Sunda Monday Tuesday Wednesda Thursday Friday 5 Returned value Normal termination 0is 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 AOJ2HCPU 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 3 For the QCPU A mode and ACPU the clock setting special relay M9028 changes to OFF after clock data setting 4 For the FXCPU clock setting can be made to the FX1N FX1NC 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 FXiNC FX1S FX2 FX2c FX2N and FX2Nc 5 Note that an error of transfer time is produced in clock setting 4 FUNCTIONS MELSOFT 4 2 13 GetCpuType PLC CPU type read 1 Applicable ACT controls This function is available for all ACT controls 1 x1 MELSECNET 10 board will result in an error if own board access is made 2 Feature Reds the type character string and type code of the PLC CPU 3 Format Visual Basic VBA IRet object GetCpuType szCpuName
107. es to the PLC CPU If an error occurs during execution the error code appears in the ReturnCode text box If an error has occurred refer to 6 ERROR CODES and remove the error Cause Precautions for use of the sample program a When using the ActEasylF control make communication settings on the communication setting utility before running this sample program b When the ActACPU control is used this sample program is designed to use the PLC CPU as A1N and the COM port as COM1 exclusively c When changing the control to be used click the button to close the communication line once then change the control and click the button to reopen the communication line 5 SAMPLE PROGRAMS MELSOFT 3 Sample file list By default the sample program is installed in the following folders C MELSEC Act Sample Vb Sample exe Execution file C MELSEC Act Sample Vb Sample vbp Project file C MELSEC Act Sample Vb SampleForm frm Visual Basic Form file C MELSEC Act Sample Vb SampleForm frx Visual Basic Form Binary file C MELSEC Act Sample Vb ActDefine bas Header file 4 Screen The sample program screen will be explained ileal Ea w Sample Control ER C ActACPU control for ACPU connection Input Method LogicalStationNumber fo p DeviceName In a D1 Close D2 D3 GetCpuType DeviceSize ReadDeviceRandom DeviceData z WriteDeviceRandom
108. esaesaeeeneaeeaes 4 36 4 3 12 SetClockData Clock data writel vnr rnnnrnnrnn ven nennnnnrenvernennnnnernennnennernernennenarnennnenne 4 37 4 3 13 GetCpuType PLC CPU type real 4 37 4 3 14 SetCpuStatus Remote Control 4 37 4 3 15 EntryDeviceStatus Device status monitor registration monrnnrnnvnrnrnnrnnrnrernrnnrnnrrnnnnrnrerrennnennn 4 38 4 3 16 FreeDeviceStatus Device status monitor deregistration manrrnvrrnrnnvnnrnnrernnnrnnrennnnnrenrernennnennn 4 38 4 3 17 OnDeviceStatus ANNOUNCES event 4 38 51 Visual Basic Sample Eerad geet eder 5 1 5 2 Visual Cr Sample Programs minvmsndememt grade NEESS hrenrb garana a gaa iiaiai desi stessiaeel NEESS Ee 5 3 5 2 1 Dispatch interface mva nn ee ene eee eee ee ene ee eed eed nv eee eevee even ee eie ee 5 3 5 2 2 Custom interface oo ceeeeeeeeeceececeeeeeeeceeeeaecaecaeceeeeaeeaecaeseaeeaecaecaesaesaesaeseeeeaeeaecaesaesaecaeseeseaesaesaeseaseaeeaes 5 5 5 3 VBA Sample Programs siis2cccs exe ined cen ia eatin ie dete dete den edad decedent 5 6 5 3 1 Excel Sample Program WEE 5 6 5 3 2 Access Sample Program e cssccecceceeeeeeceeceeeeeeeaeceeseeeeaecaecaeeaeeaecaesaeseaeeaesaeseaseaesaesaeeeaeeaesaeeeeseaeeats 5 8 5 4 VBScript Sample Progra EE 5 10 5 5 ASP Sample Progra E 5 12 6 1 Error Codes Returned by the ACT controls e cescseccecceceeeeeceeeeeeeaeeaecaeseaeeaesaesaeseaeeaeeeseaseaesaeseeseaeeaees 6 1 6 2 Error Codes Returned by the CPUs Modules and
109. et communication computer link communication and CPU COM communication on Microsoft Windows 95 Operating System a Making Ethernet communication using TCP IP and UDP IP on Windows 95 of the version older than OSR2 will cause a memory leak When performing continuous operation on Windows 95 use Window 95 OSR2 or later b On Windows 95 communication using the COM port e g computer link communication or CPU COM communication will cause a memory leak Therefore do not perform continuous operation About installation a When performing overwrite installation install the software in the folder where it had already been installed b If you install the MELSEC board driver or GX Developer into the personal computer where MX Component has already been installed communication using a specific path e g ASCII packet of the AJ71E71 may result in a receive device number or other error If any of these phenomena has occurred perform overwrite installation of MX Component again Precautions for performing installation and uninstallation on a dual boot machine where two different operating systems are installed in a single IBM PC AT compatible personal computer On a dual boot machine having Windows NT Workstation 4 0 hereafter referred to as OS1 and Windows 95 98 hereafter referred to as OS2 note the following points when MX Component was installed on OS1 first and MX Component was then installed over the same folder o
110. f the sample program a Before running this sample program make communication settings on the communication setting utility b When changing the input value click the LoggingStop button to stop logging once then change the input value and click the LoggingStart button to start logging c In this sample program the number of device points to be logged is preset to 10 and the number of logging times to 10 Sample file By default the sample program is installed into the following folder C MELSEC Act Sample ExcelVBA Sample Sample xls Excel file 5 SAMPLE PROGRAMS Screen 4 The sample program screen will be explained MELSOFT Ed Microsoft Excel Sample xls 8 x Ele Edit view Insert Format Tools Data Window Help la xl D SISRY aM Gratis va u B zu 2 C3 DI E 5 E F a H J K T NI j LogicalstationNumber 0 Al 2 DeviceName D0 3 _LoggngTimingthhimm ss 0 01 1 Leena at 4 5 e LoggingStop 7 Message 8 RetumCode 3 10 DateTime Daal Jazz Osas Onat _ Oaa5 DataS _ Data7 Ostas Oata9 Dataid n 20000000 i 2 3 D S El 7 3 3 10 12 200171710 00 00 1 2 3 4 5 G 7 3 3 10 13 20017171 0 00 00 1 2 3 4 5 G 7 8 3 10 1 200111 0 00 00 1 2 3 4 5 G 7 3 3 10 15 2007141 0 00 00 1 2 3 4 5 8 7 3 3 10 16 200110 00 00 1 2 3 4 5 8 7
111. fer to the operating manual E Visual Basic Start Visual Basic Refer to Create a form and paste the ACT controls h H e Register the ACT control to Section 2 1 1 for corresponding communication Visual Basic Set only the logical ge SS ss sys See Set the property of the pasted control Refer to the Y Set the properties of the pasted Create a form and paste the ACT AGT controls control to the form ActEasylF control station number operating manual Perform programming using corresponding ACT control the functions offered by the Refer to Chapters 3 4 Perform debugging using the PLC monitor utility Completion of user application Refer to the operating manual Refer to Section 2 1 1 Refer to the operating manual 2 ABOUT THE ACT CONTROLS MELSOFT 2 2 2 When using Visual C When using Visual C create a user application in the following procedure Power on the IBM PC AT compatible and start Windows Refer to the operating manual startup Install MX Component Make settings using the utility setting type lt Utility setting type gt lt Program setting type gt Start the communication settings utility Refer to the Start Visual C and make communication settings in ene andel accordance with the wizard P 9 i aS Add the ACT control to
112. ft Access 2000 Start the communication settings utility and make communication settings in accordance with the wizard Refer to the operating manual Start Visual Basic Editor and create applications yY Start Microsoft Excel 2000 or Microsoft Access 2000 l Refer to ion 2 1 3 Generate the corresponding Section 2 1 3 communication control so that MX Component may be utilized on VBA YY Start Visual Basic Editor and create applications Refer to y Section 2 1 3 Generate the ActEasyIF control so that MX Component may be utilized on VBA Y Set the property of the pasted control _ Refer to the Set only the logical station number operating manual Set the properties of the pasted ACT Refer to the control operating manual Perform programming using the functions offered by the corresponding ACT control ET Refer to Chapters 3 4 Perform debugging using Yes the PLC monitor utility Refer to the operating manual Completion of user application 2 ABOUT THE ACT CONTROLS MELSOFT 2 2 4 When using VBScript When using VBScript create a user application in the following procedure Power on the IBM PC AT compatible and start Windows Install MX Component Refer to the operating manual startup Make settings using the utility setting type lt Utility sett
113. 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 Q series 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 NE station is not needed specify 00x0 Specify 0x00 for other than multidrop link LONG For the QE71 and Q series 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 I O number ActlONumber LONG first UO number 16 of the target computer link module or intelligent special function module specify the UO number of the relayed or requesting station for multidrop link Specify 0x3FF when making access to another station via the own station CPU or network 3 DETAILS OF THE ACT CONTROLS MELSOFT Property Name Type Description
114. gorized Moduler Boot Access 2000 and make the database form active 2 Click the 3 button of the toolbox As this displays a menu choose the ACT control you want to use 3 Paste the selected ACT control to a sheet x 4 Choose the Tools Macro Visual Basic Editor menu to EST TET Yi UEY Binz con d start Visual Basic Editor 5 Perform programming on Visual Basic Editor 2 ABOUT THE ACT CONTROLS MELSOFT 2 1 4 When using VBScript Create HTML or ASP using the notepad commercially available text editor HTML creation tool or like Refer to the commercially available references and so on for the grammars of HTML and ASP Also refer to the HTML and ASP sample programs installed in MX Component 2 ABOUT THE ACT CONTROLS 2 2 Programming Procedures This section gives the procedures of creating a user application 2 2 1 When using Visual Basic utility setti Power on the IBM PC AT compatible and start Windows Install MX Component N t Make settings using the lt Utility setting type gt MELSOFT When using Visual Basic create a user application in the following procedure Refer to the operating manual startup ing type lt Program setting type gt er a Start Visual Basic Start the communication settings utility and make communication settings in accordance with the wizard Add the ACT controls to _ Re
115. he The first I O number specified is an method unauthorised value Using the GPP function check the PLC CPU parameters A matching first I O number does not exist I O assignment OxF 1000002 Buffer address error The buffer address specified is an unauthorised Check the value of the buffer address specified in the value method 0xF 1000003 The buffer address is outside the range Perform reopen processing Buffer read size error Review the system e g PLC CPU module setting and 0xF1000004 As a result of buffer read the specified size cable status could not be acquired Retry Exit the program Size error The size specified in the read write method is 0xF 1000005 abnormal Check the size specified in the method The read write first number plus size exceeds the device or buffer area Operation error p Check the operation specifying value specified in the 0xF1000006 The operation specified for remote operation is method an abnormal value Check the clock data specified in the method Clock data error 0xF1000007 Set the correct clock data to the clock data of the PLC The clock data is abnormal CPU 6 ERROR CODES MELSOFT Error Definition Monitored device registration count excess The number of device points registered in the OxF 1000008 EntryDeviceStatus method was 0 or less The number of device points registered in the EntryDeviceStatus method was more than 20 After making deregistration in the Fr
116. he 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 MELSOFT 3 3 1 ActEasylF ActMLEasylF control The following table indicates the property possessed by the ActEasylF ActMLEasylF control and its default value Default Value Property Pattern ActLogicalStationNumber gS Logical station number set on the communication settings utilit Password set to the Q series compatible E71 on the connected ActPassword Empty d i station side POINT Depending on the communication path Ethernet communication MELSECNET 10 communication etc there will be restrictions as placed on the corresponding communication path controls For restrictions refer to the corresponding communication path controls Sections 3 3 2 to 3 3 25 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 2 ActQJ71E71TCP ActMLQJ71E71TCP control The following table indicates the properties possessed by the ActQJ71E71TCP ActMLQJ71E71TCP control and their default values 1 Configuration 2 Property patterns Connected QCPU Relayed Network acpu acpu ana JACPU Q mode Q mode A mode CPU 1 GAR HSE SE A NER Ee Weseoenm gt x x mma x leo Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU Connected Q series Relayed station CPU compatible E71 module
117. ices including CN200 and later of FXCPU are specified 3 points in all 3 When using Visual Basic VBA VBScript DO amp vbLf amp CN200 amp vbLf amp D1 When using Visual C DO NCN200 nD1 2 Upper Bytes 2 Lower Bytes Oo o sa o H of CN200 L of CN200 SS a ae TEE 1 Example 3 When devices including FD are specified 3 points in all When using Visual Basic VBA VBScript DO amp vbLf amp FDO amp vbLf amp D1 When using Visual C DO nFDO nD1 Oo o oa o O 1 D1 1 Not used 0 is stored x2 Lower bits are stored in device number order 3 For CN200 or later of FXCPU 2 words are read from 1 point by random read 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 varSize is up to OX7FFFFFFF points 2 For IData IpIData or lpvarData prepare a memory area having the number of points specified in ISize varSize If there is no memory area a critical phenomenon such as an application error may occur 4 FUNCTIONS MELSOFT 4 2 6 WriteDeviceRandom Device random write 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Writes data randomly to devices 3 Format Visual Basic VBA IRet object WriteDeviceRandom szDeviceList ISize IData 0 Long IRet Returned
118. ing type gt lt Program setting type gt Start the communication settings utility Ech e Refer to the and make communication settings in tene mantal accordance with the wizard P g EET On the home page generate the Create a home page using the text corresponding communication control Refer to editor and HTML editor so that MX Component controls may Section 2 1 4 be utilized using VBScript On the home page generate the ActMLEasyIF control so that MX Refer to Set the properties of the pasted ACT Refer to the Component controls may be utilized Section 2 1 4 control operating manual using VBScript a Ge Set the property of the pasted control 8 Refer to the Set only the logical station number operating manual Create a home page using the text editor and HTML editor Perform programming using the functions offered by the corresponding ACT control ET Refer to Chapters 3 4 Perform debugging using Yes the PLC monitor utility Refer to the operating manual Completion of user application gt 2 ABOUT THE ACT CONTROLS MELSOFT 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
119. ionNumber 3 Specify the same network number as the MELSECNET 10 network number set to the Q series compatible E71 in the Ethernet parameter setting of the target station side Q series compatible E71 4 Do not use 1 to 1024 of ActPortNumber 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 Target station side Target station side ActStationNumber gt 2 module station module station number number within the same Ethernet loop 6 If the following conditions are all satisfied change the ActMultiDropChannelNumber value to 0x00 remote password has been set to the Q series compatible E71 connected The version of the Q series compatible E71 connected is J or earlier 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 4 ActAJ71QE71TCP ActMLAJ71QE71TCP control The following table indicates the properties possessed by the ActAJ71QE71TCP ActMLAJ71QE71TCP control and their default values 1 Configuration 2 Property patterns Connected Relaved Station CPU S EG Zemmer Station CPU S EE onnecte elaye Relayed Networ station ged QE71 mod le QnACPU QCPU QCPU QnA ACPU FXCPU Q mode A mode CPU x1 Relayed network MELSEGNETH x x x x x MELSECNETNO0 x x x x sation GPU mid wesen x x x x Ethemet x x x x CC Link fox Oox ox ox ox Accessible Property pattern within
120. ions part names and setting of the CC Link local board and the 13JR29 installation uninstallation and others of the driver Sold separetely Type A80BDE A2USH S1 PLC CPU Board User s Manual For SW1DNF ANU B 1B 0800174 Describes the features specifications part names and setting of the CPU board and the installation 1 3JR27 uninstallation and others of the driver Sold separetely MELSECNET H Interface Board User s Manual For SWODNC MNETH B SH 080128 Describes the features specifications part names and setting of the MELSECNET H board and the 13JR24 installation uninstallation and others of the driver Sold separetely Note The MX Component Version 2 Operating Manual Startup and MX Component Version 2 Operating Manual are 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 MX Component 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 lists 2 To use the ACT controls on Visual Basic or Visual C 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
121. is used for multidrop link with relayed module a Configuration b Property patterns Connected Relaved Station CPU C24 Station CPU SE E PU A Rel N k QCPU A mode Relayed Networ QCPU QCPU ana ACPU QnACPU x3 FXCPU 9 Multidrop link ACPU x1 Q mode A mode CPU zi IBM PC AT compatible Relayed network R Independent i elayed Relayed Kee Computer link x Mx 3 x station CPU module Megs re 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 D 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 setting of C24 10000 Any value specified by user in ms units 1 0 SE g 0x00 Target station side module station number 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 17 ActQCPUQUSB ActMLQCPUQUSB control The following table indicates the properties possessed by the ActaCPUQUSB ActMLQCPUQUSB control and their default values 1 Configuration 2 Property patterns veps Relayed Station CPU Station CPU SEN Ge Relayed QCPU Relayed Network
122. ixed to 0x00 Fixed to 0x00 To next page 3 DETAILS OF THE ACT CONTROLS MELSOFT Property Patterns Ga GER RECHNEN For single CPU Ox3FF fixed For multiple CPUs e TE Connected station Connected station SC Fixed to 0x00 SH Eet side relayed module side relayed module No 1 0x3E0 I O address I O address No 2 0x3E1 ActMultiDropChannelNumber Fixed to 0x00 Fixed to 0x00 Fixed to 0x02 Fixed to 0x00 Target station side Connected station Connected station ActNetworkNumber De Fixed to 0x00 module network side module network side module network number number number Board No of IBM PC AT compatible side MELSECNET H board aoonumder N 1 PORT 1 to PORT 4 first to fourth boards Target station side Connected station Connected station 255 y f j 8 ActStationNumber OxFF Fixed to OxFF module station side module station side module station number number number Target station side Target station side ActUnitNumber a 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 VO number by 16 3 DETAILS OF THE ACT CONTROLS MELSOFT 2 When access is made via MELSECNET 10 mode using QCPU Q mode as connected station CPU Operates when both the MELSECNET H board and relayed module are in the MELSECNET 10 mode a Configuration Connected MELSECNET H Relayed station CPU module module Relayed network
123. kData Clock data writel 4 21 4 2 13 GetCpuType PLC CPU type real 4 23 4 2 14 SetCpuStatus Remote Control 4 27 4 2 15 EntryDeviceStatus Device status monitor registration c ccecceceeseeeeeeeeeeeeseeaeeeeeeeeaeeeeeeeeateaes 4 29 4 2 16 FreeDeviceStatus Device status monitor deregistration ccccecceceeseeeeseeeeeeeeeeeseeeeeeeeeseeeeaeeaes 4 32 4 2 17 OnDeviceStatus ANNOUNCES event ceccecceceeeeeeeceeeeseeseceeceeeaecaecaesaesaesaeceeseaeeaesaeeeeseaeeanseeeaeeats 4 33 4 3 Details of the Functions Custom Interface 4 34 4 3 1 Open Communication line opening rrnrrvrrrvnnrnn re rnrnennnnn ve nennnenrenrernennnenrernnnnenrernennnnnnerrernennnennen 4 34 4 3 2 Close Communication line closing asrrnrrrrrrnrnnrnnvnnrernrnnnnnvennnnnnnnrenvernennnenrerrernennrerrernernennrerennnennn 4 34 4 3 3 ReadDeviceBlock Device batch read AA 4 34 4 3 4 WriteDeviceBlock Device batch write AAA 4 34 4 3 5 ReadDeviceRandom Device random read A 4 35 A 13 A 13 4 3 6 WriteDeviceRandom Device random wrtel A 4 35 4 3 7 SetDevice Device data setting A 4 35 4 3 8 GetDevice Device data acquisition rrnrnnvnnnnnnvnnrnnvnnnrnnvnn vnr nnnnnnnrnnvernennnennerrernnnnnerrernennenrensennnenne 4 35 4 3 9 ReadBuffer Buffer memory read 4 36 4 3 10 WriteBuffer Buffer memory write AA 4 36 4 3 11 GetClockDSata Clock data read ecceeceecceceeseeseceeeeeeeseeaecaeeeeeeaeeeceeeeaesaesaeseaesaesaeseesea
124. ke access to the own station QCPOU Q mode or to the QCPU Q mode via the MELSECNET H 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 ActThroughNetworkType LONG Property value 0x00 MELSECNET H 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 Actintelligent module PreferenceBit Property value LONG 0x00 Another network of multidrop link destination is not accessed 0x01 Another network of multidrop link destination is accessed For access to the Q series compatible own station intelligent 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 I O number 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 ActDsidPropetyBit LONG ses Property value I O number of the last access target station is made valid I O number of the l
125. l function module 3 Format Visual Basic VBA IRet object ReadBuffer IStartlO Address IReadSize iData 0 Long IRet Returned value Output Long IStartIO First UO number of module from Input where values will be read Long Address Buffer memory address Input Long IReadSize Read size Input Integer iData n Values read from buffer memory Output Visual C IRet object ReadBuffer IStartIO Address IReadSize IpsData Long IRet Returned value Output Long IStartIO First I O number of module from Input where values will be read Long Address Buffer memory address Input Long IReadSize Read size Input Short lpsData Values read from buffer memory Output 4 FUNCTIONS MELSOFT VBScript varRet object ReadBuffer varStartlO varAddress varReadSize lpvarData VARIANT varRet Returned value LONG type Output VARIANT varStartlo First I O number of module from Input where values will be read LONG type VARIANT varAddress Buffer memory address LONG type Input VARIANT varReadSize Read size LONG type Input Values read from buffer memory VARIANT lpvarData Output p SHORT array type P 4 Explanation As the module I O number specified in IStartlO varStartlO specify a value found by dividing the actual I O number by 16 e The buffer values for IReadSize varReadSize at the buffer memory address specified in Address varAddress in the special function module located at the first HO number specified in IStartl
126. le me IBM PC AT compatible b Property patterns GE GE CPU Relayed Station CPU Own Board Rel N k QCPU Pe ayed Network cp acpu ana Jaen oe Q mode Q mode A mode CPU 1 Peng o x x x x Computerin x x x ccam f l x x x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU maser x x Px x Td mesecne x merseoner x x x x c Property list Property Patterns gee pe ActCpuType e See CPU type corresponding to target station Target station side Target station side For single CPU For single CPU Ox3FF fixed Ox3FF fixed For multiple CPUs For multiple CPUs ActDestinationlONumber Go Fixed to 0x00 Fixed to 0x00 Connected CPU 0x3FF Connected CPU 0x3FF No 1 0x3E0 No 1 0x3E0 No 2 Ox3E1 No 2 Ox3E1 No 3 0x3E2 vane No 4 0x3E3 ActDidPropertyBit Fixed to 0x00 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 ActDsidPropertyBit isch Fixed to 0x00 Fixed to 0x01 Fixed to 0x00 Fixed to 0x00 To next page 3 DETAILS OF THE ACT CONTROLS MELSOFT Property Patterns Ga GER a o For single CPU 0x3FF fixed For multiple CPUs r i e tad CPU Ox3FF Connected station Connected station ActlONumber x 1 SC Fixed to 0x00 SH Eet side relayed module side relayed module No 1 0x3E0 I O address I O address No 2 0x3E1 ActMu
127. le AccessVBA Sample Sample mdb Access file 5 SAMPLE PROGRAMS MELSOFT 4 Screen The sample program screen will be explained A sampe SE Eile Edit View Insert Format Records Tools Window Help M MSRY LaAesS o e Hu YTEv A x E 6B EA B Arial 9 BZUul Q A Z amp Sample gt LogicalstationNumber see Logging Timing Sec H LoggingStop OnDeviceStatus ngData DateTime el DateTime Device Data ReturnCode Record afa f 1 gt oufpe of 1 Record HI 1 gt Lope of 1 Record aaf f 1 gt orp of 1 Enter the logical station number that was specified in communication settings on the communication setting utility 5 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 MELSOFT 5 4 VBScript Sample Program This section describes the VBScript sample program This sample program is designed to define the device values of the PLC CPU as the capacity and status of a tank and monitor their values using the ActMLEasylF control This sample program was created on Microsoft FrontPage 2000 1 Using method Opening the sample file opens the communication line to the PLC CPU used After that the device values of the PLC CPU are acquired at intervals of 1 second and are used to display the capacity and status of the
128. ltiDropChannelNumber Fixed to 0x00 Fixed to 0x00 0x00 or 0x02 Fixed to 0x00 Target station side Connected station Connected station ActNetworkNumber De Fixed to 0x00 module network side module network side module network number number number Board No of IBM PC AT compatible side MELSECNET 10 board aoonumder N 1 PORT 1 to PORT 4 first to fourth boards Target station side Connected station Connected station 255 y 3 i 8 ActStationNumber OxFF Fixed to OxFF module station side module station side module station number number number Target station side Target station side ActUnitNumber Wie 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 O number by 16 3 DETAILS OF THE ACT CONTROLS MELSOFT 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 compatible b Property patterns Connected Station CPU Relayed Station CPU Own Board QCPU Relayed Network QCPU QCPU PE pen ACPU 1 FXCPU A mode oPum Q mode A mode CPU 1 MELSEGNET H MELSEGNET x x x x x x Computer link CC Link Accessible Property pattern within circle x Inaccessible
129. lue 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 MELSOFT 4 2 15 EntryDeviceStatus Device status monitor registration 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Registers devices whose statuses will be monitored 3 Format Visual Basic VBA IRet object EntryDeviceStatus szDeviceList ISize IMonitorCycle IData 0 Long IRet Returned value Output BSTR szDeviceList Registered device name list Input Long ISize Number of registered device points Input Long IMonitorCycle Status monitor time interval Input Long IData n Registered device value list Input Visual C Ret object EntryDeviceStatus szDeviceList ISize IMonitorCycle pIData Long IRet Returned value Output BSTR szDeviceList Registered device name list Input Long ISize Number of registered device points Input Long IMonitorCycle Status monitor time interval Input Long pIData Registered device value list Input VBScript varRet object EntryDeviceStatus varDeviceList varSize varMonitorCycle varData VARIANT varRet Returned value LONG type Output VARIANT varDeviceList BSTR pe name i Input VARIANT varSize LONG type device points Input VARIANT varMonitorCycle foie we time interval Input VARIANT varData ioe vaye lisi Input
130. motion controller CPU is made 2 For iData lpsData varData prepare a memory area having the number of points specified in IWriteSize varWriteSize 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 Write to the shared memory of the QCPU Q mode cannot be performed either 4 FUNCTIONS MELSOFT 4 2 11 GetClockData Clock data read 1 Applicable ACT controls The applicable ACT controls are indicated below ActQCPUG ActMLQGPUQ O ActQCPUA ActMLQCPUA O ActQnACPU ActMLQnACPU ActACPU ActMLACPU E e IActAJ71QE71UDP ActMLAJ71QE71UDP TC O ActQCPUQUSB ActMLQCPUQUSB ActCCG4QnA ActMLOCG4QM O ActCCG4A ActMLCCG4A O ACtEXCPU ActMLFXCPU JG ActQJ71024 ActMLQJ71C24 O ActAJ71C24 ActMLAJ71C24 O ZO ActQJ71E71TCP ActMLQJ71E71TCP ActLLT ActMLLLT ActQJ71E71UDP ActMLQJ71E71UDP O ActQCPUQBus ActMLQCPUQBus O ActAJ71QE71TCP ActMLAJ71QE71TCP O Usable Xx 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 x4 Depending on the communication path Ethernet communication MELSECNET 10 communication etc there will be restricti
131. n OS2 a If MX Component is uninstalled first on the OS2 side uninstallation does not delete the control DLLs and ACT folders and they remain within the IBM PC AT compatible To delete the control DLLs and ACT folders perform uninstallation also on the OS1 side b If MX Component is uninstalled first on the OS1 side the control DLLs and ACT folders are deleted In this case MX Component may not operate properly or cannot be uninstalled on the OS2 side Install MX Component again on the OS2 side to operate MX Component properly or uninstall it on the OS2 side About start menu When you have uninstalled MX Component the item may remain in the start menu In that case restart the IBM PC AT compatible personal computer About the resume and other functions of personal computer A communications error may occur if communications are made with the PLC CPU after setting the resume function suspend setting power saving function and or standby mode of the personal computer Therefore do not set the above functions when making communications with the PLC CPU About transmission speed As the transmission speed of the QCPU Q mode and QCPU A mode you can set 9600bps 19200bps 38400bps 57600bps or 11520bps For the QnACPU of version 9707B or later you can set the transmission speed of 9600bps 19200bps or 38400bps For the QnACPU of other versions you can set 9600bps or 19200bps The transmission speeds of the ACPU except
132. nel device manger of Data send failed the OS Exit the program and restart the IBM PC AT compatible Time out error 0x0180840B Though the time out period had elapsed data could not be received 6 ERROR CODES MELSOFT Error Definition Review the system e g PLC CPU module setting and USB driver receive error SADIE Stas 0x01808504 Make USB setting on the control panel device manger of Data receive failed the OS Exit the program and restart the IBM PC AT compatible TEN USB driver initialisation error Me setting on the control panel device manger of Initialisation of the USB driver failed i Exit the program and restart the IBM PC AT compatible Other USB error Disconnect the cable once then reconnect 0x01808507 Exit the program and restart the IBM PC AT compatible Error related to data send receive occurred Reinstall MX Component Check the CPU type set to ActCpuType No command error Check whether the system configuration is supported or 0x04000001 The specified CPU type cannot be used to not perform processing Exist the program and restart the IBM PC AT compatible Reinstall MX Component Check for the deleted or moved installation file of MX 0x04000004 Internal server DLL load error Component Start of the internal server failed Exit the program and restart the IBM PC AT compatible Reinstall MX Component Start of communication DLL of MX Component Exit the program and restart the IBM P
133. ng error Exit other programs and secure free memory area j Exit the program and restart the IBM PC AT compatible 0x01800004 DLL load error Exit other programs and secure free memory area Reinstall MX Component Exit the program and restart the IBM PC AT compatible 0x01800005 Resource securing error Exit other programs and secure free memory area 0x01010020 0x01801002 Multi line open error Exit the program and restart the IBM PC AT compatible 0x01801003 Open not yet executed Exit the program and restart the IBM PC AT compatible e Exit the program and restart the IBM PC AT compatible 0x01801005 Specified port error Reinstall MX Component au Exit the program and restart the IBM PC AT compatible 0x01801006 Specified module error R Reinstall MX Component 1 When the network board is relayed a time out error may occur Check the cable state 6 1 6 1 6 ERROR CODES MELSOFT Error Definition 0x01801007 Specified CPU error Check the CPU type set to ActCpuType Check that the system configuration is not an unsupported configuration Exit the program and restart the IBM PC AT compatible Reinstall MX Component Check the packet type set to ActPacketType 0x01801008 Target station access error Review the target station 0x0180100C Registry search failure Exit the program and restart the IBM PC AT compatible Reinstall MX Component Exit the program and restart the IBM PC AT compatible 0
134. ng the used graphic driver for the standard VGA driver delete the temporary data emf left in the temporary folder After that try starting multiple Excel files The phenomenon seems to be the same if it does not occur by changing the driver for the standard VGA driver d Corrective action If this phenomenon occurs the temporary data emf will be left in the temporary folder of the system You have to delete the remaining temporary data emf manually The temporary folder of the system is normally in C Temp After that take either of the following actions 1 Use the graphic card and display driver which support Windows Me 2 Reduce the number of control objects pasted to the Excel files 40 Precautions for COM communication or TCP IP communication on ASP page and application 1 If the ASP page opens COM or TCP IP communication earlier than the application communication in the same path cannot be made on the application until the ASP page is closed Therefore note the following points a COM or TCP IP communication should be opened on the application earlier After it has been opened on the application communication can be made on both the application and ASP page until it is closed b When COM or TCP IP communication has been opened on the ASP page always close the communication 1 The application indicates any of the user applications created using the MX series and MELSOFT products 41 Precautions for co
135. nnecting personal computer and serial communication module a When QJ71C24 R2 of function version A is used An MX Component application can use only either of CH1 and CH2 When the MELSOFT product such as GX Developer or GOT is using one channel the application cannot use the other channel When the QJ71C24 R2 of function version B is used the application can use both channels b When AJ71QC24 R2 or A1SJ71QC4 R2 is used The MX Component application can use only CH1 It cannot use CH2 INTRODUCTION Thank you for choosing the Mitsubishi MELSOFT series comprehensive Factory Automation software Read this manual and make sure you understand the functions and performance of MELSOFT series thoroughly in advance to ensure correct use CONTENTS SAFETY PRECAUTIONS ua age Matai Haein Barve aed ste EE A 1 REVISIONS ue Sasi ats eve ara lave aa A 2 Op rating leren Le EE A 3 CONTENTS Lekse A 12 About Manuals e da e seghgegeg dek get Zeueet deg dvebva dE ee debu gt ue gedreet gedreet ee dek et ike A 15 How to Use This Manual aner nnnnrnnntnnnnnnn rann nnennnnnnrnn oter nen nnetnnnetnnnntrnnetnnnnennnnennnn A 16 Abbreviations and Terms in This Manual A 17 1 OVERVIEW 1 1 to 1 3 TT Outines ACT Contro EE 1 1 1 2 AGT controland Function Teens eeh attentatet yen 1 2 12 AAC I Controlliskisaduasdssdausaadudenadautdanda couseugtanss AAAS ARA AAR AAA AA A A 1 2 1 2 2 Function Staen anian i a a a a ai iaa i aeai 1 3 2 1 Settings Made for Use of th
136. nute value to be written Input Integer iSecond Second value to be written Input Visual C IRet object SetClockData 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 21 4 FUNCTIONS MELSOFT VBScript varRet object SetClockData varYear varMonth varDay varDayOfWeek varHour varMinute varSecond VARIANT varRet Returned value LONG type Output VARIANT varYear Year value to be written SHORT type Input VARIANT varManth Month value to be written SHORT type Input VARIANT varDay Day value to be written SHORT type Input VARIANT varDayOfWeek a eer Jo een Input VARIANT varHour Hour value to be written SHORT type Input VARIANT varMinute Minute value to be written SHORT type Input VARIANT varSecond Second value to be written SHORT type Input 4 Explanation An error is returned if the clock data to be set are not correct values As to the value specified in iYear sYear or varYear 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
137. o target station ActDataBits DAT er Match to the setting of UC24 0 Target station side module ActNetworkNumber Fixed to 0x00 Fixed to 0x00 SC network number ActParity ODD PARITY Match to the setting of UC24 ActPortNumber 1 IBM PC AT compatible side COM port number Target station side module Target station side module ActStationNumber Fixed to OxFF GE station number station number 0 ActStopBits STOPBIT Match to the setting of UC24 ONE ActSumCheck SUM I Es CK Match to the setting of UC24 ActTimeOut 10000 Any value specified by user in ms units 0 Target station side module Connected station side Connected station side ActUnitNumber e F 0x00 station number module station number module station number 3 29 3 29 3 DETAILS OF THE ACT CONTROLS MELSOFT 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 PU A Rel N k d QCPU A mode Relayed Networl QCPU QCPU ana ACPU 1 QnACPU 3 FXCPU Multidrop link Q mode A mode CPU x1 d ACPU x 1 IBM PC AT compatible Relayed network Relayed Relayed e Computer link x ID 3 x station CPU module made 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
138. odule QE71 e For ActNetworkNumber and ActStationNumber specify the value set in the parameter setting of the target station side QE71 e 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 Usable for only the QnACPU version 9707B or later 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 11 ActACPU ActMLACPU control The following table indicates the properties possessed by the ActACPU ActMLACPU control and their default values 1 Configuration 2 Property patterns Connected re Station CPU elayed Station Relayed Network Connected Relayed ACPU 1 QCPU QCPU station CPU module Q mode A mode CPU zi TT ES MELSECNETH x IBM PG AT compatible Relayed network MELSECNET 10 MELSECNET II Relayed Relayed i Ethernet station CPU module R x Em a EC Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 3 Property list Property Patterns E rv ee 9600 ActBaudRate BAUDRATE Fixed to BAUDRATE 9600 x 1 _ 9600 8 ActControl TCR_DTR_OR Depending on used cable _RTS ActCpuType Kees AMIN e CPU type corresponding to target station Targe
139. ogramming 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 Microsoft Visual Basic and Microsoft Visual C a Multithread When performing multithread programming follow the rules of COM and ActiveX controls For details refer to the rules and reference books of COM and Activex controls 1 The ActiveX controls used on MX Component are those of the STA model 2 When passed to another apartment the interface pointer must be marshaled Provide synchronization using the CoMarshallerThreadInterfacelnStream or CoGetlnterfaceAndReleadseStream COM function 2 Instructions for use of Visual Basic Only the dispatch interface is usable 3 Instructions for use of Visual C 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 ICpuCode Obj GetCpuType amp szCpuName amp lCpuCode MessgBox
140. ol Other error message may appear x The operation on the MITSUBISHI ActACPU Control object failed gt i The OLE server may not be registered To register the OLE server reinstall it b When you paste the ACT control and display the properties the property names displayed may be broken As this phenomenon occurs for only the property indication there will be no problem in the property functions 27 Precautions for use of Microsoft Excel 2000 a If you paste the control to Excel 2000 it may sometimes not be pasted This phenomenon occurs if the cache file temporary file of Excel 2000 remains In such a case perform operation in the following procedure 1 Close Excel 2000 2 Delete exd in the Excel 8 0 folder of the temp folders 3 Restart Excel 2000 b The size of the ACT control can be changed but this does not affect the operation of MX Component To restore the size set the Height and Width properties of ACT control to 24 again 28 Precautions for use of Microsoft Windows Millennium Edition Operating System It is not recommended to use MX Component with the system restoring function made invalid by the operating system If the free space of the system drive becomes less than 200MB the system restoring function is made invalid by the operating system When using Windows Me reserve a 200MB or more free space for the system drive 29 About error at communication start A comm
141. onNumber 3 Specify the same network number as the MELSECNET 10 network number set to the Q 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 5 If the following conditions are all satisfied change the ActMultiDropChannelNumber value to 0x00 remote password has been set to the Q series compatible E71 connected e The version of the Q series compatible E71 connected is J or earlier Connected station Connected station ActStationNumber gt 2 side module station side module station number number 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 3 ActQJ71E71UDP ActMLQJ71E71UDP control The following table indicates the properties possessed by the ActQJ71E71UDP ActMLQJ71E71UDP control and their default values 1 Configuration 2 Property patterns Connected Relaved Station CPU Er EG s Station CPU dN S EE series elaye Relayed Networ compatible E71 module oe VE FXCPU Q mode Q mode A mode CPU 1 Relayed network MELSECNETH MELSECNET 10 Relayed Relayed MELSECNET II el ox station CPU module D pera 1 E Connected station CPU IBM PC AT compatible Computer link CC Link een Gem em within circle Inaccessible E Including motion
142. one point of device 3 Format Visual Basic VBA IRet object SetDevice szDevice IData Long IRet Returned value Output String szDevice Device name Input Long IData Set data Input Visual C IRet object SetDevice szDevice IplData Long IRet Returned value Output CString szDevice Device name Input Long IpIData Set data Intput VBScript varRet object SetDevice varDevice lpvarData VARIANT varRet Returned value LONG type Output VARIANT varDevice Device name character string type Input VARIANT varData Set data LONG type Input 4 Explanation e The operation specified in IData IpIData or varData is performed for one point of device specified in szDevice varDevice e When the bit device is specified the least significant bit of the Data value IpIData value or varData value becomes valid 5 Device specifying methods Specify the devices in the following methods lt When bit device is specified gt lt When word device is specified gt Example MO Example DO ENEE lt When double word device is specified gt lt When CN200 or later of FXCPU is specified gt Example K8MO Example CN200 2 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lower Bytes M16 to M31 2 MO to M15 2 H of CN200 L of CN200 1 Not used 0 is stored x2 Lower bits are stored in device number order 6 Returned value Normal termination 0O is returned Abnormal termination Any value other than 0 is returned Refer to Chapter
143. onnected ocean Reed anacev 4 QCPU QCPU QnA ACPU opu CPU module Q mode A mode CPU 1 IMELSEGNETH x x x x IBM PC AT compatible Relayed network IMELSEGNETN0 x x x x Se Tee mersecner x x x x Te theme x x x x Computerin x x x x O Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU c Property list Property Patterns Se ll Ell 19200 ActBaudRate BAUDRATE Match to the setting of QC24 N 19200 ActConnectUnitNumber Connected station side module station number ActControl TGR I Ge OR Depending on used cable RTS 17 ActCpuType CPU Q2ACPU CPU type corresponding to target station 1023 Connected station Fixed to Ox3FF Fixed to Ox3FF Fixed to Ox3FF side module I O 0x3FF 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 Ste 1 IBM PC AT compatible side COM port number Target station side Target station side ActStationNumber 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 firs
144. ons as placed on the corresponding communication path controls 2 Feature Reads time from the clock data of the PLC CPU 3 Format Visual Basic VBA IRet object GetClockData iYear Month iDay iDayOfWeek Hour iMinute iSecond Long IRet Returned value Output Integer iYear Read year value Output Integer iManth Read month value Output Integer iDay Read day value Output Integer iDayOfWeek Read day of week value Output Integer iHour Read hour value Output Integer iMinute Read minute value Output Integer iSecond Read second value Output Visual C 9 IRet object GetClockData lpsYear IpsMonth lpsDay IpsDayOfWeek IpsHour lpsMinute xIpsSecond Long IRet Returned value Output Short IpsYear Read year value Output Short gt psMonth Read month value Output Short IpsDay Read day value Output Short lpsDaYOfWeek Read day of week value Output Short gt lpsHour Read hour value Output Short lpsMinute Read minute value Output Short lpsSecond Read second value Output 4 19 4 19 4 FUNCTIONS MELSOFT VBScript varRet object GetClockData lpvarYear pvarMonth pvarDay lpvarDayOfWeek IpvarHour gt lpvarMinute IpSecond VARIANT _ varRet Returned value LONG type Output VARIANT lpvarYear Read year value SHORT type Output VARIANT IpvarManth Read month value SHORT type Output VARIANT lIpvarDay Read day value SHORT type Output VARIANT lpvarDayOfWeek Read day of week value SHORT type Outp
145. operty 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 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 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 0x01808411 Loading of the USB driver failed Reinstall MX Component Connection of the USB driver failed Reinstall MX Component Review the system e g PLC CPU module setting and USB driver send error cable status 0x01808503 S Make USB setting on the control pa
146. or Q series compatible C24 E71 Generic term of the AJ71E71 AJ71E71 S3 A1SJ71E71 B2 A1SJ71E71 B5 A1SJ71E71 B2 S3 and 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 Generic term of the AJ65BT G4 GPP function peripheral connection module and the AJ65BT G4 S3 GPP function peripheral connection module Computer link communication Serial communication Abbreviation of communication made with the PLC CPU using the computer link module Described as serial communication especially in communication that uses the QC24 N or Q series compatible C24 Ethernet communication Abbreviation of communication made with the PLC CPU using the Ethernet module CPU COM communication Abbreviation of communication made by connecting the IBM PC AT compatible to the RS 232C or RS 422 connector of the PLC CPU CPU USB communication Abbreviation of communication made by connecting the IBM PC AT compatible to the USB connector of the QCPU Q mode MELSECNET 10 communication Abbreviation of communication made with the PLC CPU using the MELSECNET 10 board MELSECNET H communication Abbreviation of communication made with the PLC CPU using the MELSECNET H board CC Link communication
147. patible 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 6 4 6 4 0x01808201 6 ERROR CODES MELSOFT Error Definition 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 Ree Ope p 4 Exit the program and restart the IBM PC AT compatible Communication parameter error 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 again 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 Review the data bit and stop bit values of the properties Set them again on the communication settings utility Review the data bit value of the pr
148. pplication to receive the event when the registered device condition holds 5 Returned value None Displaying the message box or modal dialog for example within the OnDeviceStatus function using the user application will cause the user application to wait for data entry In this status note that control will not return to the ATC control and device control processing will stop until the message box or modal dialog is closed 4 FUNCTIONS MELSOFT 4 3 Details of the Functions Custom Interface 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 Visual C 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 Section 4 2 Details of the Functions Dispatch Interface 4 3 1 Open Communication line opening hResult object Open IpIRetCode HRESULT hResult Returned value of COM Output LONG lplRetCode Returned value of communication function Output 4 3 2 Close Communication line closing hResult object Close IpIRetCode HRESULT hResult Returned value of COM Output LONG lpIRetCode Returned value of communication function Output 4 3 3 ReadDeviceBlock Device batch read hResult object ReadDeviceBlock szDevice ISize IpIDat
149. 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 5 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 MX Component operating manual contains the accessible devices and ranges Refer to the MX Component operating manual Abbreviations and Terms in This Manual Unless otherwise started this manual uses the following abbreviations and terms for the explanation of MX Component Generic Term Abbreviation Description MX Component Generic product name for product types SWnD5C ATC E and SWnD5C ACT EA n denotes version 0 or 2 EA denotes a multiple license product IBM PC AT compatible Abbreviation of the IBM PC AT or its compatible personal computer PC CPU
150. r Bytes L of CN200 LL of FDO H of CN200 LH of FDO L of CN201 HL of FDO H of CN201 HH of FDO L of CN202 LL of FD1 si H of CN202 LH of FD1 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 from 2 points Write from 1 point will result in an error 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 varSize 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 IplData or varData prepare a memory area having the number of points specified in ISize varSize If there is no memory area a critical phenomenon such as an application error may occur 4 FUNCTIONS MELSOFT 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 Visual Basic VBA 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 Visual C IRet obje
151. r 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 En You can make communication with the specified PLC easily without tres being aware of the communication E SN protocol MX Component LT IN Computer link communication RS 232C Computer link module Serial communication Serial communication module i Ethernet DS Ethernet communication Ethernet Ki Ethernet module board V CPU COM communication RS 232C RS 422 conversion RS 232C TTT ACPU QnACPU QCPU Q mode SEH i QCPU A mode FXCPU motion controller CPU p ii QCPU Q mode CPU USB communication H USB AN m MELSECNET 10 module i P BU MELSECNET H communication sr de MELSECNETI Fi SE ee MELSECNET 10 communication ee 0 CC Link module CC Link icati CC Link USCH board g Software version N or later RS 232C RS 422 conversion Ti meee CC Link module CC Link G4 communication EE CC Link H Software version N or later D Software version D or later me CPU board equivalent P CPU board communication to A2USHCPU S1 GX Simulator communication GX Developer GX Simulator offline debugging GX Developer SW5D5C GPPW E or later GX Simulator SW5D5C LLT E Ver
152. rty efault Value 0 C ted stati id ActConnectUnitNumber 1 Ke Fixed to 0x00 GE i Ne Fixed to 0x00 0x00 module station number 17 ActCpuType CPU_Q2ACPU 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 7 Fixed to Ox3FF Fixed to Ox3FF BE 0x3FF reedwoare Sien relayed module O address 1 Target station side module Target station side module Connected station side QE71 ActNetworkNumber 2 0x01 network number network number network number ActPortNumber x3 x6 5001 IBM PC AT compatible side port number 1 ActSourceNetworkNumber 4 0x01 IBM PC AT compatible side network number 2 ActSourceStationNumber 5 0x02 IBM PC AT compatible side station number 1 Target station side module Target station side module Connected stati ide QE71 ActStationNumber 2 9 9 ene ae 0x01 station number station number station number ActHostAddress 1 1 1 1 Host name or IP address of connected station side module 10000 Any value specified by user in ms units 0 T ae i ActUnitNumber Fixed to 0x00 Fixed to 0x00 arget station side module 0x00 station number 1 For access to another station via MELSECNET 10 for the property pattern of 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 or specify the value set in
153. s 1 A2SCPU S1 cru aen pe A171SHCPU Ki At72SHOPU 0602 AT72SHCPU 1 Except CPU board 3 DETAILS OF THE ACT CONTROLS MELSOFT 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 MELSEGNET 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 when 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 ve LONG PORT 3 0x03 E 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 Ge 38400 j BAUDRATE_2400 BAUDRATE_57600 2400b mz 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 KK communication Specify the parity system used for computer link communic
154. s 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 I O 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 34 CheckDeviceString Do not use the CheckDeviceString method of each ACT control 35 About ActUMsg control ActUW2zd control ActMnet2BD control and ActAFBD control Installing MX Component registers the ActUMsg control ActUW2zd control ActMnet2BD control and ActAFBD control but do not use them 36 Precautions for use of Act ML QJU71E71TCP Act ML AJ71QE71TCP and Act ML AJ71E71TCP 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 37 Precautions for use of EXCEL VBA Do not set the page feed preview function in the application that uses EXCEL VBA Doing so can cause a memory leak or OS basic operation file operation printing or other fault 38 Seri
155. sibility 23 Unlocking password when using QJ71E71 The range where the password can be unlocked by remote operation is up to the connection target station If the password is set also on the lower layer communication cannot be made with the PLC CPU on the lower layer Starting Enter password to Source unlock AAAA No Remote Password 1 With setting AAAA 2 Without setting 3 With setting AAAA 4 5 With setting BBBB Without setting O Accessible x Inaccessible 1 Unlocking QJ71E71 password enables access to PLC CPUs in this range 24 Resetting PLC CPU during TCP IP connection setting If you reset the PLC CPU during TCP IP connection setting during opening using MX Component a communication or receive error will occur at the time of communication after that In that case close the application that uses MX Component and then perform open processing again 25 Security of the Internet intranet when using VBScript MX Component does not have the Internet intranet security function When you need the security function make setting on the user side 26 Precautions for use of Microsoft Access 2000 a When you paste the ACT control to an Access 2000 form and double click the ACT control or choose the custom control in the property the following error message will appear but this does not affect the operation of ACT contr
156. t O number by 16 2 Note the following points when making access via the Ethernet module QE71 e 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 27 3 27 3 DETAILS OF THE ACT CONTROLS MELSOFT 2 When connected station side QC24 N is used for multidrop link with relayed module a Configuration b Property patterns Connected Connected Relayed Station CPU station SER Station CPU Relayed Network CPU deen x QCPU QCPU ana ACPU Lee Multidrop link Q mode A mode CPU x1 IBM PC AT compatible Relayed network Independent mode 2 Relayed Relayed Synchronous station CPU module Dee 2 Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 2 Indicates the CH2 side setting CH1 side fixed to independent mode c Property list Property Patterns Ge EC 19200 ActBaudRate BAUDRATE Match to the setting of QC24 N _ 19200 ActConnectUnitNumber Connected station side module station number ActControl bade DTR OR Depending on used cable RTS
157. t station side module ActNetworkNumber Fixed to 0x00 Fixed to 0x00 GC network number ActPortNumber SE 1 IBM PC AT compatible side COM port number Target station side module Target station side module ActStationNumber Fixed to OxFF g 9 om 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 A2USHCPU S1 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 12 ActFXCPU ActMLFXCPU control The following table indicates the properties possessed by the ActFXCPU ActMLFXCPU control and their default values 1 Configuration 2 Property patterns Connected ee Relayed Station CPU elayed Networl area Geen Ce Q mode A mode CPU zi station CPU module 7 MELSECNETH x IBM PC AT compatible Relayed neiWork MELSECNET 10 MELSECNET II Relayed Relayed i Ethernet station CPU module Computer link CC Link x Accessible Property pattern within circle x Inaccessible 1 Including motion controller CPU 3 Property list Property Patterns dni Geen ActControl ud DTR OR Depending on used cable RTS ActCpuType CPU I a CPU CPU type corresponding to target station IBM PC AT compatible side COM port number 10000 Any value specified by user in ms units 3 DETAILS OF THE ACT CONTROLS MELSOFT
158. tCpuStatus Remote control hResult object SetCpuStatus IOperation gt IpIRetCode HRESULT hResult Returned value of COM Output LONG IOperation Remote run stop pause Input LONG lpIRetCode Returned value of communication function Output 4 FUNCTIONS MELSOFT 4 3 15 EntryDeviceStatus Device status monitor registration hResult object EntryDeviceStatus szDeviceList ISize IMonitorCycle IplData pIRetCode HRESULT hResult Returned value of COM Output BSTR szDeviceList Registered device name list Input LONG ISize Number of registered device points Input LONG IMonitorCycle Status monitor time interval Input LONG pIData Registered device value list Input LONG lpIRetCode Returned value of communication function Output 4 3 16 FreeDeviceStatus Device status monitor deregistration hResult object FreeDeviceStatus IpIRetCode HRESULT hResult Returned value of COM Output LONG lpIRetCode Returned value of communication function Output 4 3 17 OnDeviceStatus Announces event hResult object OnDeviceStatus szDevice IData IReturnCode lplRetCode BSTR szDevice Name of device whose condition has held Input LONG IData Value of device whose condition has held Input LONG IReturnCode Returned value of condition check Input processing LONG IpIRetCode Returned value of communication function Output 5 SAMPLE PROGRAMS MELSOFT 5 SAMPLE PROGRAMS The sample programs given in this section are those create
159. tLLT ActMLLLT o ActQJ71E71UDP ActMLQJ71E71UDP O ActQCPUQBus ActMLQCPUQBus Oo O ActAJ71QE71TCP ActMLAJ71QE71TCP O Usable x Unusable 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 x3 When access to the QnACPU is made via the MELSECNET 10 or MELSECNET II making PAUSE specification for the QnACPU results in an error 4 An error is returned if PAUSE specification is made 5 Depending on the communication path Ethernet communication MELSECNET 10 communication etc there will be restrictions as placed on the corresponding communication path controls 2 Feature Performs remote operation of the PLC CPU 3 Format Visual Basic VBA IRet object SetCpuStatus IOperation Long IRet Returned value Output Long IOperation Remote run stop pause Input Visual C IRet object SetCpuStatus IOperation Long IRet Returned value Output Long IOperation Remote run stop pause Input VBScript varRet object SetCpuStatus varOperation VARIANT varRet Returned value LONG type Output VARIANT varOperation Remote run stop pause LONG type Input 4 Explanation e The operation specified in Operation varOperation is performed Specifying any value other than the following will result in an error 0 Remote run 4 FUNCTIONS MELSOFT 5 Returned value Normal termination 0 is returned Abnormal termination A va
160. tank If an error occurs during execution the error message and error code appear in the message box If an error has occurred refer to 6 ERROR CODES and remove the error cause Precautions for use of the sample program a Before running this sample program make communication settings on the communication setting utility to set the logical station number to 0 b In this sample program device D100 is used to denote the tank capacity and device D101 to denote the tank status 3 Sample file By default the sample program is installed into the following folders C MELSEC Act Sample VBScript SampleHTML Sample html HTML file C MELSEC Act Sample VBScript SampleHT ML Pics Fill gif Image file C MELSEC Act Sample VBScript SampleHTML Pics Frame gif Image file C MELSEC Act Sample VBScript SampleHTML Pics LampERR gif Image file C MELSEC Act Sample VBScript SampleHTML Pics LampOFF gif Image file C MELSEC Act Sample VBScript SampleHTML Pics Tank gif Image file 5 SAMPLE PROGRAMS MELSOFT 4 Screen The sample program screens will be explained a Tank capacity Empty b Tank capacity Full Tank status Normal Tank status Error Z C AMELSECMAc Mim EG CAMELSECAc Bm EG File Edit View gt Ee File Edit View gt gt i N 1 E Address x Go Links gt Address x Go Links Si My Computer Si My Computer Indicates the tank capacity Within the range 0 lt device value lt
161. te points Input Long IData n Device values to be written Input Visual C IRet object WriteDeviceBlock szDevice ISize IpIData Long IRet Returned value Output CString szDevice Device name Input Long ISize Number of write points Input Long gt IpIData Device values to be written Input VBScript varRet object WriteDeviceBlock varDevice varSize varData VARIANT varRet Returned value LONG type Output VARIANT varDevice Device name character string type Input VARIANT _ varSize Number of write points LONG type Input VARIANT varData Device values to be written Input LONG array type 4 Explanation e The device values for ISize varSize are batch written to the devices beginning with the device specified in szDevice varDevice e Store the device values to be written in Data IpIData or varData e Reserve an array of ISize varSize or more for Data IpIData or varData 4 FUNCTIONS MELSOFT 5 Device specifying methods Specify the devices in the following methods lt When bit device is specified gt lt When word device is specified gt Example 3 points from MO Example 3 points from DO 2 Upper Bytes 2 Lower Bytes MO to M15x2 2 Upper Bytes 2 Lower Bytes x1 M16 to M312 1 M32 to M472 lt When CN200 and later of 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 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lowe
162. that of the the sample program for dispatch interface Refer to Section 5 2 1 Dispatch interface 4 Screen 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 MELSOFT 5 3 VBA Sample Programs This section explains the sample programs for Excel and Access 5 3 1 Excel Sample Program This sample program is designed to log and graph the device values of the PLC CPU using the ActEasylF control This sample program was created on Excel 2000 1 Using method Open the sample sheet Type the logical station number which was specified in communication settings on the communication setting utility in the LogicalStationNumber input cell Type the first device of the devices whose data you want to read in the DeviceName input cell Type the logging interval in the LoggingTiming input cell Clicking the LoggingStart button starts logging When logging starts the past 10 device values and line graphs appear on the graph Clicking the button stops logging Note that the logging data on the screen are not cleared If an error occurs during execution the error message appears in the Message output cell and the error code appears in the Return Code output cell If an error has occurred refer to 6 ERROR CODES and remove the error cause Precautions for use o
163. 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 1802 D t te clock dat d write Ge for the PLC CPU which does not have the clock aS NE devices 0x01808001 Exit the program and restart the IBM PC AT compatible number set on the communication settings utility are unauthorised values Driver not yet started 1 he d 0x0 1808003 The network board driver is not started Sleng anyer MUTEX generation error 0x01808005 Creation of MUTEX to exercise exclusive control failed Check for a running application which uses the same port number Retry after changing the port number value of the e f property 0x01808007 A E ON d Retry alter changing the port number value on the communication settings utility Make Ethernet board and protocol settings on the control panel of the OS 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 communication settings utility Channel number specifying error Tessin i NE EE
164. the clock setting device SM1028 is ON or OFF d Among the FXCPUs setting may be made for only the FX1N clock built in FX1NC clock built in FX1S clock built in FX2N clock built in FX2NC clock built in FX2 when RTC cassette is fitted and FX2C when RTC cassette is fitted e Note that an error for transfer time will be produced in clock setting 11 About simultaneous use of MX Component and GX Developer When using GX Developer and MX Component together for the same E71 module to make Ethernet communication make the following settings a Set the protocol of the communication setting wizard screen to UDP IP b Set SW2 of the communications setting switches of the E71 module to OFF binary 12 Simultaneous access when using Q series compatible Ethernet module The following conditions should be satisfied when communication is to be made simultaneously from multiple IBM PC AT compatibles to the same module using the TCP IP protocol e The Q series compatible Ethernet module is of function version B or later e Using GX Developer Version 6 05F or later set MELSOFT connection in the Ethernet parameter open system 13 About target existence check starting interval 1 of Ethernet module If close processing Close is executed 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
165. the module is loaded to the ANNCPU or AnACPU it is recognized as a MELSECNET II module When the connected station is the ANNCPU or AnACPU set the relayed network as MELSECNET II In addition set the station number to 0 when making access to the control station 18 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 to the ANNCPU AnACPU or QnACPU via the MELSECNET 10 b On any computer link modules other than the UC24 and C24 remote PAUSE operation will result in an error for all connections c For the QC24 note that the illegal case of specifying the first I O number of a nonexisting module and reading writing U G will not return an error if the software version of the module is k or earlier d In any connection form direct coupling relaying where the target station of the UC24 or C24 is the QnACPU an error is returned if clock data read write is executed 19 Precautions for USB communication Frequently disconnecting reconnecting the USB cable or resetting or powering ON OFF the PLC CPU during communications with the PLC CPU may cause a communications error which cannot be recovered If it is not recovered completely disconnect the USB cable once and then reconnect it after 5 or more seconds have elapsed If this error occurs at the initial communic
166. 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 0 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 7 As the I O address specify the value found by dividing the actual first O number by 16 3 14 3 14 3 DETAILS OF THE ACT CONTROLS MELSOFT 3 3 6 ActAJ71E71TCP ActMLAJ71E71TCP control The following table indicates the properties possessed by the ActAJ71E71TCP ActMLAJ71E71TCP control and their default values 1 Configuration 2 Property patterns Relayed Station CPU Connected Relayed QCPU QnA ACPU Relayed Network QCPU QCPU QnA ACPU station CPU Ge module FERD odu A mode CPU 1 Q mode A mode CPU 1 oe MELsECNETIo x x2 x sa Relayed Relayed MeLsecneT x amp Josj x KJE station CPU module Ethernet x x x x Accessible Property pattern within circle
167. tible E71 6 As the I O address specify the value found by dividing the actual first O number by 16 To next page 3 9 3 9 3 DETAILS OF THE ACT CONTROLS MELSOFT a a ae Property Default Value ao e ActMultiDropChannelNumber Fixed to 0x00 Fixed to 0x00 0x00 or 0x02 5 Fixed to 0x00 Connected station Connected station side Q series side Q series compatible E71 compatible E71 network number network number Network number of Network number of ActNetworkNumber 2 target station side target station side module module ActPassword Empty Password set to the Q series compatible E71 on the connected station side 1 ActSourceNetworkNumber 3 0x01 IBM PC AT compatible side network number 2 ActSourceStationNumber 4 0x02 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 MELSECNETHH 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 valid 2 For the property pattern of or specify the value set in the target station side parameter for ActNetworkNumber and ActStati
168. tributes Cancel Class name Base class CActACPU Cwnd Header file f ctaCPU h Implementation file f ctaCPU cpp l To the next page 2 ABOUT THE ACT CONTROLS MELSOFT From the previous page l Add Member Variable SI 5 Enter the member variable name and click the button Member variable name m cAct cpu Cancel Category Control Variable type CActACPU z Description map to CActACPU member l Hed 6 Make sure that the member variable has been registered Message Maps Member Variables Automation ActiveX Events Class Info Project Class name Add Class e ACT v fact ad le C MyProjects ACTSACT 1h CA AMyProjectsVACTMACT 1 opp Serge Control IDs Delete Variable Description Cancel 2 ABOUT THE ACT CONTROLS 2 1 3 When using VBA MELSOFT Perform the following setting operation when using VBA 1 When using Microsoft Excel 2000 xcel Book 1 view Insert Format Tools Data Window Help EE Normal UI Page Break Preview Toolbars v Standard Formatting Zoom Chart y Clipboard Control Toolbox Drawing o J MITSUBISHI ActACPU Control MITSUBISHI Act AFBD Control MITSUBISHI Act4J71C24 Control MITSUBISHI ActAJ71E71TCP Control MITSUBISHI ActAJ71E71UDP Control MITSUBISHI Act4171Q0C24 Control MITSUBISHI Act4J71QE71TCP Control MITSUBISHI Act4J71QE71UDP Con
169. trol a B C 1 2 3 GH ood E 5 6 7 DIE ik View Insert Format Debug Run Tools Add Ins Window Help a xd BAO gt n alee MEG nc Kies Fu 1 Boot Excel 2000 and choose the View Toolbars Control Toolbox menu 2 Click the R button of the displayed Control Toolbox As this displays a menu choose the ACT control you want to use 3 Paste the selected ACT control to a sheet 4 Choose the Tools Macro Visual Basic Editor menu to start Visual Basic Editor 5 Perform programming on Visual Basic Editor 2 ABOUT THE ACT CONTROLS MELSOFT 2 When using Microsoft Access 2000 ES Formi Form J wv Microsoft TabStrip Control version 6 0 ER sai Microsoft Toolbar Control version 6 0 ru Microsoft Treeview Control version 6 0 Le ES Microsoft Web Browser Microsoft Windows Report Control lk eeng gp MITSUBISHI ActACPU Control MITSUBISHI Act AFBD Control MITSUBISHI ActAJ71C24 Control MITSUBISHI ActAJ71E71TCP Control amp Formi Form Detail ai Microsoft Visual Basic db1 Module1 Code ioj x A Eie Edt Yew Insert Debug Run Tools Add Ins window Help Project dbr pala amp amp db1 db1 B E Modules v t Modulet iGeneray 5 z estarations Option Compare Database E operties 4 Alphabetic Cate
170. turned value Output VBScript varRet object FreeDeviceStatus VARIANT varRet Returned value LONG type Output 4 Explanation The devices that have been set by the EntryDeviceStatus function to monitor statuses are deregistered 5 Returned value Normal termination 0is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES 4 FUNCTIONS MELSOFT 4 2 17 OnDeviceStatus Announces event 1 Applicable ACT controls This function is available for all ACT controls 2 Feature Gives event notice when the device condition registered with the EntryDeviceStatus function holds 3 Format Visual Basic Visual C VBA IRet object OnDeviceStatus szDevice IData IReturnCode BSTR szDevice Name of device whose condition Input has held Long IData Value of device whose condition Input has held Long IReturnCode Returned value of condition check Input processing VBScript varRet object OnDeviceStatus varDevice varData varReturnCode VARIANT varDevice Name of device whose condition Input has held BSTR type VARIANT varData Value of device whose condition Input has held LONG type Returned value of condition check NT R VARIA varReturnCode processing LONG type nput 4 Explanation The application is notified of an event when the device condition registered with the EntryDeviceStatus function holds Placing this function in the user application allows the a
171. ual of CPU module or network board corresponding to the error code Error detection module 0x01010000 to 0x0101FFFF 1 QCPU A mode ACPU motion controller CPU 0x01020000 to 0x0102FFFF 1 QnACPU 0x01030000 to 0x0103FFFF 1 C24 0x01040000 to 0x0104FFFF 1 QC24 N 0x01050000 to 0x0105FFFF 1 0x01060000 to 0x0106FFFF 1 QE71 MELSECNET H board MELSECNET 10 board 0x01070000 to 0x0107FFFF 1 MELSECNET II board CC Link board CPU board AF board 0x01090000 to 0x0109FFFF 1 FXCPU 0x010A0000 to 0x010AFFFF 1 QCPU Q mode 0x010B0000 to 0x010BFFFF 1 Q series compatible C24 0x010C0000 to 0x010CFFFF 1 Q series compatible E71 0x010D0000 to 0x010DFFFF 1 PC CPU module 1 Refer to Point 2 Precautions for confirming error code Precautions for confirming the error codes returned by CPU module and network board are described below a Property setting error If the used system configuration does not match the preset property values the two upper bytes do not indicate the correct error detection module For example when the property values of the ACPU have been set to ActCpuType as those of the QCPU Q mode the two upper bytes may indicate that Error detection module is the ACPU In such a case make communication again after checking the system configuration and all preset property values When the ActMulti or ActMLMulti control is used check the settings of the communication setting utility 6 ERROR CODES MELSOFT
172. umber 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 ActDestinationPort FANE gt AUGE QE71 UDP IP Fixed to 5001 ixed to r LONG Q series compatible E71 TCP IP Fixed to 5002 Q series compatible E71 UDP IP Fixed to 5001 For multidrop connection via Q series compatible C24 CC Link specify the actual I O number ActDestinationlONumber first O 16 of the last access target station When the target is the intelligent special function LONG module When the target is the CPU specify Ox3FF 3 DETAILS OF THE ACT CONTROLS MELSOFT Property Name Type ActMultiDropChannel For multidrop connection via Q series compatible C24 CC Link specify the multidrop Number connection channel number Ch1 Ch2 LONG Invalid for other connections You can select the MELSECNET H or MELSECNET 10 mode to ma
173. unication error may occur within the preset time out period at a communication start e g when the communication diagnostic button is pressed at a monitor start or at the execution of any function These errors are assumed to be detected before a time out error Example Connection cable not connected at PLC power off 30 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 protocol 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
174. ut VARIANT IpvarHour Read hour value SHORT type Output VARIANT lIpvarMinute Read minute value SHORT type Output VARIANT lpvarSecond Read second value SHORT type Output 4 Explanation e An error is returned if correct clock data is not set to the PLC CPU As the value stored into iYear lpsYear or lpvarYear 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 e The value stored into iDayOfWeek lpsDayOfWeek or lpvarDayOfWeek is as follows Day of Week Sunda Monday Tuesda Wednesday Thursday Friday Saturday 5 Returned value Normal termination 0 is returned Abnormal termination Any value other than 0 is returned Refer to Chapter 6 ERROR CODES 1 Clock data cannot be read from the AOQJ2HCPU A2CCPU and A2CJCPU as they do not have clock data 2 The QCPU A mode and ACPU can get clock data only when the target station is in the STOP status 3 For the FXCPU clock data can be read from the FX1N FX1NC FX1S FX2N or FX2NC when it has a built in clock or from the FX2 or FX2C when it is fitted with the RTC cassette An error is returned if the FXCPU is other than the FX1N FX1NG FX1S FX2 FX2c FX2N and FX2NC 4 Note that an error of transfer time is produced in clock setting 4 FUNCTIONS MELSOFT 4 2 12 SetClockData Clock data write 1 Applicable ACT controls The applicable A
175. value Output String szDeviceList Device name Input Long ISize Number of write points Input Long IData n Device values to be written Input Visual C IRet object WriteDeviceRandom szDeviceList ISize IpIData Long IRet Returned value Output CString szDeviceList Device name Input Long ISize Number of write points Input Long IpIData Device values to be written Intput VBScript varRet object WriteDeviceRandom varDeviceList varSize varData VARIANT varRet Returned value LONG type Output VARIANT varDeviceList Device name character string type Input VARIANT varSize Number of write points LONG type Input Device values to be written VARIANT D Input verkets LONG array type PS 4 Explanation e The device values for ISize are written to the devices specified in szDeviceList e The read device values are stored in IData IpIData or varData e 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 Visual Basic VBA VBScript DO amp voLf amp D1 amp vbLf amp D2 Visual C 9 DO nD1 nD2 e Reserve an array of ISize varSize or more for Data IpIData or varData 4 FUNCTIONS MELSOFT 5 Device specifying methods Specify the devices in the following methods Example 1 When devices are specified as follows 3 points When using Visual Basic VBA VBScript MO amp vbLf
176. value of COM Output BSTR szDeviceList Device name Input LONG IpIData Set data Input LONG lpIRetCode Returned value of communication function Output 4 3 8 GetDevice Device data acquisition hResult object GetDevice szDeviceList pIData IpIRetCode HRESULT hResult Returned value of COM Output BSTR szDeviceList Device name Input LONG IpIData Set data Output LONG lpIRetCode Returned value of communication function Output 4 FUNCTIONS 4 3 9 ReadBuffer Buffer memory read MELSOFT hResult object ReadBuffer IStartlO Address IReadSize HRESULT LONG LONG LONG SHORT LONG hResult IStartlO lAddress IReadSize lpsData pIRetCode 4 3 10 WriteBuffer Buffer memory write IpsData IpIRetCode 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 IStartIO Address IWriteSize HRESULT LONG LONG LONG SHORT LONG hResult IStartlO lAddress IWriteSize IpsData IpIRetCode 4 3 11 GetClockDSata Clock data read lpsData IpIRetCode Returned value of COM Output First I O 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
177. written Long lAddress Buffer memory address Input Long IWriteSize Write size Input Short IpsData Values written to buffer memory Input 4 17 4 17 4 FUNCTIONS MELSOFT VBScript varRet object WriteBuffer varStartlO varAddress varWriteSize varData VARIANT varRet Returned value LONG type Output VARIANT varStartlO First O number of module to Input where values will be written LONG type VARIANT varAddress Buffer memory address Input LONG type VARIANT varWriteSize Write size LONG type Input VARIANT varData Values written to buffer memory Input SHORT array type 4 Explanation As the module I O number specified in IStartlO varStartlO specify a value found by dividing the actual I O number by 16 e The buffer values for IWriteSize varWriteSize at the buffer memory address specified in Address varAddress in the special function module located at the first HO number specified in IStartlO varStartlO are written e When using the Act ML FXCPU control or Act ML LLT control specify the block number 0 to 7 of the special expansion equipment as the module s first I O number and any of 0 to 32767 as the buffer memory address e Reserve an array of IWriteSize varWriteSize or more for iData IpsData or varData 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
178. x0180100D GetProcAddress failure Reinstall MX Component Exit the program and restart the IBM PC AT compatible 0x0180100E DLL non load error Reinstall MX Component Another Object in execution 0x0180100F Method cannot be executed because of exclusive control in progress Device error The device character string specified in the 0x01802001 f b method is an unauthorised device character string Device number error 0x01802002 The device character string number specified in the method is an unauthorised device number Sumcheck error 0x01802004 The sumcheck value of the received data is abnormal Size error 0x01802005 The number of points specified in the method is unauthorised pe Block number error The block specifying number in the device 0x01802006 ee e character string specified in the method is unauthorised Receive data error The data received is abnormal PLC type mismatch The CPU type set to the property and the CPU 0x0180200B type set on the communication settings utility do not match the CPU type on the other end of communication 8 6 2 Execute again after some time Review the device name Review the device number Check the module side sumcheck setting Check the sumcheck property of the control Check the cable Exit the program and restart the IBM PC AT compatible Reinstall MX Component Check the number of points specified in the method Review the system e g PLC C

Download Pdf Manuals

image

Related Search

Related Contents

Cyber Acoustics ACM-7000 headphone  HOBO Weather Station User`s Guide  APC AV Black In-Wall Power Filter and Connection Kit  日本翻訳ジャーナル 翻 訳 の 未 来 を 考 え る  dreamGEAR Rumble Pad Wireless  Bedienungsanleitung  Sony Ericsson S302 User Guide  

Copyright © All rights reserved.
Failed to retrieve file