Embed
Email

PTC_Controls32Reference

Document Sample

Shared by: Kerala g
Categories
Tags
Stats
views:
1
posted:
12/7/2011
language:
pages:
80
PTC_Controls32 API Reference



Version 2.11

02/21/2008









Pyramid Technical Consultants, Inc.

1050 Waltham Street

Suite 200

Lexington, MA 02421

Website: www.ptcusa.com

Email: cpendleton@ptcusa.com









Page 1 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





TABLE OF CONTENTS

1 Introduction ............................................................................................................................. 3

1.1 The PTC_Controls32 Application Programming Interface, Release 2.1........................ 3

1.2 Topics Covered in this Manual ....................................................................................... 3

1.3 Compatibility with PTC Devices ..................................................................................... 4

2 Architecture & Basic Principles ............................................................................................... 5

2.1 Class Structure ............................................................................................................... 5

2.2 Prioritized Messaging and Callback Structure ............................................................... 6

3 PTC Class Library ................................................................................................................... 7

3.1 Class PTCSystem .......................................................................................................... 7

3.2 Class PTCBoard (abstract) ............................................................................................ 9

3.3 Class ISeries (abstract, inherits from PTCBoard) ........................................................ 16

3.4 Class I3200 (inherits from ISeries) ............................................................................... 23

3.5 Class I400 (inherits from ISeries) ................................................................................. 29

3.6 Class I200 (inherits from ISeries) ................................................................................. 38

3.7 Class D100 ................................................................................................................... 41

3.8 Class S100 ................................................................................................................... 56

3.9 Class B10 ..................................................................................................................... 60

3.10 Class M10 .................................................................................................................... 64

3.11 Class A500 ................................................................................................................... 69

3.12 Global Types ................................................................................................................ 72

4 Appendix ............................................................................................................................... 78

4.1 PTCSystem XML Configuration File ............................................................................ 78

4.2 Version Table ............................................................................................................... 79

4.3 Hardware Reference .................................................................................................... 79









Page 2 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





1 Introduction





1.1 The PTC_Controls32 Application Programming Interface, Release

2.1.





The PTC_Controls32 Application Programming Interface (API) offers

application software developers a means to develop applications that use

Pyramid Technical Consultants, Inc. (PTC) control and data acquisition

devices. It allows rapid development of custom applications for hardware

operation by simplifying the tasks associated with configuring and

controlling various PTC devices.





The PTC_Controls32 API is a dynamic link library (DLL) that provides a

set of classes and functions for:





 Managing a system of multiple PTC devices.

 Configuring individual PTC devices.

 Acquiring data from PTC devices.





The API classes, as described, may be used in a C++ application. A

“flattened” interface is also available. This interface is presented as a set

of C style procedural functions that can be called from Visual Basic,

Delphi, LabView, and most other programming languages.





1.2 Topics Covered in this Manual





This manual provides a reference for the PTC_Controls32 API.

Sections include:





 Basic principles of using the PTC_Controls32 API – Sections X.X to

X.X.

 PTC_Controls32 class architecture.







Page 3 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





 Descriptions of PTC_Controls32 classes and public member

functions.





Note:

This manual assumed that the reader has a basic understanding the

of C/C++ programming language.





1.3 Compatibility with PTC Devices





The PTC_Controls32 API Release v2.1 is compatible with a set of specific

PTC device firmware and FPGA versions. A compatibility table, in xml

(extensible markup language) format, will be provided by PTC. This table

can be loaded into PTC_Controls32. The user is then able to check

version compatibility after the application has connected to any PTC

device. If the device is found to be incompatible, the user can upload the

latest version of firmware into the device with a single function call.





The latest firmware version for each device can be found on the PTC

website at www.ptcusa.com/download.





Username: customer

Password: download









Page 4 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





2 Architecture & Basic Principles





2.1 Class Structure







PTC_Controls32 Class Library





PTCSystem



PTCHardware

1









PTCLoopMessage

*



*

1 PTCLoop



1



1

PTCLoopInMessage PTCLoopOutMessage



1

PTCLoopController PTCLoop9Bit



PTCDataStream



PTCLoopInMessage9Bit PTCLoopOutMessage9Bit









A500

UDPSocket





PTCBoard



*









F100 D100 B10 ISeries M10 N2400 S100









I400 I200 I3200









Figure 1 - Class Diagram







2.2 Basic Principles









Page 5 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





2.3 Prioritized Messaging and Callback Structure





Each function call to the library will provide a message priority level as an

argument. The messaging engine consists of three queues. Each queue is

assigned a different level of priority. The messaging engine will service the high,

medium, and low priority queues in order. For every iteration through the

messaging loop, the engine will process the next message available in the

highest priority queue. If there is no message waiting in that queue, it will check

the next lowest priority.

Each function call to the library will also provide a function pointer that the

messaging engine will call back when the message processing is complete.

There is a single function pointer type defined.





typedef void (*Callback) (PTC_Return* return);





The messaging engine will call this function pointer when complete, passing a

PTC_Return structure to the user application code. This structure has a standard

unpacked alignment.



// Return structure

typedef struct

{

int16 Status;

uint8 Type;

void* Data;

SourceHardware* Source;

}

PTC_Return;





The PTC_Return structure contains an error status (Status), the type of the

returned data (Type), and a pointer to the returned data (Data). The type of

returned data depends on the function that was called. If there is no data to be

returned, the values Type will be PTC_NoData and Data will be NULL.









Page 6 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3 PTC Class Library



The following classes and functions will be available to the user to control PTC

devices.





3.1 Class PTCSystem





3.1.1 bool LoadSystem(char* xmlFile) IMPLEMENTED

Arguments:

1. xmlFile XML representation of the A500 system of looped

devices. An example of this XML configuration is

shown in the appendix.

Return:

This function returns a true/false value indicating whether the system file

was successfully loaded.

Description:

This function reads in an XML system configuration file that creates the

A500 and device objects. It assigns a name to every object. PTCSystem

can later hand these objects to the user application when a name is

specified. See appendix for more explanation and example.





3.1.2 bool LoadVersionTable(char* xmlFile) IMPLEMENTED

Arguments:

1. xmlFile XML representation of version compatibility.

Return:

This function returns a true/false value indicating whether the version table

file was successfully loaded.

Description:

This function loads a version table into the system. This version table can

be used to validate device firmware versions for compatibility. See section 4.2 for

more information on this version table file.









Page 7 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3.1.3 bool StartSystem(void) IMPLEMENTED

Arguments:

None.

Return:

This function returns a true/false value indicating whether the system file

was successfully initialized and started.

Description:

Initializes and starts each A500 and device.



3.1.4 bool StopSystem(void) IMPLEMENTED

Arguments:

None.

Return:

This function returns a true/false value indicating whether the system file

was successfully shutdown.

Description:

Shuts down each A500 and device. Call this on system shutdown.



3.1.5 I200* GetI200(char* name) IMPLEMENTED

Arguments:

1. name Name of the desired I200 device, as specified in the

PTCSystem XML configuration file.

Return:

This function returns a pointer to the desired I200 object, if found in the

system. If the object is not found, NULL is returned.

Description:

Gets a specified I200 object pointer by name. This I200 object must have

been described in the PTCSystem XML configuration file.



3.1.6 I3200* GetI3200(char* name) IMPLEMENTED

Arguments:

1. name Name of the desired I3200 device, as specified in the

PTCSystem XML configuration file.

Return:







Page 8 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





This function returns a pointer to the desired I3200 object, if found in the

system. If the object is not found, NULL is returned.

Description:

Gets a specified I3200 object pointer by name. This I3200 object must

have been described in the PTCSystem XML configuration file.



3.1.7 M10* GetM10(char* name) IMPLEMENTED

Arguments:

1. name Name of the desired M10 device, as specified in the

PTCSystem XML configuration file.

Return:

This function returns a handle to the desired M10 object pointer, if found in

the system. If the object is not found, NULL is returned.

Description:

Gets a specified M10 object pointer by name. This M10 object must have

been described in the PTCSystem XML configuration file.



3.1.8 A500* GetA500(char* name) IMPLEMENTED

Arguments:

1. name Name of the desired A500 object, as specified in the

PTCSystem XML configuration file.

Return:

This function returns a pointer to the desired A500 object, if found in the

system. If the object is not found, NULL is returned.

Description:

Gets a specified A500 object pointer by name. This A500 object must

have been described in the PTCSystem XML configuration file.





3.2 Class PTCBoard (abstract)





3.2.1 bool Initiate(uint32 cycleNumber, PTCMessagePriority

priority,Callback clbck) IMPLEMENTED

Arguments:

1. cycleNumber Sets the cycle number of the acquisition.





Page 9 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function arms the device for measurement. Measurement will start

when the device is triggered. Measurement will stop after the set number

of trigger points is taken or a hardware signal stops the acquisition.



3.2.2 bool Abort(PTCMessagePriority priority, Callback clbck)

IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function disarms the device for measurement.



3.2.3 bool Connect(PTCMessagePriority priority, Callback

clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

PTC_DataTypes.PTC_Connect, and Data will be of

type PTC_Connect.







Page 10 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function puts the device in the connected state and returns the device

attributes to the user application.

Relevant Structures (packed 1 byte alignment):

typedef struct

{

uint8 passwordLevel;

uint8 deviceType;

uint8 versionDeviceMinor;

uint8 versionDeviceMajor;

uint8 versionFpgaMinor;

uint8 versionFpgaMajor;

uint8 versionHardware;

uint8 ioInputLength;

uint8 ioOutputLength;

uint8 pollTimeMs;

}

PTC_Connect;



3.2.4 PTC_Error UploadApplication(char* hexFile,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. hexFile Indicates the full path of the intel hex file that contains

the device application.





2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:







Page 11 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





This function returns a PTC_Error value indicating whether the hexFile

was successfully processed and has a valid version (if a version table is

loaded).

Description:

This function updates the firmware on the device. This function can take

up to a minute to complete. No messages can be put on the queue while

this function is active.



3.2.5 PTCVersionState VerifyBoardVersion(void)

IMPLEMENTED

Arguments:

None.

Return:

This function returns a PTCVersionState value indicating whether the

device‟s firmware version is valid against the version table. If a version

table is not successfully loaded or Connect() has not be successfully

called, this return value will always be PTCVersionState.Unknown.

Description:

This function compares the device‟s version information (obtained by the

Connect() command) against the version table (loaded by PTCSystem::

LoadVersionTable() command). If either of these functions has not been

successfully executed, this function will always return

PTCVersionState.Unknown.

Relevant Enums:

// Version state

enum PTCVersionState

{

Unknown = 0,

NotValid = 1,

Valid = 2

};



3.2.6 bool GetConfiguration(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.



Page 12 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

PTC_DataTypes.PTC_ConfigureX and Data will be of

type PTC_ConfigureX, where X is the device name.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function returns the device‟s stored configuration parameters.

Relevant Structs:

See device class.



3.2.7 bool GetOutput(PTCMessagePriority priority, Callback

clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

PTC_DataTypes.PTC_OutputX, and Data will be of

type PTC_OutputX, where X is the device name.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function returns the device‟s output values.

Relevant Structs:

See device class.



3.2.8 bool GetValue(PTCMessagePriority priority, Callback

clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value



Page 13 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





of the PTC_Return structure will be

PTC_DataTypes.PTC_ValueX, and Data will be of

type PTC_ValueX, where X is the device name.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function returns the device‟s output values.

Relevant Structs:

See device class.



3.2.9 bool GetCalibration(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

PTC_DataTypes.PTC_CalibrationX, and Data will be

of type PTC_CalibrationX, where X is the device

name.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function returns the device‟s calibration values.

Relevant Structs:

See device class.



3.2.10 bool Reset(PTCMessagePriority priority, Callback

clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and







Page 14 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function resets the device.



3.2.11 bool GetData(uint32 samples, Callback clbck)

IMPLEMENTED

Arguments:

1. samples Sets the number of samples to collect before clbck is

called.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

PTC_DataTypes.PTC_DataArrayX, and Data will be

of type PTC_ DataArrayX, where X is the device

name.

Return:

This function returns a true/false whether the GetData process started

successfully. If there already is a GetData process active, this will return

false.

Description:

This function retrieves the specified amount of data samples from a

device. This function will not call clbck until samples amount of samples are

collected. To stop an active GetData process and force an immediate callback

with the available data samples, use GetDataAbort.



3.2.12 bool GetDataAbort(Callback clbck) IMPLEMENTED





Arguments:

None.

Return:

This function returns the available data that has been collected by the

GetData process since it was started. The Type value of the PTC_Return





Page 15 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





structure will be PTC_DataTypes.PTC_DataArrayX, and Data will be of

type PTC_ DataArrayX, where X is the device name. If there is no active

GetData process, this function will return NULL.

Description:

This function forces an active GetData process to abort and return the

available data immediately.





3.3 Class ISeries (abstract, inherits from PTCBoard)



3.3.1 bool Calibrate(uint8 reset, PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. reset Desired calibration state.

1 = reset calibration parameters

0 = run calibration routine

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function resets the calibration parameters or runs the calibration

routine. Running the calibration routine takes about 40 seconds. During

this time, all commands to the device will be rejected.



3.3.2 bool RecallCalibration(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.



Page 16 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function reads and applies the calibration parameters stored in the

ISeries device‟s EEPROM.



3.3.3 bool SaveCalibration(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function saves the current calibration parameters to the ISeries

device‟s EEPROM.



3.3.4 bool SetCalibrationCurrent(uint8 channel,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. channel Desired channel to output calibration current to. Valid

values 0-n (I200 n = 2, I3200 n = 32).

Value = 0 Current off.

Value= 1-n Channel 1-n.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:







Page 17 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function enables/disables the calibration current and selects the

channel to output the current to.



3.3.5 bool SetCapacitor(uint8 capacitor, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. capacitor Desired integration capacitor. Valid values 0 or 1.

Values of the capacitors can be found in the

PTC_ValueISeries structure that is called back with

the GetValue command.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the integration capacitor of the ISeries device.



3.3.6 bool SetDeviceMode(uint8 mode, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. mode Desired accumulation mode of the ISeries device.

Valid values are 0-3.

Value 0 = None

Value 1 = No Compensation

Value 2 = Estimated

Value 3 = Lossless

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and



Page 18 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the accumulation mode of the ISeries device.



3.3.7 bool SetTriggerSource(PTCTriggerSource source,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. source Sets the trigger source.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the trigger source.

Relevant Enumerations:

enum PTC_TriggerSource

{

Internal = 1,

ExternalStart = 3,

ExternalStartStop = 5

}



3.3.8 bool SetTriggerPoints(uint32 points,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. points Sets the number of readings to take after the device is

triggered. Set to maximum uint32 for infinite readings.





Page 19 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the number of readings to take after a trigger.



3.3.9 bool SetGatePolarity(uint8 polarity, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. polarity Desired polarity of the signal edge to trigger on.

Value 1 = rising

Value 0 = falling

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the polarity of the signal edge that the gate input

triggers on.



3.3.10 bool SetIntegrationPeriod(float time, uint8 subSamples,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. time Sets the integration period of the device. Limits?

2. subSamples Sets the subsamples taken on each integration of the

ISeries device.







Page 20 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3. priority Sets the messaging priority level.

4. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the integration period of the ISeries device.



3.3.11 bool SetRange(float amps, uint8 subSamples,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. amps Desired full scale current range of the ISeries device.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets full scale current range of the ISeries device.



3.3.12 bool SetConfiguration(uint8 capacitor, uint8 mode,

PTCTriggerSource source, uint32 points, bool polarity, float time,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. capacitor Desired integration capacitor. Valid values 0 or 1.

Values of the capacitors can be found in the

PTC_ValueISeries structure that is called back with

the GetValue command.

2. mode Desired accumulation mode of the ISeries device.

Valid values are 0-3.





Page 21 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Value 0 = None

Value 1 = No Compensation

Value 2 = Estimated

Value 3 = Lossless

3. source Sets the trigger source. Valid values are found in the

PTC_TriggerSource enumeration.

4. points Sets the number of readings to take after the device is

triggered. Set to maximum uint32 for infinite readings.

5. polarity Desired polarity of the signal edge to trigger on.

Value TRUE = rising

Value FALSE = falling

6. time Sets the integration period of the device. Limits?

7. priority Sets the messaging priority level.

8. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets multiple parameters of an ISeries device.

Relevant Enumerations:

enum PTC_TriggerSource

{

Internal = 0x01,

ExternalStart = 0x03,

ExternalStartStop = 0x05

}









Page 22 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3.4 Class I3200 (inherits from ISeries)



3.4.1 bool SetContinuity(uint8 continuity, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. continuity Enable/disable continuity.

1 = on

0 = off

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function enables/disables the I3200 device‟s continuity feature.



3.4.2 bool SetProgrammableGain(uint8 gain,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. gain Desired programmable gain of the I3200 device. Valid

values are 0 – 7.

0=1x

1=2x,

2=4x

3=8x

4=16x

5=32x

6=64x

7=128x

2. priority Sets the messaging priority level.







Page 23 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the programmable gain of the I3200 device.





3.4.3 bool SetExternalBiasMax(float volts,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. volts Desired max external bias value, in volts.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the maximum value of external bias. A call to

SetExternalBias will fail if the value requested exceeds the value set in this

function. This function will only succeed if the external bias is set to 0 volts. The

default value for maximum external bias is 0 volts.





3.4.4 bool SetExternalBias(float volts, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. volts Desired external bias value, in volts.

2. priority Sets the messaging priority level.







Page 24 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the value of external bias. The requested value must be

less or equal to the value set in SetExternalBiasMax.





3.4.5 bool ReadExternalBias(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

_PTC_ExternalBiasI3200, and Data will be of type

I3200. PTC_ExternalBiasI3200.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function reads the external bias output of the I3200.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

float bias;

}

PTC_ExternalBiasI3200;









Page 25 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM









3.4.6 Class I3200 Return Structures (packed 1 byte alignment)

typedef struct

{

uint8 measuring:1; // 1=measuring

uint8 triggering:1; // 1=triggering

uint8 calibrated:1; // 1=calibrated

uint8 hvEnable:1; // 1=high voltage enabled

uint8 gate:1; // 1=external gate high

uint8 actuatorA:1; // 1=actuated A

uint8 actuatorB:1; // 1=actuated B

uint8 reserved:1; // Reserved

}

DigitalI3200;





typedef struct

{

uint8 hvExternal:3; // External high voltage

uint8 hvExternalNeg:1; // External high voltage negative

uint8 capacitor1:2; // Capacitor 1

uint8 capacitor2:2; // Capacitor 1

uint8 unused:2; // Not yet read in by FPGA

uint8 sw1:1; // Dip switch 1

uint8 sw2:1; // Dip switch 2

uint8 reserved:4; // Reserved

}

JumperI3200;





typedef struct

{





Page 26 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





DigitalI3200 digital; // Digital I/O

uint8 reserved[3]; // reserved

uint32 cycleNumber; // Cycle number set by the Initiate command

uint32 integrationNumber; // Integration number

uint32 subSampleNumber; // Subsample number within integration

uint32 timeSinceTrigger; // Time since last trigger

uInt32 timeSinceSettle; // Time since last integrator reset & settle.

uInt32 overrangeFlags; // Overrange flags

float data[32]; // Channels 0-31

}

PTC_DataI3200;





typedef struct

{

uint32 samples; // Number of samples (size of array)

PTC_DataI3200[samples] data; // Data samples

}

PTC_DataArrayI3200;





typedef struct

{

uint8 capacitor; // Currently selected capacitor, 0 or 1

uint8 accumulation; // 0=no accumulate 1=estimate 2=true

uint8 calibrationSource; // The channel with the calibration on, or 0x00.

float period; // Gate period

float range; // Effective range in A

uint8 subSamples; // Number of sub-samples

uint8 holdDuringMux; // Hold analog value when muxing

float triggerDelay; // Trigger delay

uint32 triggerPoints; // Trigger point





Page 27 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





uint8 triggerPolarity; // Trigger polarity

uint8 triggerSource; // Trigger source

int16 externalBias; // External bias in volts.

uint8 relayActuated; // 1=actuator on

uint8 continuity; // 1=on 0=off

uint16 resetTime[32]; // Reset time

uint16 settleTime[32]; // Settle Time

uint16 setupTime; // Setup Time

uint8 gain; // PGA gain setting

}

PTC_OutputI3200;





typedef struct

{

float gain[32]; // User calibration

uint32 valid; // 32 calibration valid bits

}

PTC_CalibrationI3200;





typedef struct

{

int16 externalBiasMax; // External bias maximum in volts.

}

PTC_ConfigurationI3200;





typedef struct

{

JumperI3200 jumper; // Device jumpers

uint16 capacitor[2]; // Capacitor values

int16 maxExternalHV; // External HV





Page 28 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





}

PTC_ValueI3200;





3.5 Class I400 (inherits from ISeries)





3.5.1 bool SetCalibrationCurrent(bool on,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. on Desired state of the calibration current (true = on,

false = off).

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function turns the internal calibration current on/off on all four

channels for I400 hardware rev 2 or lower. If you have an I400 hardware rev 3 or

higher, use the SetCalibrationCurrent function listed in the ISeries class.





3.5.2 bool SetExternalBiasMax(float volts,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. volts Desired max external bias value, in volts.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:





Page 29 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the maximum value of external bias. A call to

SetExternalBias will fail if the value requested exceeds the value set in this

function. This function will only succeed if the external bias is set to 0 volts. The

default value for maximum external bias is 0 volts.





3.5.3 bool SetExternalBias(float volts, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. volts Desired external bias value, in volts.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the value of external bias. The requested value must be

less or equal to the value set in SetExternalBiasMax.





3.5.4 bool SetSignalBiasMax(float volts, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. volts Desired max signal bias value, in volts.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:





Page 30 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the maximum value of signal bias. A call to

SetSignalBias will fail if the value requested exceeds the value set in this

function. This function will only succeed if the signal bias is set to 0 volts. The

default value for maximum signal bias is 0 volts.





3.5.5 bool SetSignalBias(float volts, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. volts Desired signal bias value, in volts.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the value of signal bias. The requested value must be

less or equal to the value set in SetSignalBiasMax.





3.5.6 bool GetMonitorVoltage(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

_PTC_MonitorVoltageI400, and Data will be of type

I400. PTC_MonitorVoltageI400.

Return:





Page 31 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function gets the monitor voltage value of the I400.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

float volts;

}

PTC_MonitorVoltageI400;







3.5.7 bool GetExternalBias(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

_PTC_ExternalBiasI400, and Data will be of type

I400. PTC_ExternalBiasI400.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function gets the external bias value of the I400.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

float volts;







Page 32 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





}

PTC_ExternalBiasI400;







3.5.8 bool GetSignalBias(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

_PTC_SignalBiasI400, and Data will be of type I400.

PTC_SignalBiasI400.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function gets the signal bias value of the I400.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

float volts;

}

PTC_SignalBiasI400;







3.5.9 bool GetPressure(PTCMessagePriority priority, Callback

clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be







Page 33 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





_PTC_PressureI400, and Data will be of type I400.

PTC_PressureI400.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function gets the pressure value of the I400.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

float pressure;

}

PTC_PressureI400;







3.5.10 bool GetTemperature(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

_PTC_TemperatureI400, and Data will be of type

I400. PTC_TemperatureI400.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function gets the temperature value of the I400.





Relevant Structures (packed 1 byte alignment):









Page 34 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





typedef struct

{

float temperature;

}

PTC_TemperatureI400;







3.5.11 bool CalibrateExternal(uint8 channel, float current,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. channel Desired channel to calibrate on (0-3).

2. current Current input to the specified channel.

3. priority Sets the messaging priority level.

4. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function calibrates the specified channel to a known external input

current.





3.5.12 bool CalibrateFactory(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.





Page 35 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Description:

This function loads the I400‟s factory calibration from EEPROM.





3.5.13 Class I400 Return Structures



typedef struct

{

uint8 hvExternal:2; // External high voltage

uint8 hvSignal:2; // Signal high voltage

uint8 capacitorSmall:1; // Capacitor small

uint8 capacitorLarge:1; // Capacitor large

uint8 pressure:1; // Pressure present

uint8 reserved1:1; // Unused

uint8 hvExternalNeg:1; // HV external is negative

uint8 hvSignalNeg:1; // HV signal is negative

uint8 reserved2:6; // Unused

}

JumperI400;





typedef struct

{

uint8 validFactory; // true if calibration is valid

float gainFactory[2][4]; // Factory calibration

uint8 valid; // true if calibration is valid

float gain[2][4]; // User calibration.

}

PTC_CalibrationI400;





typedef struct

{

short externalBiasMax; // External bias maximum in volts.

short signalBiasMax; // Signal bias maximum in volts.

}







Page 36 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





PTC_ConfigurationI400;





typedef struct

{

JumperI400 jumper; // Device jumpers

unsigned short capacitor[2]; // Capacitor values

short maxSignalHV; // Signal HV

short maxExternalHV; // External HV

}

PTC_ValueI400;





typedef struct

{

// Capacitor

uint8 capacitor; // Currently selected capacitor, 0 or 1

// Gating

uint8 accumulation; // 0=no accumulate 1=estimate 2=true

uint8 calibrationSource;// 0=off, else 1 for old rev, channel 1-4 for new rev

float period; // Period time

float range; // Effective range in A

uint8 subSamples; // Number of sub-samples

// Trigger and acquisition

float triggerDelay; // Trigger delay

unsigned long triggerPoints; // Trigger point

uint8 triggerPolarity; // Trigger polarity

uint8 triggerSource; // Trigger source

// Data

uint8 dataFeed; // Data feed sources

uint8 dataPoints; // Data points

// High voltage

short externalBias; // External bias in volts.

short signalBias; // Signal bias in volts.

// Reset times

unsigned short resetTime[2]; // Reset time by capacitor







Page 37 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





unsigned short settleTime[2]; // Settle time by capacitor

unsigned short setupTime; // Setup time for SW1 for both capacitors

}

PTC_OutputI400;





typedef struct

{

uint8 measuring:1; // 1=measuring

uint8 triggering:1; // 1=triggering

uint8 calibrated:1; // 1=calibrated

uint8 hvEnable:1; // 1=high voltage enabled

uint8 gate:1; // 1=external gate high

uint8 reserved:3; // Reserved

}

DigitalI400;





typedef struct

{

DigitalI400 digital; // Digital I/O

uint8 overrange; // Overrange flags

float time; // Integration Time

float data[2]; // Channels 0-3

}

PTC_DataI400;







3.6 Class I200 (inherits from ISeries)



3.6.1 bool GetDigital(PTCMessagePriority priority, Callback

clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be _bool and Data





Page 38 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





will be of type bool. This value represents the digital

readback.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function reads the digital input of the I200.



3.6.2 Class I200 Return Structures (packed 1 byte alignment)



typedef struct

{

uint8 measuring:1; // 1=measuring

uint8 triggering:1; // 1=triggering

uint8 calibrated:1; // 1=calibrated

uint8 gate:1; // 1=external gate high

uint8 actuatorA:1; // 1=actuated A

uint8 actuatorB:1; // 1=actuated B

uint8 reserved:2; // Reserved

}

DigitalI200;





typedef struct

{

uint8 capacitor1:2; // Capacitor 1

uint8 capacitor2:2; // Capacitor 1

uint8 unused:2; // Not yet read in by FPGA

uint8 sw1:1; // Dip switch 1

uint8 sw2:1; // Dip switch 2

}

JumperI200;





typedef struct

{







Page 39 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





uint32 cycleNumber; // Cycle number set by the Initiate command

DigitalI200 digital; // Digital I/O

uint8 flags; // Overrange flags

float time; // Time

float data[2]; // Channels 0-1

}

PTC_DataI200;





typedef struct

{

uint32 samples; // Number of samples (size of array)

PTC_DataI200[] data; // Data samples

}

PTC_DataArrayI200;





typedef struct

{

uint8 id; // Device hardware ID

JumperI3200 jumper; // Device jumpers

uint8 capacitor; // Currently selected capacitor, 0 or 1

uint8 accumulation; // 0=no accumulate 1=estimate 2=true

uint8 calibrationSource; // The channel with the calibration on, or 0x00.

float period; // Gate period

float range; // Effective range in A

uint8 subSamples; // Number of sub-samples

uint8 holdDuringMux; // Hold analog value when muxing

float triggerDelay; // Trigger delay

uint32 triggerPoints; // Trigger point

uint8 triggerPolarity; // Trigger polarity

uint8 triggerSource; // Trigger source

uint8 relayActuated; // 1=actuator on

unit8 auxDigital // Auxiliary digital inputs (used for gas flow

// monitor)

}







Page 40 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





PTC_OutputI200;





typedef struct

{

float gain[2]; // User calibration

uint8 valid; // 32 calibration valid bits

}

PTC_CalibrationI200;





typedef struct

{

uint8 reserved; // Nothing

}

PTC_ConfigurationI200;





typedef struct

{

uint16 capacitor[2]; // Capacitor values

uint16 resetTime[2]; // Reset time by capacitor

uint16 settleTime[2]; // Settle time by capacitor

uint16 setupTime; // Setup time for SW1 for both capacitors

}

PTC_ValueI200;







3.7 Class D100





3.7.1 bool ClearSpectrum(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.



Page 41 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function clears the D100 spectrum.





3.7.2 bool SetBias(float bias, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. bias Desired bias value, in volts.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the D100 bias.





3.7.3 bool SetBiasMax(float bias, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. bias Desired bias max value, in volts.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.





Page 42 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Description:

This function sets the D100 maximum bias. The bias cannot be set above

this value. This value is saved in the D100 EEPROM upon successful

completion.





3.7.4 bool SetBiasScale(float bias, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. bias Desired bias scale value, in volts.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the D100 bias scale, indicating how many volts of high

voltage are achieved for each DAC volt output by the D100. This value is saved

in the D100 EEPROM upon successful completion.



3.7.5 bool SetKDD(uint8 kdd, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. kdd Desired kdd parameter value.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:





Page 43 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





This function sets the derivative discriminator parameter of the D100. This

parameter is used to determine the minimum pulse height. Lowering this

parameter increases the amount of low energy pulses seen, and tends to reduce

the output pulse rate, as the low energy pulses overrun the processor. Pulses

must be above the Derivative Discriminator to be counted as pulses for pile-up

rejection, so at high rates the resolution may suffer from a high Derivative

Discriminator.





3.7.6 bool SetKDT(uint8 kdt, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. kdt Desired kdt parameter value.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the decay time parameter of the D100. The Decay time

parameter is used to subtract the away decay from previous pulses so that they

do not interfere with new pulses. To disable this feature, set the parameter to 0.

Value should not exceed 1. If Decay Time is set incorrectly, poor resolution will

be seen if the Pile Up Time is moderately low and the rate is high.





3.7.7 bool SetKOA(uint16 koa, PTCMessagePriority

priority, Callback clbck) NOT IMPLEMENTED

Arguments:

1. koa Desired koa parameter value.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and







Page 44 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the spectrum offset parameter of the D100. Offset is

used to reposition the first channel of the spectrumn in spectrum mode. Offset

controls the position of data coming in, so the spectrum should be cleared after

Offset is changed.





3.7.8 bool SetKOG(int16 offset, int16 gain,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. offset Desired kog offset parameter value.

2. gain Desired kog gain parameter value.

3. priority Sets the messaging priority level.

4. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the spectrum gain parameter of the D100. Gain is used

to zoom in histogram in spectrum mode. Gain controls the position of data

coming in, so the spectrum should be cleared after Gain is changed.





3.7.9 bool SetKPD(uint8 kpd, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. kpd Desired kpd parameter value.

2. priority Sets the messaging priority level.



Page 45 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the pulse discriminator parameter of the D100. If the

derivative of the current coming into the D100 is greater then Pulse

Discriminator, then the D100 starts testing the data to see if it is a pulse. Since

the rising edge of pulses is very sharp, the parameter is not very sensitive to

change. Increasing the Pulse Discriminator should filter out low level pulses,

while decreasing it may overrun the processor with small pulses.









3.7.10 bool SetKPU(uint8 kpu, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. kpu Desired kpu parameter value.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the pile up time parameter of the D100. If two pulses

occur within Pile Up Time of each other, then the second pulse will not be added

to the histogram. This is done to prevent energy from the previous pulse from

corrupting the measurement of the second. Increasing the Pile Up Time may

give increased resolution with reduced throughput at high rates, while decreasing

it gives the opposite results. The upper limit is 3.188 uS.







Page 46 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3.7.11 bool SetKPW(uint8 kpwMin, uint8 kpw

Max,PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. kpwMin Desired kpw minimum parameter value.

2. kpwMax Desired kpw maximum parameter value.

3. priority Sets the messaging priority level.

4. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the peak width parameter of the D100. The D100 does

not count pulses below the Peak Width minimum or above the peak width

maximum values.





3.7.12 bool SetKDT(uint8 kdt, PTCMessagePriority

priority, Callback clbck) NOT USED-WILL MAY DELETED

Arguments:

1. kdt Desired kdt parameter value.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

PeakThreshold (KPT). This is the minimum pulse height (binary) that a

pulse must attain before it is considered as a valid pulse.









Page 47 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3.7.13 bool SetKST(uint8 kst, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. kst Desired kst parameter value.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the shaping time parameter of the D100. The Shaping

Time controls the amount of data integrated for each pulse. The Shaping Time

must be greater then the maximum pulse width, and should be greater then the

Pile Up Time. The Shaping Time has a minimum granularity of 12.5 nS. If two

pulses occur within the same Shaping Time, then both pulses are discarded.

Increasing Shaping Time may give increased resolution with reduced throughput

at high rates, while decreasing it gives the opposite results. Changing shaping

time may also change peak positions, since more current is being integrated.

Upper limit of 3.188 uS.





3.7.14 bool SetKCD(short denominator,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. denominator Desired current denominator.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.







Page 48 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Description:

This function is used to set the current denominator for the D100. This

value is used to pre-scale the average current reported by the D100.





3.7.15 bool SetKCT(short time, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. time Desired current time in microseconds.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function is used to set the current time, in microseconds, for the

D100. This value determines the automatic rate that the D100 should transmit

average current.





3.7.16 bool SetCurrentScale(float scale,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. scale Desired current scale.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:



Page 49 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





This function is used to set the current scale.





3.7.17 bool GetTemperature(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

_PTC_TemperatureD100, and Data will be of type

D100. PTC_TemperatureD100.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function gets the temperature values of the D100.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

float boardTemp;

float pmtTemp;

}

PTC_TemperatureD100;







3.7.18 bool SetGate(uint8 gate, PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. gate Desired gain gate state. 0=off, 1=on.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and





Page 50 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the gain gate state of the D100.





3.7.19 bool GetRoi(PTCMessagePriority priority, Callback

clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be _PTC_RoiD100,

and Data will be of type D100. PTC_RoiD100.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function gets the roi values of the D100.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

uint8 count;

float current;

uint32 roi[50];

}

PTC_RoiD100;









Page 51 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3.7.20 bool SetRoi(PTC_RoiSetupD100* roi,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. roi Desired roi settings.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the roi values of the D100.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

uint8 count;

uint32 roi[50];

}

PTC_RoiSetupD100;







3.7.21 bool PulseLED(uint8 pulse, PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. pulse Desired led pulse state. 0=off, 1=on.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.







Page 52 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the led pulse state of the D100. When on, the led will

pulse at 1 kHz.





3.7.22 bool ReadCounters(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

_PTC_CountersD100, and Data will be of type D100.

PTC_CountersD100.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function gets the counter values of the D100.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

uint32 Valid;

uint32 CloseRejection;

uint32 NarrowRejection;

uint32 WideRejection;

uint32 Timer;

uint32 SaturatedPulses;

}







Page 53 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





PTC_CountersD100;







3.7.23 bool GetHistogram(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

_PTC_HistogramD100, and Data will be of type D100.

PTC_HistogramD100.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function gets the D100 histogram. This histogram is a differential

since the last time this function was called. Therefore, the user is responsible for

maintaining a sum.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

unsigned int counts[1024];

}

PTC_HistogramD100;







3.7.24 Class D100 Return Structures



typedef struct

{

uint8 reserved:8; // Reserved

}

JumperD100;





Page 54 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM







typedef struct

{

uint8 reserved[2];

}

PTC_CalibrationD100;





typedef struct

{

float biasMax; // Maximum bias value allowed

float biasScale; // Volts control to volts actual

float currentScale; // Binary current to Amps

}

PTC_ConfigurationD100;





typedef struct

{

uint8 reserved[2];

}

PTC_ValueD100;





typedef struct

{

uint8 acquireMode; // Acquisition mode

// Hardware settings

float bias; // Bias voltage

uint8 pulseLed; // true=pulse LED @1kHz

uint8 gate; // true=set gain gate active

// Acquisiton constants

int32 decayTime; // Decay time

uint8 derivativeDiscriminator; // Derivative discriminator

unsigned short gain; // Gain

unsigned short offset; // Offset

unsigned short offsetAverage; // Offset average





Page 55 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





uint8 peakWidthMinimum; // Minimum peak width

uint8 peakWidthMaximum; // Maximum peak width

uint8 pileUpTime; // Pile up time

uint8 pulseDiscriminator; // Pulse discriminator

uint8 peakThreshold; // Peak Threshold

uint8 shapingTimeConstant; // Shaping time constant

uint16 currentDenominator; // The current denominator

uint16 currentTime; // The current time in usec

}

PTC_OutputD100;





typedef struct

{

uint8 measuring:1; // 1=measuring

uint8 triggering:1; // 1=triggering

uint8 calibrated:1; // 1=calibrated

uint8 reserved:5; // Reserved

}

DigitalD100;





typedef struct

{

DigitalD100 digital;

uint8 offset;

float averageCurrent;

int32 counts[48];

}

PTC_DataD100;







3.8 Class S100









Page 56 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3.8.1 bool SetBaudRate(unsigned int baudRate,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. baudrate Desired baud rate. Options are 9600, 14400, 19200,

38400, 57600, and 115200.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the baud rate of the S100.





3.8.2 bool SetFlowControl(S100FlowControl flowControl,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. flowControl Desired flow control mode.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the flow control mode of the S100.





Relevant Enumerations:









Page 57 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





enum S100FlowControl

{

None = 0,

XonXoff = 1

};







3.8.3 bool SetParity(S100Parity parity, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. parity Desired parity.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the parity of the S100.





Relevant Enumerations:





enum S100Parity

{

_None = 0,

_Even = 1,

_Odd = 2,

_Mark = 3,

_Space = 4

};









Page 58 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3.8.4 bool ReadBuffer(PTCMessagePriority priority, Callback

clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

_PTC_BufferS100, and Data will be of type S100.

PTC_BufferS100.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function reads the input buffer of the S100.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

uint8 length; // Buffer length

char* buffer; // Buffer

}

PTC_BufferS100;







3.8.5 bool WriteBuffer(char* buffer, uint8 bufferLength,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. buffer Buffer to write.

2. bufferLength Number of bytes to write from buffer. This size cannot

exceed length of buffer.

3. priority Sets the messaging priority level.

4. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and







Page 59 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function writes a set amount of bytes from the user supplied buffer.





3.9 Class B10





3.9.1 bool SetDigital(uint8 channel, uint8 data,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. channel Desired output channel.

2. data Desired state of digital.

3. priority Sets the messaging priority level.

4. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the specified B10 digital to the specified value.





3.9.2 bool SetInputPolarity(uint8 channel, bool polarity,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. channel Desired channel.

2. polarity Desired polarity specified input channel.

3. priority Sets the messaging priority level.





Page 60 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





4. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the polarity of a specified input channel.





3.9.3 bool SetEncoderConfiguration(uint8 channel, bool

indexEnable, bool indexInvert, int fullScale, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. channel Desired channel.

2. indexEnable Enable index.

3. indexInvert Invert index.

4. fullScale Full scale, in volts.

5. priority Sets the messaging priority level.

6. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the configuration of the encoder function of the B10, on

the specified channel.





3.9.4 bool ResetEncoder(uint8 channel, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:







Page 61 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





1. channel Desired channel.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function resets the encoder function of the B10 on a specified

channel.





3.9.5 bool GetTemperature(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

_PTC_TemperatureB10, and Data will be of type

I400. PTC_TemperatureB10.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function gets the current temperature of the B10.





Relevant Structures (packed 1 byte alignment):





typedef struct

{

float temperature;

}





Page 62 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





PTC_TemperatureB10;







3.9.6 Class B10 Return Structures



typedef struct

{

uint8 channelConfig:2; // I/O: 0 = 8:8, 1 = 16:0

uint8 unused:6; // SW1

}

JumperB10;





typedef struct

{

uint8 reserved[2]; // Reserved

}

PTC_CalibrationB10;





typedef struct

{

uint8 digitalPolarity; // Digital polarity for each digital

uint8 encoderIndexEnable[2]; // 1 = enable

uint8 encoderIndexInvert[2]; // 1 = invert

int32 encoderFullScale[2]; // Full scale values for plotting

}

PTC_ConfigurationB10;





typedef struct

{

JumperB10 jumper;

uint8 model;

uint8 inputCount;

uint8 outputCount;

}







Page 63 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





PTC_ValueB10;





typedef struct

{

uint8 digOut; // Digital outputs, bits 0-3

uint8 reserved; // Reserved

}

PTC_OutputB10;





typedef struct

{

uint8 measuring:1; // 1=measuring

uint8 triggering:1; // 1=triggering

uint8 reserved:6; // Reserved

}

DigitalB10;





typedef struct

{

DigitalB10 digital; // Digital values

uint8 digIn; // Digital inputs (bits 0-7)

int32 encoderA; // Encoder A

int32 encoderB; // Encoder B

}

PTC_DataB10;







3.10 Class M10





3.10.1 bool SetDigital(uint8 channel, uint8 state,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. channel Desired output channel.

2. state Desired state of digital.





Page 64 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3. priority Sets the messaging priority level.

4. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the specified M10 digital to the specified value.





3.10.2 bool SetAnalog(uint8 channel, float voltage,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. channel Desired output channel.

2. voltage Desired voltage.

3. priority Sets the messaging priority level.

4. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the specified M10 DAC to the specified voltage.



3.10.3 bool GetTemperature(PTCMessagePriority priority,

Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be PTC_DataTypes.

_PTC_float, and Data will be of float.



Page 65 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function returns the current M10 temperature.





3.10.4 bool SetRange(uint8 channel, uint8 range,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. channel Desired channel.

2. range Desired range, as specified in

PTC_ValueM10.inputRange.

3. priority Sets the messaging priority level.

4. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the specified M10 ADC to the specified input range.

Defined values can be found in PTC_ValueM10.inputRange.





3.10.5 bool SetInputPolarity(uint8 channel, uint8 polarity,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. channel Desired channel.

2. polarity Desired polarity.

3. priority Sets the messaging priority level.

4. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and







Page 66 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the specified M10 digital input polarity.





3.10.6 bool OutputPulseTrain(uint32 numPulses, uint32 period,

PTCMessagePriority priority, Callback clbck) IMPLEMENTED

Arguments:

1. channel Desired output channel.

2. numPulses Desired number of pulses in the pulse train.

3. period Desired period of the pulse train.

4. priority Sets the messaging priority level.

5. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function sets the parameters of the M10 output pulse train.





3.10.7 Class M10 Return Structures



typedef struct

{

uint8 valid; // Bits 0/1-input 2/3-outputs true=valid

float gainInput[2]; // Gain factor for inputs, nominally 1

float gainOutput[2]; // Gain factor for outputs, nominally 1







Page 67 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





float zeroInput[2]; // Zero for inputs, volts.

float zeroOutput[2]; // Zero for outputs, volts

}

PTC_CalibrationM10;





typedef struct

{

uint8 range[2]; // The selected range for each analog input

uint8 digitalPolarity; // Digital polarities

}

PTC_ConfigurationM10;









typedef struct

{

float inputRange[4]; // Each input range's full scale value in volts

uint8 inputBipolar; // 1 if input range bipolar, else 0 (bits 0-3)

float outputRange; // The full scale value for all outputs

uint8 outputBipolar; // 1 if output range bipolar, else 0 (bit 0)

}

PTC_ValueM10;





typedef struct

{

uint8 digOut; // Digital outputs, bits 0-3

float dac[2]; // The DAC output settings

float period; // Acquisition period

unsigned int triggerPoints; // Trigger points

}

PTC_OutputM10;





typedef struct

{

uint8 measuring:1; // 1=measuring







Page 68 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





uint8 triggering:1; // 1=triggering

uint8 pulseTrainActive:1;

uint8 reserved:5; // Reserved

}

PTC_DigitalM10;





typedef struct

{

unsigned long triggerCount; // Trigger count

PTC_DigitalM10 digital; // Digital values

uint8 digIn; // Digin (bits 0-3)

uint8 pulsing; // Pulsing (bits 0-3)

uint8 overrange; // Overrange flags

float volts[ADC_COUNT]; // Analog inputs

}

PTC_DataM10;







3.11 Class A500



3.11.1 void SetLoopFaultCallback(Callback clbck)

IMPLEMENTED

Arguments:

1. clbck Sets the function that is called by the messaging

engine an A500 loop fault is detected.

Return:

void

Description:

This function sets the callback function that will be notified when an A500

loop fault is detected.



3.11.2 bool Connect(PTCMessagePriority priority, Callback

clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.







Page 69 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

PTC_DataTypes.PTC_A500Connect, and Data will be

of type PTC_A500Connect.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function puts the A500 in the connected state and returns the device

attributes to the user application.



3.11.3 bool Reset(PTCMessagePriority priority, Callback clbck)

IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function performs a soft reset of the A500.



3.11.4 bool GetOutput(A500Handle a500, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. priority Sets the messaging priority level.

2. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type value

of the PTC_Return structure will be

PTC_DataTypes._PTC_A500Output and Data will be

of type PTC_A500Output.

Return:







Page 70 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function returns the A500 outputs.



3.11.5 bool UploadApplication(char* file, PTCMessagePriority

priority, Callback clbck) IMPLEMENTED

Arguments:

1. file Indicates the full path of the binary file that contains

the device application.

2. priority Sets the messaging priority level.

3. clbck Sets the function that is called by the messaging

engine when processing is complete. The Type and

Data values of this PTC_Return structure will be

NULL.

Return:

This function returns a true/false value indicating whether the message

was successfully put in the messaging queue.

Description:

This function updates the firmware on the device. This function can take

up to 2 minutes to complete. No functions are accessible during firmware

update.



3.11.6 Class A500 Return Structures (packed 1 byte alignment)

typedef struct

{

uint32 cycleNumber;

uint32 timeSinceStart;

uint32 timeSinceTrigger;

uint32 triggerNumber;

uint16 mask; // Which counters

uint16 count; // Number of samples

uint32 data[]; // Count values - incr

}

PTC_A500Scaler;









Page 71 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





typedef struct

{

uint32 points;

uint32 period;

uint16 mask;

uint8 triggerSource;

uint8 triggerPolarity;

}

PTC_A500Output;





typedef struct

{

uint8 deviceType;

uint8 versionDeviceMinor;

uint8 versionDeviceMajor;

uint8 versionFpgaMinor;

uint8 versionFpgaMajor;

uint8 versionHardware;

}

PTC_A500Connect;





typedef struct

{

uint8 loop[5]; // Position of break in loop, if any. 0xFF means no break.

}

PTC_A500LoopBreak;







3.12 Global Types





3.12.1 Function Pointer Callback



typedef void (*Callback) (PTC_Return return);









Page 72 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





3.12.2 Enumerations



// Error codes

enum PTC_Error

{

A500LoopBreakError = 10,

MotionControllerError = 9,

MotionControllerCommsError = 8,

InvalidDevice = 7,

InvalidVersion = 6,

FileError = 5,

Timeout = 4,

BadEcho = 3,

BadTag = 2,

BadChecksum = 1,

None = 0,

UndefinedHeader = -113,

UnexpectedNumberOfParameters = -115,

NumericDataError = -120,

InvalidcharacterInNumber = -121,

NotConnected = -200,

CommandProtected = -203,

SettingConflict = -221,

DataOutOfRange = -222,

IllegalParameterValue = -224,

DataCorruptOrStale = -230,

HardwareError = -240,

HardwareMissing = -241,

CorruptMedia = -253,

OutOfMemory = -291,

DeviceBusy = -311,

ProgramNotLoaded = -335,

QueueOverflow = -350,

DataNotAvailable = -401,





Page 73 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Overflow = -901,

_Timeout = -902,

Address = -903,

MsgLength = -904,

DeviceTypeConflict = -905,

Checksum = -906,

ProgramNotFound = -907,

FlashError = -908,

StateConflict = -909,

InvalidLoop = -910,

LocalMode = -911,

_InvalidDevice = -912,

NotYetSupported = -913,

DeviceNotReady = -914

DataNotAvailable = -401

};





// Version state

enum PTCVersionState

{

Unknown = 0,

NotValid = 1,

Valid = 2

};





// Structure types

enum PTC_DataTypes

{

_PTC_NoData = 0,

_PTC_bool = 1,

_PTC_uint8 = 2,

_PTC_uint16 = 3,

_PTC_int16 = 4,

_PTC_uint32 = 5,







Page 74 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





_PTC_int32 = 6,

_PTC_uint48 = 7,

_PTC_int48 = 8,

_PTC_float = 9,

_PTC_Error = 10,

_PTC_Connect = 11,

_PTC_ConfigurationSystem = 12,

_PTC_TriggerSource = 13,

_PTC_DataI3200 = 14,

_PTC_DataArrayI3200 = 15,

_PTC_OutputI3200 = 16,

_PTC_CalibrationI3200 = 17,

_PTC_ConfigurationI3200 = 18,

_PTC_ValueI3200 = 19,

_PTC_DataI200 = 20,

_PTC_DataArrayI200 = 21,

_PTC_OutputI200 = 22,

_PTC_CalibrationI200 = 23,

_PTC_ConfigurationI200 = 24,

_PTC_ValueI200 = 25,

_PTC_DigitalI200 = 26,

_PTC_OutputM10 = 27,

_PTC_CalibrationM10 = 28,

_PTC_ConfigurationM10 = 29,

_PTC_ValueM10 = 30,

_PTC_DataM10 = 31,

_PTC_DataArrayM10 = 32,

_PTC_OutputN2400 = 33,

_PTC_CalibrationN2400 = 34,

_PTC_ConfigurationN2400 = 35,

_PTC_ValueN2400 = 36,

_PTC_DataN2400 = 37,

_PTC_DataArrayN2400 = 38,

_PTC_OutputS100 = 39,







Page 75 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





_PTC_ConfigurationS100 = 40,

_PTC_BufferS100 = 41,

_PTC_A500Output = 42,

_PTC_A500Connect = 43,

_PTC_MotionStatus = 44,

_PTC_cstring = 45,

_PTC_ActuatorStatus = 46,

_PTC_DualActuatorStatus = 47,

_PTC_A500Scaler = 48,

_PTC_A500LoopBreak = 49,

_PTC_HistogramD100 = 50,

_PTC_OutputD100 = 51,

_PTC_CalibrationD100 = 52,

_PTC_ConfigurationD100 = 53,

_PTC_ValueD100 = 54,

_PTC_TemperatureD100 = 55,

_PTC_RoiD100 = 56,

_PTC_CountersD100 = 57,

_PTC_OutputF100 = 58,

_PTC_CalibrationF100 = 59,

_PTC_ConfigurationF100 = 60,

_PTC_ValueF100 = 61,

_PTC_DataF100 = 62,

_PTC_DataArrayF100 = 63,

_PTC_ExternalBiasF100 = 64,

_PTC_CurrentF100 = 65,

_PTC_DigitalF100 = 66,

_PTC_OutputB10 = 67,

_PTC_CalibrationB10 = 68,

_PTC_ConfigurationB10 = 69,

_PTC_ValueB10 = 70,

_PTC_DataB10 = 71,

_PTC_DataArrayB10 = 72,

_PTC_TemperatureB10 = 73,







Page 76 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





_PTC_OutputI400 = 74,

_PTC_CalibrationI400 = 75,

_PTC_ConfigurationI400 = 76,

_PTC_ValueI400 = 77,

_PTC_DataI400 = 78,

_PTC_DataArrayI400 = 79,

_PTC_ExternalBiasI400 = 80,

_PTC_SignalBiasI400 = 81,

_PTC_TemperatureI400 = 82,

_PTC_PressureI400 = 83,

_PTC_MonitorVoltageI400 = 84

};



3.12.3 Data Structures (unpacked alignment)



// Source hardware structure

typedef struct

{

uint8 deviceType;

char* deviceName;

PTCHardware* source;

}

SourceHardware;





// Return structure

typedef struct

{

int16 Status;

uint8 Type;

void* Data;

SourceHardware* Source;

}

PTC_Return;









Page 77 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





4 Appendix

4.1 PTCSystem XML Configuration File

The A500 system and all devices will be configured with an XML file representing

the system and all of its relevant attributes. This is done with the

PTCSystem::LoadSystem command. The table of xml elements, associated

attributes, and allowed quantity is below.





element level attributes # allowed



system 0 none 1



loopcontroller 1 1. type (always use "A500") 5

2. name (string)

3. ip (valid IP address)

4. port (0 - 65535)



loop 2 1. name (string) 5

2. number (1-5, unique)







1. type

board 3 ("I3200"/"I200"/"M10"/N2400"/"S100") 15

2. name (string)

3. address (1-15)







An example file is shown below.































Page 78 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





































System.xml



4.2 Version Table

The version table is an xml file that will be provided by PTC that maps compatible

versions of relevant devices‟ FPGA and firmware versions. This file should not be

modified. Updates shall be provided by PTC as needed. This file will be called

„version.xml‟ unless otherwise specified.



4.3 Hardware Reference



4.3.1 Communications and Control (A500)

The A500 provides communication management and processing power to the

control application. The Analog Devices 21160M SHARC Digital Signal

Processor (DSP), capable of floating point operation at up to 480MFlops, is the

core processor for the board.

Five fiber-optic transmitter/receiver pairs are used to communicate with remote

devices that can be arranged in loop configurations. An FPGA is used to fully

drive the communications at 10MB/channel, giving a total I/O bandwidth of

50MB/s.

A 100T Ethernet connection allows the A500 to be connected to one or more

remote host computers. Sustained output data rates using the UDP protocol are

supported to 30MB/s.







Page 79 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.

Pyramid Technical Consultants, Inc.

1050 Waltham Street, Suite 200, Lexington 02421



TEL: (781) 402-1700  FAX: (781) 402-1750  URL:

PTC Software Interface

WWW.PTCUSA.COM





Other features included with the A500 include on board flash memory for

application program storage, which can be downloaded over the Ethernet

connection from the host. A battery-backed up NVR chip allows the application to

store critical parameters during run time. One megaword (32 bit) of external

SRAM is available for application programming.

A fiber-optic mezzanine allows 10 additional fiber ports to be added. The /R10

adds 10 receivers. The /R5T5 (used by the beamline controller) adds 5 additional

fiber loops.

A special I/O mezzanine is present that allows custom I/O boards to be designed

and directly connected to the A500. This would be used for high-performance I/O

applications, such as might be required for closed loop beam position servo

control.



4.3.2 Current Measurement (I3200, I200)

Three products are available to measure low current signals. The I3200 contains

32 independent current integrator channels and the I200 has 2 channels. Both

devices can include an additional high-voltage power supply. Each of these

devices has two full-scale ranges, 100 pC and 1,000 pC. For a given range, the

measured signal is proportional to the integration time, so that very small

currents can be read if enough integration time is available. The more sensitive

range yields a full-scale signal at 100 nA after one millisecond. A 16-bit digitizer

is used so signals that are a small fraction of full scale can be measured. An

external high voltage power supply option (HVPS) is also available.



4.3.3 General I/O (M10)

M10 The M10 is suited for control of a single device. The basic configuration

includes two channels of 16-bit analog command (+/-10V), two channels of 16-bit

analog readback (+/-10V), four channels of TTL digital readback, and four

channels of TTL digital command. Used as a single device on a loop, it is

capable of 10 kHz update rates on all channels.









Page 80 of 8080

This information is confidential and should not be copied, transmitted, or used in any manner without the prior consent of

Pyramid Technical Consultants, Inc.



Other docs by Kerala g
union-budget-2012-13-highlights
Views: 81  |  Downloads: 0
notification M.Tech_05-03-09
Views: 56  |  Downloads: 0
India_Customs Regulation 1
Views: 52  |  Downloads: 0
CE Notification 39-2011-12.9.2011
Views: 50  |  Downloads: 0
STATISTICS
Views: 69  |  Downloads: 0
A Hero (R.K. Narayan)
Views: 87  |  Downloads: 6
RRBPatna-Info-HN
Views: 98  |  Downloads: 0
RRB-Notice-Para
Views: 100  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!