background image

Technical reference

23

3.3.2.6

usb_tc08_set_mains

short usb_tc08_set_mains

short handle,
short sixty_hertz

)

This routine sets the USB TC-08 to reject either 50 or 60 Hz.

Arguments

handle

Specifies the USB TC-08 unit.

sixty_hertz

Specifies whether to reject 50 Hz or 60 Hz. If set to 1,
the unit will reject 60 Hz, if set to 0, the unit will reject
50 Hz.

Returns

0

Use 

usb_tc08_get_last_error

1

Mains rejection set correctly.

Note: If the rejection is not set correctly the unit will be more susceptible to mains
interference.

Содержание 8 Channel Thermocouple USB Data Acquisition Module TC-08

Страница 1: ...omega com e mail info omega com For latest product manuals omegamanual info User sGuide TC 08 8 Channel Thermocouple USB Data Acquisition Module Shop online at...

Страница 2: ...n Germany TEL 49 0 7056 9398 0 FAX 49 0 7056 9398 29 Toll Free in Germany 0800 639 7678 e mail info omega de United Kingdom One Omega Drive River Bend Technology Centre ISO 9002 Certified Northbank Ir...

Страница 3: ...al reference 7 1 Introduction 7 2 Modes of operation 7 1 Introduction 8 2 Streaming mode 10 3 Get Single mode 12 4 Legacy mode 14 3 Driver routines 14 1 Introduction 15 2 New USB mode and legacy mode...

Страница 4: ......

Страница 5: ...s an explanation of how to use the software drivers For information on the USB TC 08 software please consult the software help file 1 2 Installing the driver The driver is installed automatically when...

Страница 6: ...ne and the USB enumeration progress bar gradually expand to 100 If the progress bar does not start moving disconnect and reconnect the USB TC 08 then click Refresh 6 In the USB Devices pane select the...

Страница 7: ...The Edit TC 08 Channel dialog box appears 9 From the Thermocouple drop down list select the type of thermocouple you are using and click OK The TC 08 Channels dialog box reappears 10 Click OK Channel...

Страница 8: ...laptop is not grounded reading stability cannot be guaranteed and it may be necessary to manually ground the equipment Take care to avoid connecting the inputs of the product to anything which may be...

Страница 9: ...upply required Environmental conditions 0 to 50 C 25 to 75 humidity Quoted accuracy over 20 30 C NOT water resistant Note The resolution and accuracy depend upon the thermocouple type and the temperat...

Страница 10: ...ed in the circuit This phenomenon is known as the Seebeck Effect The conductors can be made of any two dissimilar metals and when the hot junction is heated the current flow can be observed If the pos...

Страница 11: ...ction of examples of how to use the drivers The driver is supplied as a Windows DLL The DLL uses the C stdcall calling convention and can be used with C Delphi and Visual Basic programs It can also be...

Страница 12: ...ication on the PC including the one you are writing does not prevent the driver from collecting readings for more than three sampling intervals To allow the driver to sample continuously call the Wind...

Страница 13: ...ion can be idle while the driver collects the readings Sleep 10000 use a two dimensional array with an array of readings for each channel In a real application this would be a nested loop to regularly...

Страница 14: ...ction relies entirely on the timing of the calling application it is ideal for time intervals greater than 1 minute If high speed sampling is required use Streaming mode Note The function call overhea...

Страница 15: ...usb_tc08_get_single minimum_interval usb_tc08_get_minimum_interval_ms handle printf Conversion time d n minimum_interval Collect 10 readings over approximately 9 minutes last_time GetTickCount for i...

Страница 16: ...asily developed for both the serial version and the USB version of the TC 08 all the function names have been changed The usb_tc08_legacy_set_channel function no longer supports offset and gain this i...

Страница 17: ...g for all channels usb_tc08_legacy_set_channel handle channel K 0 usb_tc08_legacy_run handle last_cycle_no 0 no_of_readings 0 while no_of_readings 50 collect 50 readings usb_tc08_legacy_get_cycle hand...

Страница 18: ...tring form usb_tc08_get_last_error Returns the last error for a specified unit or for a call to open a unit New USB mode only usb_tc08_set_channel Sets up a USB TC 08 channel usb_tc08_run Starts the U...

Страница 19: ...iver is thread safe and will not allow access to a single unit from more than one application If therefore usb_tc08_open_unit does not find a unit check that other applications are not using the USB T...

Страница 20: ...TC 08 User s Guide 16 Returns Positive short The handle of a unit 0 No more units were found 1 Unit failed to open Call usb_tc08_get_last_error with a handle of 0 to obtain the error code...

Страница 21: ...ng multiple units for i 0 new_handle usb_tc08_open_unit 0 i store the handle in an array handle_array i new_handle no_of_units i deal with the error if there is one if new_handle was zero then there w...

Страница 22: ...e and will not allow access to a single unit from more than one application If therefore usb_tc08_open_unit_async does not find a unit check that other applications are not using the same USB TC 08 Th...

Страница 23: ...ntf No USB TC08 units found could terminate the application here No errors so start polling usb_tc08_open_unit_progress continuously for its enumeration state do result usb_tc08_open_unit_progress han...

Страница 24: ...ort to the unit if the enumeration is completed Handle will always be 0 if the enumeration is incomplete progress Out Optional can pass NULL returns a number from 0 to 100 representing the percentage...

Страница 25: ...rguments handle Specifies the USB TC 08 unit Returns 0 Use usb_tc08_get_last_error 1 Unit closed successfully Note If you successfully open any USB TC 08 units call usb_tc08_close_unit for each handle...

Страница 26: ...ide 22 3 3 2 5 usb_tc08_stop short usb_tc08_stop short handle This routine stops the unit from running Arguments handle Specifies the USB TC 08 unit Returns 0 Invalid parameter 1 Unit stopped streamin...

Страница 27: ...or 60 Hz Arguments handle Specifies the USB TC 08 unit sixty_hertz Specifies whether to reject 50 Hz or 60 Hz If set to 1 the unit will reject 60 Hz if set to 0 the unit will reject 50 Hz Returns 0 U...

Страница 28: ...s defined by calling usb_tc08_set_channel Arguments handle Specifies the USB TC 08 unit Returns 0 Use usb_tc08_get_last_error Minimum Interval Minimum sampling interval for current setup in millisecon...

Страница 29: ...y the driver version member will be valid but the function will return 1 success Arguments handle Specifies the TC 08 unit info A pointer to a structure containing unit information Returns 0 Use usb_t...

Страница 30: ...The string is separated into the following elements each appearing on a different line driver version hardware version variant info serial number calibration date Arguments handle Specifies the USB T...

Страница 31: ...n the C header file are as follows User Developer error codes Error code Error Further information 0 USBTC08_ERROR_OK No error occurred 1 USBTC08_ERROR_OS_NOT_SUPPORTED The driver supports Windows XP...

Страница 32: ...d 12 USBTC08_ERROR_PIPE_INFO_FAIL Can not get USB pipe information 13 USBTC08_ERROR_NOT_CALIBRATED No calibration date was found 14 USBTC08_ERROR_PICOPP_TOO_OLD An old picopp sys driver was found on t...

Страница 33: ...ich channel you want to set the details for this should be between 0 8 0 denotes the cold junction tc_type Specifies what type of thermocouple is connected to this channel Set to one of the following...

Страница 34: ...ds This routine should be called after usb_tc08_set_channel has been called Arguments handle Specifies the USB TC 08 unit interval Specifies the requested sampling period You can use usb_tc08_get_mini...

Страница 35: ...script corresponding to the channel number Channels which are not enabled are filled with QNaN values overflow_flags Pointer to a variable containing a set of bit flags that are set high when an overf...

Страница 36: ...under very heavy processor loading padding may not always be accurate Arguments handle Specifies the USB TC 08 unit temp_buffer Pointer to a location where the readings are to be placed times_ms_buff...

Страница 37: ...to a variable that will be assigned a value of 1 if an overflow occurred on any of the readings copied into temp_buffer or 0 if an overflow did not occur An overflow occurs when the input signal is hi...

Страница 38: ..._tc08_legacy_run short usb_tc08_legacy_run short handle This routine starts the sampling thread and forces the specified unit to run in legacy mode Arguments handle Specifies the USB TC 08 unit Return...

Страница 39: ...cted to this channel Set to one of the following characters B E J K N R S T Use a space in quotes to disable the channel filter_factor Specifies the size of the median filter Each time the driver take...

Страница 40: ...nnel 2 and so on temp Pointer to a location where readings are to be placed Each reading should be compared with 2147483647L or LONG_MAX include limits h to check for overflows An overflow occurs when...

Страница 41: ...tures are returned in hundredths of a degree Celsius Normally you do not need to worry about the cold junction temperature as the driver automatically uses it to compensate thermocouples You can howev...

Страница 42: ...08_legacy_get_driver_version short usb_tc08_legacy_get_driver_version void This routine returns the driver version This is useful when you need to find out if the latest driver is being used Arguments...

Страница 43: ...ersion short handle This routine sets the version variable to match the version of the USB TC 08 currently being used Arguments handle Specifies the USB TC 08 unit version Pointer to a location where...

Страница 44: ...find out how many complete cycles of readings the driver has taken Then you can call usb_tc08_legacy_get_temp but only when the cycle has been incremented Arguments handle Specifies a USB TC 08 unit...

Страница 45: ...ions The following files must be in the same directory usb_tc08 rch usbtc08 h usbtc08 dll all 32 bit applications C C programs can access all versions of the driver If usbtc08 h is included in a C pro...

Страница 46: ...ss all of the driver routines described earlier it is easier to use the special LabVIEW access routine To use this routine copy usbtc08 vi from the Examples subdirectory to your LabVIEW user lib direc...

Страница 47: ...ATED S 14 USBTC08_ERROR_PICOPP_TOO_OLD S Key S Errors in this category indicate that a fault has occurred with the USB TC 08 unit or your PC Try disconnecting the USB TC 08 then reconnecting it If thi...

Страница 48: ...ed to identify QNaN float representations cast to a double first QNaNs will not cause an error if arithmetic operations are performed on them however the results will remain indeterminate Resolution A...

Страница 49: ...to 1760 C Low sensitivity 10 uV vC and high cost make these thermocouples unsuitable for general purpose use Due to their high stability type S thermocouples are used as the standard of calibration f...

Страница 50: ......

Страница 51: ...08_legacy_get_version 14 39 usb_tc08_legacy_run 14 34 usb_tc08_legacy_set_channel 14 35 usb_tc08_open_unit 14 15 usb_tc08_open_unit_async 14 18 usb_tc08_open_unit_progress 14 20 usb_tc08_run 14 30 usb...

Страница 52: ...usb_tc08_legacy_get_cold_junction 14 37 usb_tc08_legacy_get_cycle 14 40 usb_tc08_legacy_get_driver_version 14 38 usb_tc08_legacy_get_temp 14 36 usb_tc08_legacy_get_version 14 39 usb_tc08_legacy_run 14...

Страница 53: ...se shall not exceed the purchase price of the component upon which liability is based In no event shall OMEGA be liable for consequential incidental or special damages CONDITIONS Equipment sold by OME...

Страница 54: ...ty Indicators Turbine Paddlewheel Systems Totalizers Batch Controllers pH CONDUCTIVITY pH Electrodes Testers Accessories Benchtop Laboratory Meters Controllers Calibrators Simulators Pumps Industrial...

Отзывы: