CPKSoft Engineering

XCVMBDM.tlk Driver Reference

Circutor CVM-BD Memory Download Protocol Driver

This driver requires that you have TAS-HMITalk 8.04 installed.

Driver Overview

XCVMBDM driver allows you to download information from CIRCUTOR

Supply Network Analyzers of the CVM-BD Series.

 

This driver has been elaborated according to the Circutor

Instruction Manual M981 360/97C and further information

supplied by Circutor S.A.

Supported Equipment Type

Power Meters

Supported Devices List

CIRCUTOR CVM-BD Supply Network Analyzers

Supported Commands List

Read RS-485 Buffer Size

Read Number of Fields in Each Record

Read Field Codes

Read Record Time

Read File Size

Read First Record Date

Read Last Record Date

Read Memory Block

Append Memory Contents To File

Clear Memory

Read Device Identification Number (Long)

Write Device Identification Number (Long)

Read Device Identification Number (Ascii)

Write Device Identification Number (Ascii)

Read Active Campaign Number

Write Active Campaign Number

Read Campaign Related Codes

Write Campaign Related Codes

Read Record Period

Write Record Period

Read list of value-codes to be recorded

Select value-codes to be recorded

Read RS-485 Buffer Size

COMMAND DESCRIPTION:

Reads the number of bytes available in the RS-485 buffer,

which is 256 by default. This indicates the maximum number

of bytes that can be transferred at a time.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 0

 

RETURNS:

- HMITalk1.PointValue(0) = RS-485 buffer size in bytes

Read Number of Fields in Each Record

COMMAND DESCRIPTION:

Reads the record descriptor and returns the number of fields

available in each record.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 1

 

RETURNS:

- HMITalk1.PointValue(0) = Number of fields

Read Field Codes

COMMAND DESCRIPTION:

Returns a list of PointValues containing the codes for

each field being recorded. All fields are 2-bytes long

and fields from 132 to 167 must come in pairs to form a

4-bytes-long field.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1-50

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 2

 

RETURNS:

- HMITalk1.PointValue(0) = Code for field 1

- HMITalk1.PointValue(1) = Code for field 2

.

.

.

- HMITalk1.PointValue(n-1) = Code for field n

Read Record Time

COMMAND DESCRIPTION:

Reads the time basis used to store a new record into

memory.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 3

 

RETURNS:

- HMITalk1.PointValue(0) = Record Time in Seconds

Read File Size

COMMAND DESCRIPTION:

Reads the available file size, in bytes.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 4

HMITalk1.DriverP8 = Source filename to be requested from the

device's memory. If left blank, the name

"STD-PROG.CVT" will be used by default.

Source filename must have exactly 12-chars.

 

RETURNS:

- HMITalk1.PointValue(0) = File size in bytes.

Read First Record Date

COMMAND DESCRIPTION:

Reads the date of the first record available in the memory file.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 5

HMITalk1.DriverP8 = Source filename to be requested from the

device's memory. If left blank, the name

"STD-PROG.CVT" will be used by default.

Source filename must have exactly 12-chars.

 

RETURNS:

- HMITalk1.PointValue(0) = Date of first record

Read Last Record Date

COMMAND DESCRIPTION:

Reads the date of the last record available in the memory file.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 6

HMITalk1.DriverP2 = Record size (=2*vars+4*energies+6)

vars=codes other than 132 to 167

energies=codes from 132 to 167

HMITalk1.DriverP3 = File size (as returned by

'Read File Size' command)

HMITalk1.DriverP8 = Source filename to be requested from the

device's memory. If left blank, the name

"STD-PROG.CVT" will be used by default.

Source filename must have exactly 12-chars.

 

RETURNS:

- HMITalk1.PointValue(0) = Date of last record

Read Memory Block

COMMAND DESCRIPTION:

Reads a portion of the device's memory given a starting offset

position and the number of bytes to be read.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1-125 (bytes to read)

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 7

HMITalk1.DriverP2 = Starting memory offset

HMITalk1.DriverP8 = Source filename to be requested from the

device's memory. If left blank, the name

"STD-PROG.CVT" will be used by default.

Source filename must have exactly 12-chars.

 

RETURNS:

- HMITalk1.PointValue(0) = First byte value

- HMITalk1.PointValue(1) = Second byte value

.

.

.

- HMITalk1.PointValue(n-1) = Last byte value

Append Memory Contents To File

COMMAND DESCRIPTION:

Reads all the information available in the device's memory

and writes it to a file with the following logic:

1) If the file does not exist, the driver creates a new one.

The memory contents are automatically cleared.

2) If the file already exists and the file header is

identical to that stored in the current device's memory,

all the bytes read (except the header) are appended to the

file. The memory contents are automatically cleared.

3) If the file already exists and the file header is

identical to that stored in the current device's memory,

the memory reading process is aborted and PointValue(0)

is set to -1 to inform that the existing file is

not compatible with the collected information. The memory

contents are not cleared.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 8

HMITalk1.DriverP2 = Number of retries with each block

transfer before abandoning the communication.

If left blank, up to 10 retries will be allowed.

HMITalk1.DriverP3 = Size of each memory-block being transferred.

The block size migth be limited by the device's

transmission buffer size. If left blank, blocks

are read in groups of 125 bytes. Range is 1 to 125.

HMITalk1.DriverP4 = 0-perform header comparison

1-ignore header comparison

If header comparison is ignored,

all the bytes read (except the header

itself) will be always appended

to the disk file if it already exists.

HMITalk1.DriverP5 = Header size in bytes. If left blank or

if 0, the driver will assume a default

value of 192. Max. possible value is 250.

HMITalk1.DriverP6 = Destination filename where the received information

will be locally stored (including full path).

HMITalk1.DriverP7 = Indicates if the device's memory contents

must be cleared after the reading process:

- 0 or blank = ERASE AFTER READING

- 1 = DO NOT ERASE AFTER READING

HMITalk1.DriverP8 = Source filename to be requested from the

device's memory. If left blank, the name

"STD-PROG.CVT" will be used by default.

Source filename must have exactly 12-chars.

 

RETURNS:

- HMITalk1.PointValue(0) = Total number of bytes actually

appended to the file.

 

NOTE:

If PointValue(0) = -1, indicates that current file header contents

are not compatible with current device's memory header contents

and that the file and the memory contents where not modified.

It is up to the user to remove the file or to point the

DriverP6 parameter to a compatible file.

Clear Memory

COMMAND DESCRIPTION:

Sends an order to clear the device's internal memory.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Digital Output

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 1

Read Device Identification Number (Long)

COMMAND DESCRIPTION:

Reads the device's identification number as a

long integer number from 00000000 to 99999999.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 9

 

RETURNS:

- HMITalk1.PointValue(0) = Identification number

Write Device Identification Number (Long)

COMMAND DESCRIPTION:

Writes the device's identification number as a

long integer number from 00000000 to 99999999.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Output

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 9

 

WHERE:

- HMITalk1.PointValue(0) = Identification number

Read Device Identification Number (Ascii)

COMMAND DESCRIPTION:

Reads the device's identification number as a

series of 8 individual ASCII codes for each char

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 8

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 10

 

RETURNS:

- HMITalk1.PointValue(0) = Id number first ASCII char code

- HMITalk1.PointValue(1) = Id number second ASCII char code

.

.

.

- HMITalk1.PointValue(7) = Id number last ASCII char code

Write Device Identification Number (Ascii)

COMMAND DESCRIPTION:

Writes the device's identification number as a

series of 8 individual ASCII codes for each char.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Output

HMITalk1.DriverNumPoints = 8

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 10

 

WHERE:

- HMITalk1.PointValue(0) = Id number first ASCII char code

- HMITalk1.PointValue(1) = Id number second ASCII char code

.

.

.

- HMITalk1.PointValue(7) = Id number last ASCII char code

Read Active Campaign Number

COMMAND DESCRIPTION:

Reads the active campaign number.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 11

 

RETURNS:

- HMITalk1.PointValue(0) = Active campaign number (0-9)

Write Active Campaign Number

COMMAND DESCRIPTION:

Writes the active campaign number.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Output

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 11

 

WHERE:

- HMITalk1.PointValue(0) = Active campaign number (0-9)

Read Campaign Related Codes

COMMAND DESCRIPTION:

Reads a series of codes related to the specified

campaign number. The first code returned is the installation

code an consists of 22 individual ASCII chars. The second and

last code returned is the clamp relation and consists of

3 additional ASCII chars.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 26

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 12

HMITalk1.DriverP2 = Campaign code (0-9)

 

RETURNS:

- HMITalk1.PointValue(0) = Installation code first ASCII char

.

.

.

- HMITalk1.PointValue(21) = Installation code first ASCII char code

- HMITalk1.PointValue(22) = Clamp relation first ASCII char

.

.

- HMITalk1.PointValue(24) = Clamp relation last ASCII char code

- HMITalk1.PointValue(25) = Same campaign code indicated in DriverP2

Write Campaign Related Codes

COMMAND DESCRIPTION:

Writes a series of codes related to the specified

campaign number. The first 22 values written are the

ASCII chars that correspond to the installation code.

The remaining 3 values are the ASCII chars for the

clamp relation.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Output

HMITalk1.DriverNumPoints = 25

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 12

HMITalk1.DriverP2 = Campaign code (0-9)

 

WHERE:

- HMITalk1.PointValue(0) = Installation code first ASCII char

.

.

- HMITalk1.PointValue(21) = Installation code first ASCII char code

- HMITalk1.PointValue(22) = Clamp relation first ASCII char

.

.

- HMITalk1.PointValue(24) = Clamp relation last ASCII char code

Read Record Period

COMMAND DESCRIPTION:

Reads the record period in seconds.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 13

 

RETURNS:

- HMITalk1.PointValue(0) = Record period (in seconds)

Write Record Period

COMMAND DESCRIPTION:

Writes the record period in seconds.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Output

HMITalk1.DriverNumPoints = 1

HMITalk1.DriverP0 = Unit Address (0-99).

HMITalk1.DriverP1 = 13

 

WHERE:

- HMITalk1.PointValue(0) = Record period (in seconds)

Read list of value-codes to be recorded

COMMAND DESCRIPTION:

Reads a list of the active value-codes that are being recorded

in the memory file.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Input

HMITalk1.DriverNumPoints = 2-31

HMITalk1.DriverP0 = Unit Address (1-255).

HMITalk1.DriverP1 = 14

HMITalk1.DriverP2 = Offset (0-999)

 

RETURNS:

- HMITalk1.PointValue(0) = First value-code

- HMITalk1.PointValue(1) = Second value-code

.

.

.

- HMITalk1.PointValue(NumPoints-2) = Last value-code

- HMITalk1.PointValue(NumPoints-1) = Current mode (0 or 1)

Select value-codes to be recorded

COMMAND DESCRIPTION:

Indicates what measurements must be recorded in the

memory file.

 

PROPERTY SETTINGS REQUIRED:

HMITalk1.DriverDataType = Analog Output

HMITalk1.DriverNumPoints = 1-30

HMITalk1.DriverP0 = Unit Address (1-255).

HMITalk1.DriverP1 = 14

HMITalk1.DriverP2 = Offset (0-999)

HMITalk1.DriverP3 = Mode (0 or 1)

HMITalk1.DriverP6 = Filename (8 chars)

 

WHERE:

- HMITalk1.PointValue(0) = First value-code (0-999)

- HMITalk1.PointValue(1) = Second value-code (0-999)

.

.

.

- HMITalk1.PointValue(NumPoints-1) = Last value-code (0-999)

Returned Errors List

[1005] DRIVER (Internal): Invalid driver stage

[1201] DRIVER (System): Error closing %s

[1202] DRIVER (System): Error creating %s

[1204] DRIVER (System): Error opening %s

[1208] DRIVER (System): Error seeking end of %s

[1210] DRIVER (System): Error writing to %s

[1212] DRIVER (System): Invalid length for %s

[1300] PROTOCOL (Timeout): No answer

[1433] PROTOCOL (Format): Validation error in device response

[2119] CONFIG (NumValues): Invalid number of values (must be 25)

[2120] CONFIG (NumValues): Invalid number of values (must be 26)

[2131] CONFIG (NumValues): Invalid number of values (must be 8)

[2147] CONFIG (NumValues): Only one value can be read or written

[2148] CONFIG (NumValues): Only one value can be requested

[2152] CONFIG (NumValues): Too many bytes requested (max=125)

[2226] CONFIG (NumValues): Too many values (max=6)

[2263] CONFIG (NumValues): Too many values requested (max=50)

[3018] CONFIG (P0): Invalid device address (0-99)

[3508] CONFIG (P1): Invalid command

[4026] CONFIG (P2): Invalid campaign code (0-9)

[4064] CONFIG (P2): Invalid first register (0-999)

[4076] CONFIG (P2): Invalid offset

[4077] CONFIG (P2): Invalid offset (0-999)

[4542] CONFIG (P3): Invalid memory-block size (1-125)

[4545] CONFIG (P3): Invalid mode (0-1)

[5013] CONFIG (P4): Invalid header comparison mode (0 or 1 only)

[5506] CONFIG (P5): Invalid header size (max=250)

[6002] CONFIG (P6): Destination filename not supplied

[6007] CONFIG (P6): Filename not defined

[6020] CONFIG (P6): Invalid filename length (must be 8 chars)

[7006] CONFIG (P8): Source filename must have 12 chars

[8100] CONFIG (Remote): Device error

About the XCVMBDM.tlk driver

This driver requires that you have TAS-HMITalk 8.04 installed.

Driver Source Code Last Update: 03/08/2004 14:07:42

Driver Reference Last Update: 10/30/2008 17:35:38

© 1990-2008, CPKSoft Engineering. All rights reserved.

http://www.cpksoft.com - support@cpksoft.com

http://www.cpksoft.com.ar - soporte@cpksoft.com.ar>