99 #define CALLSPEC __stdcall
100 #ifdef PULSARAPI_EXPORTS
101 #define PULSAR_API extern "C" __declspec(dllexport)
103 #define PULSAR_API extern "C" __declspec(dllimport)
107 #define PULSAR_API extern "C"
111#define API_PULSAR_PRODUCT_NAME "Ai Pulsar 320 Controller"
116typedef unsigned char UINT8_T;
117typedef unsigned short UINT16_T;
118typedef unsigned int UINT32_T;
120typedef short INT16_T;
122typedef unsigned char BOOLEAN_T;
123typedef float FLOAT32_T;
144 UINT8_T reserved_byte;
185#define API_NUM_CHAN 2
187#define API_NUM_CHAN 2
204#define API_NUM_TRIG 2
206#define API_NUM_TRIG 2
210#define API_CHAN_CONFIG_DEFAULT 1
211#define API_CHAN_CONFIG_ACTIVE 2
230#define API_NUM_OPTIONAL_TESTS 1
235#define API_MAX_ROTARY 999
238#define API_DIP_MODE0 0x1
239#define API_DIP_MODE1 0x2
240#define API_DIP_MODE2 0x4
241#define API_DIP_MODE3 0x8
244#define API_TRIG_IN1 0x1
245#define API_TRIG_IN2 0x2
248#define API_CONN_LH_DETECT 0x1
249#define API_CONN_USBDETECT 0x2
250#define API_CONN_PCPRESENT 0x4
251#define API_CONN_PC_READY 0x8
254#define API_SUPPLY_VIN_ON 0x1
255#define API_SUPPLY_LV_ON 0x2
256#define API_SUPPLY_HV_ON 0x4
259#define API_EXP_GPIN1 0x1
260#define API_EXP_GPIN2 0x2
261#define API_EXP_GPINOUT1 0x4
262#define API_EXP_GPINOUT2 0x8
265#define API_SIGNATECH_I 0x01
266#define API_SIGNATECH_II 0x02
269#define API_AI_VIN_SWMON 0x6F
270#define API_AI_V_HV_STRINGMON 0x8C
271#define API_AI_V_LV_STRINGMON 0xFF
272#define API_AI_VCH1MON 0xFF
273#define API_AI_VCH2MON 0xFF
274#define API_AI_VCH3MON 0xFF
275#define API_AI_VCH4MON 0xFF
276#define API_AI_GND1 0x74
277#define API_AI_SIG1_ID1_MON 0xFF
278#define API_AI_SIG1_ID2_MON 0xFF
279#define API_AI_CH1_DRV_LVL 0xFF
280#define API_AI_CH2_DRV_LVL 0xFF
281#define API_AI_CH3_DRV_LVL 0xFF
282#define API_AI_CH4_DRV_LVL 0xFF
283#define API_AI_GND2 0x75
284#define API_AI_10VMON 0xFF
285#define API_AI_CH1CURRSENS 0xA0
286#define API_AI_CH2CURRSENS 0xA1
287#define API_AI_CH3CURRSENS 0xFF
288#define API_AI_CH4CURRSENS 0xFF
289#define API_AI_INT_TEMP 0xFF
290#define API_AI_GND3 0xFF
291#define API_AI_33VMON 0xFF
292#define API_AI_5VMON 0x71
294#define API_AI_15VMON 0x70
295#define API_AI_15VSWMON 0x72
296#define API_AI_USB5VMON 0x73
297#define API_AI_CH1INTTEMP 0x79
298#define API_AI_CH2INTTEMP 0x65
359PULSAR_API
ERRCODE_T CALLSPEC
api_init(UINT8_T port,
const INT8_T * product_name,
const INT8_T * serial_num);
498 UINT32_T width, FLOAT32_T current, FLOAT32_T *temp);
514 FLOAT32_T current, UINT32_T * width);
530 UINT32_T width, FLOAT32_T *current);
545 UINT32_T width, FLOAT32_T current, FLOAT32_T *voltage);
563 UINT32_T width, FLOAT32_T current, UINT16_T *freq);
607 UINT8_T *connect,UINT8_T *supply,UINT8_T *expansion);
733PULSAR_API
ERRCODE_T CALLSPEC api_get_mac(UINT8_T port, UINT8_T* mac);
735PULSAR_API
ERRCODE_T CALLSPEC api_set_mac(UINT8_T port, UINT8_T* mac);
737PULSAR_API
ERRCODE_T CALLSPEC api_get_manufacturing_mac(UINT8_T port, UINT8_T* mac);
749#if defined(_WIN32) && defined(USE_SAFEARRAY)
750long __declspec (dllexport) __stdcall AddLongs_SafeArray(
751 SAFEARRAY **psaArray,
ERRCODE_T api_init(UINT8_T port, const INT8_T *product_name, const INT8_T *serial_num)
Initializes the connection to a specific Pulsar.
@ API_TRIG_NONE
No trigger input.
Definition: PulsarAPI.h:196
@ API_TRIG_2
Trigger input 2.
Definition: PulsarAPI.h:200
@ API_TRIG_1
Trigger input 1.
Definition: PulsarAPI.h:198
ERRCODE_T api_set_pulsar_ipaddr(UINT8_T port, const char *ip_addr, const char *subnet, const char *gateway)
Set Pulsar IP address.
ERRCODE_T api_get_stored_data(UINT8_T port, UINT8_T *data, UINT8_T len)
Reads a block of Ai defined data from EEPROM.
ERRCODE_T api_set_channel_config_nochecks(UINT8_T port, UINT8_T chan, UINT8_T type, API_CHAN_CONFIG_STRUCT_T *config_data)
Sets the configuration data for one drive channel.
ERRCODE_T api_get_light_data2(UINT8_T port, UINT8_T channel, char *sig2_pn)
Get Signatech II lighthead part and serial number.
ERRCODE_T api_measure_voltage(UINT8_T port, UINT8_T id, FLOAT32_T *voltage)
Measures the voltage of one of the signals monitored by the Pulsar.
ERRCODE_T api_get_status(UINT8_T port)
Reads status information from the device.
ERRCODE_T api_get_error_name(ERRCODE_T ecode, char *nameptr, UINT16_T namelen)
Returns the name of the error associated with the code.
INT16_T ERRCODE_T
API Error Code type – error codes documented in separate "ecodes.ini" file.
Definition: PulsarAPI.h:128
ERRCODE_T api_measure_drive_current(UINT8_T port, UINT8_T ch, FLOAT32_T *current)
Measures the drive current of the selected drive channel.
ERRCODE_T api_set_configuration(UINT8_T port, UINT8_T *slew_rate, UINT8_T *diff_trigger, UINT8_T limit48v, UINT8_T disable_prot)
Set hardware configuration.
ERRCODE_T api_get_channel_config(UINT8_T port, UINT8_T chan, UINT8_T type, API_CHAN_CONFIG_STRUCT_T *config_data)
Gets the configuration data for one drive channel.
ERRCODE_T api_get_errors(UINT8_T port, INT16_T *err, UINT8_T *totalErrors)
Reads the oldest posted error.
ERRCODE_T api_get_pulsar_ipaddr(UINT8_T port, INT8_T *ip_addr, INT8_T *subnet, INT8_T *gateway, INT8_T *mac_addr)
Reads iip configuration settings from the device Each string can be up to 32 characters long.
ERRCODE_T api_get_user_data(UINT8_T port, UINT16_T *rotary, UINT8_T *dip, UINT8_T *trigger, UINT8_T *connect, UINT8_T *supply, UINT8_T *expansion)
Gathers various information about the operating state of the Pulsar.
UINT32_T api_get_dll_full_version(void)
Returns the full version number of this software.
ERRCODE_T api_run_diags(UINT8_T port, UINT8_T test_num)
Runs one or all of the built in diagnostics.
ERRCODE_T api_connect(UINT8_T port, const INT8_T *product_name, const INT8_T *ip_addr)
Initializes the connection to a specific Pulsar.
ERRCODE_T api_calc_max_current(UINT8_T port, UINT8_T ch, UINT32_T width, FLOAT32_T *current)
Calculates the maximum pulse current for the selected channel based on the information stored in the ...
ERRCODE_T api_calc_max_width(UINT8_T port, UINT8_T ch, FLOAT32_T current, UINT32_T *width)
Calculates the maximum pulse width for the selected channel based on the information stored in the li...
API_CHAN_T
Define the drive channel identifiers used with the API interface.
Definition: PulsarAPI.h:177
UINT16_T api_get_dll_version(void)
Returns the current version number of this software.
ERRCODE_T api_get_pulsar_addrs(UINT32_T *addrs, UINT16_T max_addrs, UINT16_T *num_found)
Find pulsar devices on all attached network adapters.
ERRCODE_T api_trigger(UINT8_T port, UINT8_T trig)
Generates a software trigger on the selected trigger channel.
ERRCODE_T api_set_stored_data(UINT8_T port, UINT8_T *data, UINT8_T len)
Saves a block of Ai defined data to EEPROM.
ERRCODE_T api_shutdown(UINT8_T port)
Shuts down the connection to a specific Pulsar.
ERRCODE_T api_get_error_text(ERRCODE_T ecode, char *textptr, UINT16_T textlen)
Returns the text description of the error associated with the code.
ERRCODE_T api_get_configuration(UINT8_T port, UINT8_T *pslew_rate, UINT8_T *pdiff_trigger, UINT8_T *limit48v, UINT8_T *disable_prot)
Get hardware configuration.
ERRCODE_T api_set_channel_config(UINT8_T port, UINT8_T chan, UINT8_T type, API_CHAN_CONFIG_STRUCT_T *config_data)
Sets the configuration data for one drive channel.
ERRCODE_T api_get_pulsar_version(UINT8_T port, INT8_T *fw_version, INT8_T *hw_version, INT8_T *serial_num)
Reads firmware version, hardware version, and serial number Each string can be up to 32 characters lo...
ERRCODE_T api_calc_led_temp(UINT8_T port, UINT8_T ch, UINT32_T width, FLOAT32_T current, FLOAT32_T *temp)
Calculates the expected LED junction temperature based on the information stored in the lighthead dat...
API_MODE_T
Define possible operating modes.
Definition: PulsarAPI.h:162
@ API_MODE_PULSED
Pulse mode.
Definition: PulsarAPI.h:164
@ API_MODE_INTERNAL_TRIGGER
Used for test mode (10Hz internal trigger)
Definition: PulsarAPI.h:170
@ API_NUM_MODE
Number of enum entries (do not use as mode)
Definition: PulsarAPI.h:172
@ API_MODE_TIMING_BYPASS
Used for Continuous mode (with 1,000,000us pulsewidth)
Definition: PulsarAPI.h:168
@ API_MODE_REPEAT
Repeat mode, same as pulsed in 320E.
Definition: PulsarAPI.h:166
int api_connected_device(UINT8_T port)
Gets the type of device on the given port.
ERRCODE_T api_calc_max_freq(UINT8_T port, UINT8_T ch, UINT32_T width, FLOAT32_T current, UINT16_T *freq)
Calculates the maximum frequency allowed for a given width and current.
ERRCODE_T api_calc_supply_voltage(UINT8_T port, UINT8_T ch, UINT32_T width, FLOAT32_T current, FLOAT32_T *voltage)
Calculates the required supply voltage for a given width and current.
ERRCODE_T api_get_light_data(UINT8_T port, UINT8_T *sig_model, UINT8_T *sig1_id, char *sig2_pn, char *sig2_sn)
Gathers information regarding the lighthead type.
Channel/output configuration struct.
Definition: PulsarAPI.h:136
UINT32_T offtime
Off time between repeat pulses (microseconds)
Definition: PulsarAPI.h:154
UINT32_T repeat_cnt
Number of repeat pulses per trigger (0 = 1 pulse)
Definition: PulsarAPI.h:146
UINT16_T delay
Pulse delay (microseconds)
Definition: PulsarAPI.h:148
UINT8_T rising
Rising edge (1 = rising, 0 = falling)
Definition: PulsarAPI.h:140
UINT8_T trigger
Trigger input.
Definition: PulsarAPI.h:138
UINT32_T width
Pulse width (microseconds)
Definition: PulsarAPI.h:152
UINT8_T mode
Operating mode.
Definition: PulsarAPI.h:143
FLOAT32_T current
Pulse current (Amps)
Definition: PulsarAPI.h:150