• 沒有找到結果。

WriteDeviceRandom (Device random-write) (1) Applicable ACT controls

(6) Returned value

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 BasicR , VBA : lRet = object.WriteDeviceRandom(szDeviceList, lSize, lData(0))

Long lRet Returned value Output

String szDeviceList Device name Input

Long lSize Number of write points Input

Long lData(n) Device values to be written Input

Visual C++R : lRet = object.WriteDeviceRandom(szDeviceList, lSize, lplData)

Long lRet Returned value Output

CString szDeviceList Device name Input

Long lSize Number of write points Input

Long lplData 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 VARIANT varData Device values to be written

(LONG array type) Input

(4) Explanation

• The device values for lSize are written to the devices specified in szDeviceList.

• The read device values are stored in lData (lplData or varData).

• 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 BasicR , VBA, VBScript : "D0" & vbLf & "D1" & vbLf & "D2"

Visual C++R : D0\nD1\nD2

• Reserve an array of lSize (varSize) or more for lData (lplData or varData).

(5) Device specifying methods

Specify the devices in the following methods.

(Example 1) When devices are specified as follows (3 points)

When using Visual BasicR , VBA, VBScript : M0 & vbLf & D0 & vbLf & K8M0

When using Visual C++R : M0\nD0\nK8M0

2 Upper Bytes 2 Lower Bytes

1 M0

1 D0

M16 to M31 2 M0 to M15 2

(Example 2) When devices including CN200 and later of FXCPU are specified (3 points in all) 3

When using Visual BasicR , VBA, VBScript : D0 & vbLf & CN200 & vbLf & D1

When using Visual C++R : D0\nCN200\nD1

2 Upper Bytes 2 Lower Bytes

1 D0

H of CN200 L of CN200

1 D1

(Example 3) When devices including FD are specified (3 points in all)

When using Visual BasicR , VBA, VBScript : D0 & vbLf & FD0 & vbLf & D1

When using Visual C++R : D0\nFD0\nD1

2 Upper Bytes 2 Lower Bytes

1 D0

1 LL of FD

1 D1

1: Not used. (0 is stored.)

2: Lower bits are stored in device number order.

3: For CN200 or later of FXCPU, 2 words are 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.)

POINT

(1) The maximum number of write points that may be specified in lSize(varSize) is up to 0x7FFFFFFF points.

(2) For lData(lplData or varData), prepare a memory area having the number of points specified in lSize(varSize).

If there is no memory area, a critical phenomenon such as an application error may occur.

4.2.7 SetDevice (Device data setting)

(1) Applicable ACT controls

This function is available for all ACT controls.

(2) Feature

Sets one point of device.

(3) Format

Visual BasicR , VBA : lRet = object.SetDevice(szDevice, lData)

Long lRet Returned value Output

String szDevice Device name Input

Long lData Set data Input

Visual C++R : lRet = object.SetDevice(szDevice, lplData)

Long lRet Returned value Output

CString szDevice Device name Input

Long lplData 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

• The operation specified in lData(lplData or varData) is performed for one point of device specified in szDevice(varDevice).

• When the bit device is specified, the least significant bit of the lData value (lplData value or varData value) becomes valid.

(5) Device specifying methods

Specify the devices in the following methods.

<When bit device is specified> <When word device is specified>

(Example) M0 (Example) D0

2 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lower Bytes

1 M0 1 D0

<When double-word device is specified> <When CN200 or later of FXCPU is specified>

(Example) K8M0 (Example) CN200

2 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lower Bytes

M16 to M31 2 M0 to M15 2 H of CN200 L of CN200

1: Not used. (0 is stored.)

2: Lower bits are stored in device number order.

(6) Returned value

Normal termination : 0 is returned.

Abnormal termination : Any value other than 0 is returned.

(Refer to Chapter 6 ERROR CODES.)

4.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 BasicR , VBA : lRet = object.GetDevice(szDevice, lData)

Long lRet Returned value Output

String szDevice Device name Input

Long lData Acquired data Output

Visual C++R : lRet = object.GetDevice(szDevice, lplData)

Long lRet Returned value Output

CString szDevice Device name Input

Long lplData Acquired data Output

VBScript : varRet = object.GetDevice(varDevice, lpvarData)

VARIANT varRet Returned value (LONG type) Output VARIANT varDevice Device name

(character string type) Input VARIANT lpvarData Acquired data (LONG type) Output

(4) Explanation

The data of one point of device specified in szDevice(varDevice) is stored into lData(lplData or lpvarData).

(5) Device specifying methods

Specify the devices in the following methods.

<When bit device is specified> <When word device is specified>

(Example) M0 (Example) D0

2 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lower Bytes

1 M0 1 D0

<When double-word device is specified> <When CN200 or later of FXCPU is specified>

(Example) K8M0 (Example) CN200

2 Upper Bytes 2 Lower Bytes 2 Upper Bytes 2 Lower Bytes

M16 to M31 2 M0 to M15 2 H of CN200 L of CN200

1: Not used. (0 is stored.)

2: Lower bits are stored in device number order.

(6) Returned value

Normal termination : 0 is returned.

Abnormal termination : Any value other than 0 is returned.

(Refer to Chapter 6 ERROR CODES.)

4.2.9 ReadBuffer (Buffer memory read)

(1) Applicable ACT controls

The applicable ACT controls are indicated below.

Control Name Usability Control Name Usability

ActEasyIF, ActMLEasyIF 7 ActAJ71QE71UDP, ActMLAJ71QE71UDP 1, 2

ActQCPUQ, ActMLQCPUQ ActAJ71E71TCP, ActMLAJ71E71TCP 1

ActQCPUA, ActMLQCPUA ActAJ71E71UDP, ActMLAJ71E71UDP 1

ActQnACPU, ActMLQnACPU ActQCPUQUSB, ActMLQCPUQUSB

ActACPU, ActMLACPU ActCCG4QnA, ActMLCCG4QnA

ActFXCPU, ActMLFXCPU 4 ActCCG4A, ActMLCCG4A

ActQJ71C24, ActMLQJ71C24 ActMnet10BD, ActMLMnet10BD 3

ActAJ71QC24, ActMLAJ71QC24 ActMnetHBD, ActMLMnetHBD 3

ActAJ71UC24, ActMLAJ71UC24 ActCCBD, ActMLCCBD 3

ActAJ71C24, ActMLAJ71C24 ActAnUBD, ActMLAnUBD 6

ActQJ71E71TCP, ActMLQJ71E71TCP ActLLT, ActMLLLT 5

ActQJ71E71UDP, ActMLQJ71E71UDP ActQCPUQBus, ActMLQCPUQBus

ActAJ71QE71TCP, ActMLAJ71QE71TCP : Usable : Unusable

1: An error is returned if access to the AnUCPU, QCPU (A mode), A173UHCPU(-S1) or A273UH-S3) is made.

2: An error is returned if access to the QnACPU is made.

3: An error is returned if own board access is made.

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 FX0N, FX2, FX2C, FX2N and FX2NC. 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

Reads the buffer memory values of the special function module.

(3) Format

Visual BasicR , VBA :lRet = object.ReadBuffer(lStartIO, lAddress, lReadSize, iData(0))

Long lRet Returned value Output

Long lStartIO First I/O number of module from where values will be read

Input

Long lAddress Buffer memory address Input

Long lReadSize Read size Input

Integer iData(n) Values read from buffer memory Output Visual C++R :lRet = object.ReadBuffer(lStartIO, lAddress, lReadSize lpsData)

Long lRet Returned value Output

Long lStartIO First I/O number of module from where values will be read

Input

Long lAddress Buffer memory address Input

Long lReadSize Read size Input

Short lpsData Values read from buffer memory Output

VBScript :varRet = object.ReadBuffer(varStartIO, varAddress, varReadSize, lpvarData)

VARIANT varRet Returned value(LONG type) Output VARIANT varStartIO First I/O number of module from

where values will be read (LONG type)

Input

VARIANT varAddress Buffer memory address(LONG type) Input VARIANT varReadSize Read size(LONG type) Input VARIANT lpvarData Values read from buffer memory

(SHORT array type) Output

(4) Explanation

• As the module I/O number specified in lStartIO(varStartIO), specify a value found by dividing the actual I/O number by 16.

• The buffer values for lReadSize(varReadSize) at the buffer memory address specified in lAddress(varAddress) in the special function module located at the first I/O number specified in lStartIO(varStartIO) are read.

• 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.

• Reserve an array of lReadSize (varReadSize) or more for iData (lplData 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.)

POINT

(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 lReadSize(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.2.10 WriteBuffer (Buffer memory write)

(1) Applicable ACT controls

The applicable ACT controls are indicated below.

Control Name Usability Control Name Usability

ActEasyIF, ActMLEasyIF 7 ActAJ71QE71UDP, ActMLAJ71QE71UDP 1, 2

ActQCPUQ, ActMLQCPUQ ActAJ71E71TCP, ActMLAJ71E71TCP 1

ActQCPUA, ActMLQCPUA ActAJ71E71UDP, ActMLAJ71E71UDP 1

ActQnACPU, ActMLQnACPU ActQCPUQUSB, ActMLQCPUQUSB

ActACPU, ActMLACPU ActCCG4QnA, ActMLCCG4QnA

ActFXCPU, ActMLFXCPU 4 ActCCG4A, ActMLCCG4A

ActQJ71C24, ActMLQJ71C24 ActMnet10BD, ActMLMnet10BD 3

ActAJ71QC24, ActMLAJ71QC24 ActMnetHBD, ActMLMnetHBD 3

ActAJ71UC24, ActMLAJ71UC24 ActCCBD, ActMLCCBD 3

ActAJ71C24, ActMLAJ71C24 ActAnUBD, ActMLAnUBD 6

ActQJ71E71TCP, ActMLQJ71E71TCP ActLLT, ActMLLLT 5

ActQJ71E71UDP, ActMLQJ71E71UDP ActQCPUQBus, ActMLQCPUQBus

ActAJ71QE71TCP, ActMLAJ71QE71TCP : Usable : Unusable

1: An error is returned if access to the AnUCPU, QCPU (A mode), A173UHCPU(-S1) or A273UH(-S3) is made.

2: An error is returned if access to the QnACPU is made.

3: An error is returned if own board access is made.

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 FX0N, FX2, FX2C, FX2N and FX2NC. 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 BasicR , VBA : lRet = object.WriteBuffer(lStartIO, lAddress, lWriteSize, iData(0))

Long lRet Returned value Output

Long lStartIO First I/O number of module to where values will be written

Input

Long lAddress Buffer memory address Input

Long lWriteSize Write size Input

Integer iData(n) Values written to buffer memory Input Visual C++R : lRet = object. WriteBuffer(lStartIO, lAddress, lWriteSize lpsData)

Long lRet Returned value Output

Long lStartIO First I/O number of module to where values will be written

Input

Long lAddress Buffer memory address Input

Long lWriteSize Write size Input

VBScript : varRet = object.WriteBuffer(varStartIO, varAddress, varWriteSize, varData)

VARIANT varRet Returned value (LONG type) Output VARIANT varStartIO First I/O number of module to

where values will be written (LONG type)

Input

VARIANT varAddress Buffer memory address

(LONG type) Input

VARIANT varWriteSize Write size (LONG type) Input VARIANT varData Values written to buffer memory

(SHORT array type) Input

(4) Explanation

• As the module I/O number specified in lStartIO(varStartIO), specify a value found by dividing the actual I/O number by 16.

• The buffer values for lWriteSize(varWriteSize) at the buffer memory address specified in lAddress(varAddress) in the special function module located at the first I/O number specified in lStartIO(varStartIO) are written.

• 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.

• Reserve an array of lWriteSize (varWriteSize) or more for iData (lpsData 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.)

POINT

(1) An error is returned if access to the motion controller CPU is made.

(2) For iData(lpsData,varData), prepare a memory area having the number of points specified in lWriteSize(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.2.11 GetClockData (Clock data read)

(1) Applicable ACT controls

The applicable ACT controls are indicated below.

Control Name Usability Control Name Usability

ActEasyIF, ActMLEasyIF 4 ActAJ71QE71UDP, ActMLAJ71QE71UDP

ActQCPUQ, ActMLQCPUQ ActAJ71E71TCP, ActMLAJ71E71TCP 2

ActQCPUA, ActMLQCPUA ActAJ71E71UDP, ActMLAJ71E71UDP 2

ActQnACPU, ActMLQnACPU ActQCPUQUSB, ActMLQCPUQUSB

ActACPU, ActMLACPU ActCCG4QnA, ActMLCCG4QnA

ActFXCPU, ActMLFXCPU ActCCG4A, ActMLCCG4A

ActQJ71C24, ActMLQJ71C24 ActMnet10BD, ActMLMnet10BD 1

ActAJ71QC24, ActMLAJ71QC24 2 ActMnetHBD, ActMLMnetHBD 1

ActAJ71UC24, ActMLAJ71UC24 2 ActCCBD, ActMLCCBD 1

ActAJ71C24, ActMLAJ71C24 ActAnUBD, ActMLAnUBD 3

ActQJ71E71TCP, ActMLQJ71E71TCP ActLLT, ActMLLLT

ActQJ71E71UDP, ActMLQJ71E71UDP ActQCPUQBus, ActMLQCPUQBus

ActAJ71QE71TCP, ActMLAJ71QE71TCP : Usable : 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).

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

Reads time from the clock data of the PLC CPU.

(3) Format

Visual BasicR , VBA : lRet = object.GetClockData(iYear, iMonth, iDay,

iDayOfWeek, iHour, iMinute, iSecond)

Long lRet 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++R : lRet = object. GetClockData( lpsYear, lpsMonth, lpsDay, lpsDayOfWeek, lpsHour, lpsMinute, lpsSecond)

Long lRet Returned value Output

Short lpsYear Read year value Output

Short lpsMonth Read month value Output

Short lpsDay Read day value Output

Short lpsDaYOfWeek Read day-of-week value Output

Short lpsHour Read hour value Output

Short lpsMinute Read minute value Output

VBScript : varRet = object.GetClockData(lpvarYear, lpvarMonth, lpvarDay, lpvarDayOfWeek, lpvarHour, lpvarMinute, lpSecond) VARIANT varRet Returned value(LONG type) Output VARIANT lpvarYear Read year value(SHORT type) Output VARIANT lpvarManth Read month value(SHORT type) Output VARIANT lpvarDay Read day value(SHORT type) Output VARIANT lpvarDayOfWeek Read day-of-week value(SHORT type) Output VARIANT lpvarHour Read hour value(SHORT type) Output VARIANT lpvarMinute Read minute value(SHORT type) Output VARIANT lpvarSecond Read second value(SHORT type) Output

(4) Explanation

• 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.

• The value stored into iDayOfWeek (lpsDayOfWeek or lpvarDayOfWeek) is as follows.

Value Day of Week

0 Sunday

1 Monday

2 Tuesday

3 Wednesday

4 Thursday

5 Friday

6 Saturday

(5) Returned value

Normal termination : 0 is returned.

Abnormal termination : Any value other than 0 is returned.

(Refer to Chapter 6 ERROR CODES.)

POINT

(1) Clock data cannot be read from the A0J2HCPU, A2CCPU and A2CJCPU as they do not have clock data.

(2) 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, FX1NC,FX1S, FX2, FX2C, FX2N and FX2NC.

(4) Note that an error of transfer time is produced in clock setting.

4.2.12 SetClockData (Clock data write)

(1) Applicable ACT controls

The applicable ACT controls are indicated below.

Control Name Usability Control Name Usability

ActEasyIF, ActMLEasyIF 4 ActAJ71QE71UDP, ActMLAJ71QE71UDP

ActQCPUQ, ActMLQCPUQ ActAJ71E71TCP, ActMLAJ71E71TCP 2

ActQCPUA, ActMLQCPUA ActAJ71E71UDP, ActMLAJ71E71UDP 2

ActQnACPU, ActMLQnACPU ActQCPUQUSB, ActMLQCPUQUSB

ActACPU, ActMLACPU ActCCG4QnA, ActMLCCG4QnA

ActFXCPU, ActMLFXCPU ActCCG4A, ActMLCCG4A

ActQJ71C24, ActMLQJ71C24 ActMnet10BD, ActMLMnet10BD 1

ActAJ71QC24, ActMLAJ71QC24 2 ActMnetHBD, ActMLMnetHBD 1

ActAJ71UC24, ActMLAJ71UC24 2 ActCCBD, ActMLCCBD 1

ActAJ71C24, ActMLAJ71C24 ActAnUBD, ActMLAnUBD 3

ActQJ71E71TCP, ActMLQJ71E71TCP ActLLT, ActMLLLT

ActQJ71E71UDP, ActMLQJ71E71UDP ActQCPUQBus, ActMLQCPUQBus

ActAJ71QE71TCP, ActMLAJ71QE71TCP : Usable : 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).

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 BasicR , VBA : lRet = object.SetClockData(iYear, iMonth, iDay,

iDayOfWeek, iHour, iMinute, iSecond)

Long lRet 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 Minute value to be written Input Integer iSecond Second value to be written Input Visual C++R : lRet = object.SetClockData (sYear, sMonth, sDay, sDayOfWeek,

sHour, sMinute, sSecond)

Long lRet 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

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 Day-of-week value to be written

(SHORT type) 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 error will occur if a four-digit year is set to any CPU other than the QCPU (Q mode).

• The value to be specified in iDayOfWeek (sDayOfWeek or varDayOfWeek) is as follows.

Value Day of Week

0 Sunday

1 Monday

2 Tuesday

3 Wednesday

4 Thursday

5 Friday

6 Saturday

(5) Returned value

Normal termination : 0 is returned.

Abnormal termination : Any value other than 0 is returned.

(Refer to Chapter 6 ERROR CODES.)

POINT

(1) Clock data cannot be read from the A0J2HCPU, A2CCPU and A2CJCPU as they do not have clock data.

(2) For the QCPU (A mode) and ACPU, clock data can be set only when the target station is in the STOP status.

(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, FX1NC, FX1S, FX2, FX2C, FX2N and FX2NC.

(5) Note that an error of transfer time is produced in clock setting.

4.2.13 GetCpuType (PLC CPU type read)

(1) Applicable ACT controls

This function is available for all ACT controls 1.

1: 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 BasicR , VBA : lRet = object.GetCpuType(szCpuName, lCpuType)

Long lRet Returned value Output

String szCpuName PLC CPU type character string Output

Long lCpuType PLC CPU type code Output

Visual C++R : lRet = object.GetCpuType( szCpuType, lplCpuType)

Long lRet Returned value Output

BSTR szCpuName PLC CPU type character string Output

Long lplCpuType PLC CPU type code Output

VBScript : varRet = object.GetCpuType(varCpuName, lpvarCpuCode)

VARIANT varRet Returned value(LONG type) Output

VARIANT lpvarCpuName PLC CPU type character string

(character string type) Output VARIANT lpvarCpuCode PLC CPU type code(LONG type) Output

(4) Explanation

• The type of the PLC which is making communication is stored into szCpuName (lpvarCpuName) and its type code into lCpuType (lplCpuType or lpvarCpuCode).

• The PLC CPU type character string is returned in UNICODE.

相關文件