Home
User Manual - HYTEK Automation, Inc.
Contents
1. If Ext Trigger is true after this vi returns the device will wait for a high state from the trigger to start the data acquisition False will start the data acquistion right after this call into pc side background data buffer This vi will return actual scan rate it may not always the same as the specified input scan rate This vi will return an error if the channel s settings are not correct Connector Pane ExtTrigger roo LIGA Session In AAA joo UISBDAG Session Out Start Channel es MNofChs Se me Actual Scan Rate Ss error out InputRange Scan Rate error in no error 9 3 5 USBDAQ_StopStream_HS vi U1208LOG only This vi stops the high speed data streaming of USBDAQ U1208LOG 63 Connector Pane SPGL Session In SSeS Ge IWSBDAQ Session Out error in no error A errr error out 9 3 6 JUSBDAQ GetStreamSamples vi This vi gets the data back from the internal PC side data buffer The number of channels has to be the same as the number of channels in USBDAQ_StartStream vi User can specify how many scans need to be read back This vi only returns when all the asked scans are read To stop inbetween user need to call the USBDAQ_StopStream vi and this vi will error out and return The timeout is for read of 128 samples not for the total number of scans asked The returned data is interleaved for example if you start streaming with starting channel of Al 0 number of channels is 2 then the
2. TUSBDAQ_APTI int IUSBDAQ_ STD_APIiUSBDAQ_ Stop_VRecord DevSession Session int CamIndex All AVI functions are for U1208LOG only 7 18 iUSBDAQ_ AVI Open U1208LOG only IUSBDAQ_API unsigned int IUSBDAQ_STD_API 1USBDAQ_AVI_Open DevSession Session char fileName return file session 7 19 USBDAGQ_AVI_Run U1208LOG only TIUSBDAO_API int IUSBDAQ STD_APIiUSBDAQ AVI Run DevSession Session unsigned int FileSession 7 20 USBDAQ_AVI_Stop U1208LOG only IUSBDAQ_API int IUSBDAQ_ STD_APIiUSBDAQ_ AVI Stop DevSession Session unsigned int FileSession 4 7 21 USBDAQ AVI Pause U1208LOG only IUSBDAQ_ API int IUSBDAQ STD_APIiUSBDAQ AVI Pause DevSession Session unsigned int FileSession 7 22 ISBDAQ AVI Resume U1208LOG only IUSBDAQ_ API int IUSBDAQ STD_APIiUSBDAQ AVI Resume DevSession Session unsigned int FileSession 7 23 iUSBDAQ_ AVI Seek U1208LOG only IUSBDAQ_ API int IUSBDAQ STD_APIiUSBDAQ AVI Seek DevSession Session unsigned int FileSession unsigned int Position unsigned int stopPos 7 24 USBDAQ_ AVI GetPosition U1208LOG only IUSBDAQ_ API int IUSBDAQ STD_APIiUSBDAQ AVI GetPosition DevSession Session unsigned int FileSession unsigned int Position 7 25 USBDAGQ AVI GetDuration U1208LOG only IUSBDAQ_ API int IUSBDAQ STD_APIiUSBDAQ AVI GetDuration DevSession Session unsigned int FileSession unsigned int Duration 7 26 iUSBDAQ_ AVI Close U1208LOG only IUSBDAQ_ API int IUS
3. gt iIDAQTest amp Log Software 2 0 USBDAQ Lists y Connected Index Device 1D Serial Number Firmware Version User Index Ae E Copyright c 2005 2007 HYTEK Automation Inc 0 U1208LOG 4294967279 90000200 255 Connect fo Device all rights reserved info hytekautomation com info hytekautomation com cn Re Enumerate s Bo a Utility General Functions l Analog Inputs l Digital 1 0 l Counter PWM Output l Read Write EEPROM l Analysis Graph Logger Configuration Video amp Data Log Interval Time Stamp 23 14 39 a E dE 6 27 2007 di Minute Set Logging Config d Set RT Clock Abovell Set RT Clock To Now po Second Press this button will set the real time clock on USBDAQ J i to the time in Time Stamp field Log interval can be from 1 second to 12 hours Current Time Stamp in RT Clock ER PM 6 27 2007 Figure 20 Logger Configuration Tab 5 28 Video amp Data Tab U1208LOG only In this tab user can select a directshow supporting USB webcam or firewire camera It will display live video synchronized with data scan 8 analog inputs 16 DIOs one counter record AVI file and data playback AVI file with data etc Up to 3 cameras are listed and up to 5 seconds video clip and data can be recorded with this iDAQTest amp Log software 29 gt iDAQTest amp Log Software 2 0 Copyright c 2005 2007 HYTEK Automation Inc 08LO 429496 7279 00000200 5 All rights reserved info hytekautomation
4. l DeviceT ype l ald o o d x H 120616 Number orichs Devicelndex ay l InputF ange SP 4 096 Y Initialize First Time D Measure Once 9 1 4 USBDAQ_StreamingAls _Example vi This example shows how to acquire analog data using streaming functions Connector Pane TREAM ANALOG EXAMEL Front Panel DeviceType Start Channel SIE aro ActualNofScans E waveform Graph 2000 Devicelndex NofChs NES Plot O PAYS Jo le Ad Plot 1 l Scan Rate Plot 2 Initialize First Time Mar ca 1000 SC Plot 3 Ol A Number of Scans to Acquire Plot 4 PY ne ey Sanne E E E v S Pl tS AN InputRange 000 2 5 Ne E Plot 6 9 0 4 096 Y ExtTrigger 2 S dn gt Plot 7 LJ 1 TESS 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Time 9 1 5 USBDAQ_DIO Example vi This example shows how to set the digital I O directions read write DIO states Connector Pane DIG ENAMFEL Front Panel 51 PY nfo woof wf wf mf e FY of of of ff nf wf I r E e E e gio r a A A If you set a pin as output pin please do not connect an input source to it 9 1 6 USBDAGQ DIO Counter vi This example shows how to toggle the digital I O line 5 and reads the counter The DIO line 5 should be wired with counter to run this example Connector Pane DIG COUHTE EXAMFL Front Panel ne counter 9 1 7 USBDAQ_PWM_Example vi This example shows how to set PWM outputs Connector Pane 52 FWHM
5. Data array size actual number of scans x number of channels The minimum samples requested must not be less than 128 for example if you have two channels then the minimum number of scans must not be less than 64 There is no limit for maximum number of scans requested The internal data buffer has a size of 12 8k samples if this buffer is full the later coming data will be ignored Usually user should start calling this function right after start streaming There are two possible ways user can use this function one way is passing in a big total number of scans to read at once can be bigger than 12 8k because the USBDAQ dll will take care of this this function will wait until all asked scans returned The other way is asking for a small amount number of scans and repeat calling this function again and again The only risk of second method is if there is too many delays between two consecutive calls of this function the internal data buffer may be full some data will be ignored which will result none continuous data between two calls In iDAQTest amp Log software it uses the second method each time it asks for one second long data which means the asked number of scans equals to scan rate and repeat calling this function again and again concatenate the data to get a continuous graph User may also want to consider using a separate data engine to handle streaming getting data so that this action will not block other user interface act
6. 1 2 f DutyCycle 0 100 Chen Period 3 333 micro second e E Figure 15 PWM Output Tab 5 24 Read Write EEPROM Tab 1USBDAQ has 240 bytes memory space reserved for user data In this tab user can write data into EEPROM at a specified address and read back from a specified address The following condition has to meet Starting Address Bytes To Read Write lt 240 26 If the above condition 1s not met a popup dialog box will appear telling the error code and error source Just click on OK and continue using the software by giving the correct address or number of bytes to read write Reset General Functions Analog Inputs Digital 1 0 Counter PWM Output Read Write EEPROM Analysis Graph Write String Read String This is USBDAO U170816 A This is USBDAO U120816 A Y T Starting Address Bytes to Read _ Write To EEPROM Y 1 Jo SE Read From EEPROM Read String in Hex Max 240 bytes can be written 5468 6973 2069 7320 6955 5342 4441 Li 5120 2020 5531 3230 30531 36 E Figure 16 Read Write EEPROM Tab 5 25 Analysis Graph Tab Use can load a saved data file in this tab iDAQTest amp Log provides limited analysis function user can view the multi plot graph Two cursors can be used for measuring the data points The XY axis by default is in auto scale mode right click on the graph a popup menu will appear user can turn auto scale on or off or just click on the axis number to change the graph ra
7. error out 9 3 1 iUSBDAQ Read Multi_Al vi This vi scans multiple analog channels once and return the voltages The maximum Number of Chs is 8 and it depends on which channel is the starting channel The StartChannel NumberOfChs should not exceed 8 Connector Pane LISBOA Session In IUISBDAG Session Que ShartChannel Voltages InputRange error out Numbercfche error in no error 9 3 2 1USBDAQ StartStream vi This vi starts the streaming mode analog inputs acquisition This vi returns right the way after the call and the streaming is in background with an internal pc side data buffer Please read more about this data buffer in USBDAQ_GetStreamSamples vi description The maximum Number of Chs is 8 and it depends on which channel is the starting channel The StartChannel NumberOfChs should not exceed 8 The maximum sampling throughput varies with number of Channels Please refer to iUSBDAQ User s Guide for details The relationship between sampling rate and scan rate is SampleRate ScanRate NumberOfChannels For example if scan rate is 3000 number of channels is 8 the total sample rate will be 24 000samples s The minimum sample rate has to be 128 If lower than this required user can use scan mode So for example if you have two channels the minimum scan rate has to be 64 If Ext Trigger is true after this vi returns the device will wait for a high state from the trigger to start the data acquisition False wil
8. software to see how device works or start right now programming with your favorite language with our programming API DLL 11 e This step is for U1208LOG model only For checking the stand alone data logger mode of U1208LOG you can leave the USB cable connected to PC or use the included USB power adaptor plug into the 110V or 220V power plug connecting the USB cable must be the one supplied by HYTEK Automation or if you use your own USB cable make sure it has noise reduction filter ring or else logging mode may not work between USB power adaptor and Ul208LOG USB1 connector At power up the Ul208LOG module you may notice that LED2 will flash 3 times at first then turn off Now switch the switch besides the USB2 connector to Log Start mode connecting an USB flash disk to USB2 connector At this moment you will notice that LED2 will turn on LED1 will turn off and USB flash disk is flashing after a while time depends on different USB flash disk LED2 will start flash in an interval of 1 second this is an indication that the module is writing data into USB flash disk and by default it is set to 1 second logging interval Now switch the switch to PC Stop mode this will stop the data logging and it s strongly recommended that user should always put the switch to PC Stop mode before unplug the USB flash disk to avoid data lose User can use iDAQTest amp Log software to change the logging interval and convert logged raw
9. 1 1USBDAQ EnumerateCams vi This vi enumerates the camreas in the system and return the total cameras available The library may have limit the max number of cameras that can be used Please refer to user manual This vi has to be called first before any video related functions can be used Connector Pane SPGL Session In IUSBDAQ Session Cut Count error out error in no error 9 8 2 JUSBDAQ_OpenCam Preview vi This vi opens camera session in preview mode Before you can run or stop camera video you 66 should always first open camera session Connector Pane IUSBDAQ Session In Camera Index Get Video Format Window Parent Window Ret error in no error USB GC Session Out error out 9 8 3 iUSBDAQ Close _Camera vi This vi closes camera session After you finishes using the camera session please close it Connector Pane SPGL Session In Camera Index error in no error IUSBDAQ Session Cut error out 9 8 4 USBDAQ Video_Run vi This vi runs the life camera video Connector Pane SPGL Session In Camera Index error in no error IUSBDAQ Session Cut error out 9 8 5 iUSBDAQ Video_Stop vi This vi stops the life camera video lt does not close the camera session You can run the video again with video run function Connector Pane SPGL Session In see ee sons IWSBDAQ Session Out Camera Index error in no error eee error out 9 8 6 USBDAQ_ Get_CamName vi This vi gets
10. 12 35 DIO 13 36 DIO 14 37 DIO 15 38 DIO 16 Ir 5U 2 AGI Ar Al 4 Ald 5 AG 6 Al TAI br AL 4 A14 Tih 415 14 AGND 12516 1h AIT 14 GD 14 BIO 1 16 DIO 2 17 HO 3 Tk DIO 4 1 Trigger 20 GD USBDAG 1U1208LOG HYTEK Automation Inc www hvtekautomaton com 21 GND 22 DS 23 DIO 6 ak MO T 25 PWM 1 26 PM 2 27 GHD 28 Counte 29 DMF 30 DIO 9 34 DIO 40 325 010 di 33 GND 34 DIO 42 35 010 13 36 DIO 14 37 HO 15 38 D 16 Ar Trigger Switch Jr GND 1 Trigger oo Unused 20 GHD 40 GHD USB2 A LED LO G Start PC Stop Terminal layout of U120816 Terminal layout of U1208LOG U1208LOG Model It has the same terminal layout as U120816 model above except terminal 39 is not Unused instead it becomes TriggerO used as video LOG trigger out line Figure 4 is the description of terminals Analog input channel 3 Analog input channel 2 14 12 A GOD Common ground _ a Go l l l External trigger line for analog streaming mode p lt 00 ND A GOD Common ground _ GND Common ground 2 2 2 2 2 2 p lt l 2 GND 2 2 3 PWM 2 PWM output 2 g Common ground 8 5 6 7 9 0 2 3 4 5 6 9 0 A GOD Common ground _ 38 Unused for Output as For Ul208LOG model it s video or LOG Ul20816 TriggerO trigger out line TriggerO for U1208LOG A Common ground Figure 3 Termin
11. 1t will not miss any video frames passing by The synchronization accuracy of data and video will be within one video frame time Note while putting this function in a loop for pulling you can still call other functions that will communicate with the hardware such as start streaming in normal mode not high speed streaming mode for U1208LOG that is the only exception read analog data or digital lines etc but you need to make sure they happen in a sequence not parallel maybe by using a semaphore otherwise error may occur due to both functions trying to communicate with hardware at the same time Connector Pane SPGL Session In IUSBDAQ Session Out Camera Index Voltages error in no error BIOs 1to8 DIOs9to16 Counter error out 9 8 10 iUSBDAQ Video StartRecord vi This vi starts the video recording into avi file The camera session should be pre opened by IVision_OpenCam_Preview vi 68 Connector Pane USBDAG Session ln Keen USBDAG Session Out Camera Index AVI File Path pq error out error in no error 9 8 11 USBDAQ Video StopRecord vi This vi stops the video recording into avi file This vi will not close the camera session so the existing camera session will still be usable User to call the IVision_Video_Run vi to run the video after this vi Connector Pane iLSBDAQ Session In Camera Index error in no error IUSBDAO Session Out error out 9 9 AVI Functions U1208LOG only 9 9 1
12. 6 1USBDAQ_AIStopStream_HS U1208LOG onlvt 44 7 7 EnumerateCameras U1208LOG only 44 7 8 1USBDAQ_OpenCam U1208LOG only 45 7 9 IUSBDAQ_VideoGetData U1208LOG online 45 710 i1USBDAQ CloseCam Ul208LOG online 46 TAL AUSBDAO Video Run U1208 LOG Only Nui a 46 7 12 USBDAQ Video_Stop U1208LOG only 46 7 13 USBDAQ_Get_CamName Ul208LOG online 47 7 14 USBDAQ SetVWindow_Cam U1208LOG only 47 7 15 USBDAQ_ Camera Property Ul208LOG ont 4 7 16 USBDAQ_Start_Vrecord Ul208LOG ont 47 7 17 1USBDAQ Stop_Vrecord U1208LOG only 47 7 18 1USBDAQ_AVL Open U1208LOG only 47 7 19 iUSBDAQ_ AVI Run U1208LOG only Larra aes 47 7 20 J 1USBDAQ_AVI_Stop U1208LOG only 47 7 21 1USBDAQ_AVI Pause U1208LOG only 48 7 22 1USBDAQ_AVI_ Resume U1208LOG only 48 T23 AVUSBDAO AVI Seek Cheese eege eeng 48 7 24 iUSBDAQ AVI GetPosition U1208LOG only 48 7 25 1USBDAQ_AVI GetDuration Ul208LOG online 48 7 26 iUSBDAQ AVI Close UI208LOG only 48 7 27 iUSBDAQ SetVWindow_AVI U1208LOG only occcccccccncnccnnnnnncnnnnncoonos 48 Error Code DeSCr pt Om E 48 LabVIEW Interface Descrip isis 49 9 1 Pao WE VV T xinple Syna a ls 49 9 1 1 USBDAO Ge tlnto Example Mais al la 49 9 1 2 BK SinsleAl Example Visitor 50 9 1 3 IiUSBDAQ Multiple Als Example Vibrador 50 9 1 4 IUSBDAQ StpreammngAhle Example vi 51 9 1 5 ISB DAO DIO Example Vistas 51 9 1 6 IUSBDAO DIO Comte Macia 52 9 1 7 IUSBDAO PWM Example iia 52 9 1 8 USBDAO Counter Examp
13. 8 a 10 1 9 1 15 iUSBDAQ_AVI_Example1 vi U1208LOG only This example shows how to playback AVI file Connector Pane ANI pnAMPL Front Panel VI File Path Boo Mdl IUSBDAQ Streaming_HS Example vi This example shows how to acquire analog data using high speed streaming functions This is only for U1208LOG model Connector Pane STREAM ANALOG EnAMFL HZFEED Front Panel 58 DeviceType Start Channel ANUSEDAO d i AIO ActualNofScans Actual Scan Rate nal a lo oC Waveform Graph Devicelndex NofChs 4 d o o cd B o oo J y SR Scan Rate i Initialize First Time A foo l CO R 1000 3 Number of Scans to Acquire 75 d i InputR ange SES E Oo 4 096 v H d Sa ExtTrigger 5 LS 1 0 5 0 l l l l l O 1000 2000 3000 2000 5000 Gl Time 9 2 General Device Functions 9 2 1 USBDAQ_AIlI_Vis vi Open this vi s diagram will see all USBDAQ functions Connector Pane 9 2 2 USBDAQ_GetErrorString vi This vi takes a USBDAQ error code and returns the error description string Connector Pane Error Code Re Error String 9 2 3 USBDAQ ErrorOut vi This vi generates an error out cluster with the USBDAQ error code and description string as error source Connector Pane error in error out 59 9 2 4 USBDAQ GetDLLVersion vi This vi gets the current iUSBDAQ dIl version Connector Pane Ei Versiorhlumber error in no error error out 9 2 5 JUSBDAQ Get Designerlnfo vi This vi r
14. of Channels Please refer to the hardware part of USBDAQ User s Guide for details The relationship between sampling rate and scan rate is SampleRate ScanRate NumberOfChannels For example if scan rate is 3000 number of channels is 8 the total sample rate will be 24 000samples s The minimum sample rate has to be 128 If lower than this required user can use scan mode or over sampling For example if you have two channels the minimum scan rate 35 has to be 64 which will result a sample rate of 128samples s If Ext Trigger 1s true after this vi returns the device will wait for a high state from the trigger line to start the data acquisition False will start the data acquisition right after this call into pc side background data buffer This function will return actual scan rate 1t may not always the same as the specified input scan rate This function will return an error 1f the channel s settings are not correct Syntax int USBDAO_AIStartStream DevSession Session int StartCh int NofChs int InputRange int ScanRate int ActualRate int withExternalTrigger Parameters Session input device session that being opened StartCh input the starting channel range O 7 0 is AI 0 and so on NofChs input number of channels to read data from starting from the channel StartCh The maximum number of channels is 8 and 1t depends on which channel is the starting channel The StartCh NofChs should not excee
15. second error in no error INSBD A Session Cut error out 9 5 2 iUSBDAQ PWM_Outt1 vi This vi sets PWM outputs Both PWM channels use the same period or frequency The last set period will be in effect The duty cycle is between 0 1023 Connector Pane IUSBDAQ Session In Channel 1 2 DutyCyce f0 1023 Period 3 333micro second error in no error JUsBDAG Session Out error out 9 5 3 USBDAQ_StopPWNM vi This vi stops PWM Connector Pane LISBOA Session In Channel 1 2 IUISBDAG Session Que error in no error error aut 9 6 Counter Functions 65 9 6 1 1USBDAQ Read _Counter vi This vi reads counter If Reset Counter switch is true the counter get reset to 0 after the read Connector Pane LISBOA Session In Jrs IUISBDAG Session Que Reset Counter Count error in no error rt error out 9 7 Read Write EEPROM Functions 9 7 1 USBDAQ_ReadEEPROM vi This vi reads from EEPROM The following condition must meet Starting Address Bytes To Read lt 240 Connector Pane LISBOA Session In BytesToRead Address Data in String error in no error error out INSBO AG Session Que Data 9 7 2 USBDAQ WriteEEPROM vi This vi writes bytes to EEPROM The following condition must meet Starting Address Bytes To Write lt 240 Connector Pane LISBOA Session In EytesTowrite Address Data error in no error IUISBDAG Session Ouk error out 9 8 Video Functions U1208LOG only 9 8
16. size USB 2 0 1 1 Full Speed Interface USB Bus Powered 8 Single Ended 12 Bit Analog Inputs 0 4 096 V Analog Input Range Up to 32 kSamples Sec Throughput with Single Channel Up to 13kSamples Second for Streaming Mode Supports Both Scan Mode and Continuous Streaming Mode Data Acquisition One Dedicated Trigger Line for Streaming Mode Data Acquisition Two 10 bit PWM Outputs 3kHz 333kHz 16 Bi Directional Digital I O Lines 125HZ update rate One 16 Bit Counter 240 bytes EEPROM Reserved for User Data Multiple USBDAOs Can Be Connected On Same Computer Works with Windows 98SE ME 2000 or XP FREE USB Cable FREE Screwdriver e FREE Device Driver Programming API DLL LabVIEW Drivers Examples e FREE Standalone Ready to Run iDAQTest amp Log Software for Testing Data Logging Data Playback and Simple Analysis 30 Days Money Back Guarantee 6 Month Warranty and Trade In Policy Approximately 3 5 x 3 375 x 1 125 9cm x 8 5cm x 3cm e Industrial Temperature Range 2 Overview of ada U1208LOG r D a n 3 S p nn G eme i LE e le Ee Zb la hi ee EE A ee ano a H i Below highlights the key feature points of the 1 USBDAQ U1208LOG USB data acquisition module PC control mode e USB 2 0 1 1 full speed interface e USB bus powered e 8 Single Ended 12 Bit analog Inputs e 0 4 096 V analog input range e Up to 64 kSamples Sec throughput rate with single channel up to 53kSamples Second fo
17. the video trigger out line you will notice the pulses Data is saved under this application s whenever there is a video frame passing by temp folder Figure 7 Overview of iDAQTest amp Log software There are 10 tabs in this software Below will go over each corner of the software and explain the operations 5 18 Top Part This is v1 0 top will update to v2 0 4 5 Dev Type 3 Dey Count DLL efsion U120816 Re Enumerate Connected Devices 1 00010000 A innect Tp Device 7 e 9 Figure 8 Top part of the iDAQTest amp Log software Close App Copyright c 2005 HYtek Automation Inc All rights reserved info hytekautomation com te 1 This is the device type selection field For iDAQTest amp Log version 1 0 there is only one device type available which is 1 USBDAQ 21 2 This button will cause the software to close all opened sessions and re enumerate all the USBDAQSs connected to the computer The total number of found devices will be displayed in field 3 3 Display the total number of 1USBDAQs found in a computer 4 Display the USBDAQ dll version used for this application 5 If light green means the selected device s session is opened and connected successfully 6 Press this button will exit the whole application 7 This list box lists all the devices of the selected device type field 1 User can select one device by drop down the list box 8 Press this button will try to conn
18. the way or waiting for external trigger This is software configurable In trigger mode a high state on the trigger line will start the data acquisition While in streaming the LED will blink but for higher scan rate because LED is blinking so fast that user may not see it The maximum throughput of streaming data varies with number of channels and they are also system dependant For U1208LOG beside the normal streaming mode as U120816 which can stream up to 32Ksamples s there is also a high speed streaming mode which can stream up to 64Ksamples s Figure 5 shows the max throughputs A SO AA OSO A ON AA O 3 2 l LI 130000 High speed streaming mode is for U1208LOG model only Below is the throughput rate BR O A O 16 Figure 4 Table of analog streaming throughput rate The relationship between sample rate scan rate and number of channels is as below SampleRate ScanRate NumberOfChannels For example if you have 8 input channels with a scan rate of 4000 then the total sample rate would be 32ksamples s For normal streaming mode the minimum sample rate has to be 128 If lower than this required user can use scan mode or over sampling For example if you have two channels the minimum scan rate has to be 64 in order to make up the minimum sample rate of 128 For high speed streaming mode the minimum sample rate can be 1sample s due to different design method While streaming data in normal streaming mode ot
19. yet If you have connected please disconnect the device e Install the USBDAQ full installation program or at least USBDAQ device driver if you haven t done so USBDAQ device driver is included in the full installation It s the low level driver used for computer to recognize and enumerate the 1 USBDAQ devices This installation will also copy the 1USBDAOQ dll the programming APIs that your software calls into computer system s directory e Now connect the USBDAQ to computer usb port with a USB cable if you have U1208LOG please make sure you switch to PC Stop mode first before connecting the cable or else computer will not recognize this device The computer will automatically detect the new hardware if this is the first time 1USBDAQ is installed on a USB port every time you change to a different USB port for the first time the PC will prompt and saying new hardware detected follow the instruction to install the driver If windows popup saying that the driver for this hardware is not window s logo certified please just ignore this message and hit Install anyway If it s looking for mchpusb sys file it s under the system32 drivers After successful installation you should see HYTEK 1USBDAQ under your device manager in the category HytekUSBDAQ The LED beside the USB connector head should be green by now e Now you have the choice to run the standalone ready to run i1DAQTest amp Log
20. 0 8V max Trigger mode High state will start data acquisition if used 5V Power Specification Output voltage Connected to self powered hub 4 5V min 5 25V max Connected to externally powered root hub Connected to bus powered hub 4 1V min 5 25Vmax Output current Connected to self powered hub 450mA max Connected to externally powered root hub Connected to bus powered hub EEPROM 240 bytes Address range 0 239 74
21. 2 0 528 0 528 0 032 0 528 0 528 0 032 0 528 0 544 0 032 0 544 0 528 0 032 0 528 0 528 0 032 0 528 0 528 0 032 0 528 0 528 0 032 0 544 0 528 0 032 0 528 0 544 0 032 0 528 24 0 528 0 032 0 528 0 544 0 032 0 528 0 528 0 032 0 528 0 544 0 032 0 528 0 528 0 032 0 528 0 528 0 032 0 528 Figure 12 Sample Data Log File If the Ext Trigger box is checked after user press the Start Stream button the device will wait for a high state on the trigger line to start data acquisition 5 21 Digital I O Tab In this tab user can set digital I O directions write output lines and read the DIO states And caution should be taken that no power source 1s connected to output DIO lines Ed A P P P P P P P P P P P P P d Figure 13 Digital I O Tab 5 22 Counter Tab In this counter tab user can read counter reset counter rising edge on the counter pin will increment counter Counter will roll over after 65536 16 bit 23 Reset General Functions Analog Inputs Digital 1 0 Counter PWM Output Read Write EEPROM Analysis Graph Reset Counter when read False BR Counter Yalue Read Counter 0 Figure 14 Counter Tab 5 23 PWM Output Tab Set the PWM output There are two 10 bit PWM channels chl and ch2 The PWM period is between 3 333micro second Duty cycle is between 0 100 Reset General Functions Analog Inputs Digital 1 0 Counter PWM Output Read Write EEPROM Analysis Graph Channel
22. BDAQ STD_APIiUSBDAQ AVI Close DevSession Session unsigned int FileSession 7 27 iUSBDAQ_ SetVWindow_AVI U1208LOG only IUSBDAQ_ API int IUUSBDAQ STD_APIi1USBDAQ SetVWindow_AVI DevSession Session unsigned int FileSession const char winname HWND owner int left int top int width int height int visibility 8 Error Code Description This is the mapping of error code and error descriptions The function YUSBDAQ_GetErrorDes in API also outputs error description when input an error code 0 No Error 1 Unknown Error 2 device index exceed the max device number of that type 3 No such USBDAQ module type or wrong device type 48 4 Open device session error 5 device maybe used by other application or session already been opened 6 Write error it could be the device disconnected 7 Read error it could be the device disconnected 8 NULL session 9 Partially failed incorrect receive length 10 the byte count number is invalid or exceed the eeprom size 11 channel number 1s incorrect 12 number of channels invalid 13 Wrong input voltage range 14 Duty cycle value should be between 0 1023 15 The IO channel is not an output channel 16 wrong PWM period 17 Too many data sets requested max allowed number of samples is 3200 18 Timeout when waiting for required number of samples 19 At least 128 samples required 20 Exceed maximum data throughput 21 Try to w
23. ENAMFEL Front Panel 9 1 8 USBDAQ_Counter_Example vi This example shows how to read counter Connector Pane CGOUHT EF Front Panel 9 1 9 USBDAQ_ReadWriteEEPROM_Example vi This example shows how to write to eeprom at specified address and read back eeprom 53 Connector Pane READ WRITE EEF ROM EXRMEL Front Panel DewiceType 7 U120p16 ML Devicelndex SJ Initialize First Time COND 9 1 10 Connector Pane TREAM COHTIH EXAMFL Front Panel DeviceType Start Channel l u120816 Varo Devicelndex NofChs SP SP Scan Rate 3 So A Initialize First Time O InputRange Jo 4 096 Y ExtTrigger Read String i ites ie cee This is an example to read and write from to A Y i 100 eeprom Start Address 3 f A Write String Read This is an example to read and write from to Pe e eeprom Ve ActualNofScans Ven Waveform Graph SES 4 3 97 3 Amplitude PA in l i i i 400 600 800 IUSBDAQ StreamingAls Cont_Example vi This example shows how to stream analog data continuously Actual Scan Rate 0 i i i i i i 1000 1200 1400 1600 1800 2000 Time 54 9 1 11 USBDAQ StreamingAls Cam_Example vi U1208LOG only This example shows how to stream analog data continuously while video is streaming at the same time getting 8 analog input s data 16 digital line status and counter value Connector Pane TREAM CAM EXAMFL F
24. IUSBDAQ U120816 IUSBDAQ U1208LOG USB 2 0 Full Speed Multi Functions DAQ User s Guide Revision 2 2 Aug 3 2007 d HYTEK Automation Inc www hytekautomation com Picture of 1USBDAQ U120816 16 D10 2 17 DIO 3 18 DIO 4 1 Trigger Picture of USBDAO U1208LOG Important Information Disclaimer The USBDAQ and associated products are not designed to be a critical component in life support or systems where malfunction can reasonably be expected to result in personal injury Customers using these products in such applications do so at their own risk and agree to fully indemnify HYTEK Automation for any damages resulting from such applications All HYTEK Automation Inc s hardware and software are provided as is and any express or implied warranties including but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed In no event shall HY TEK Automation Inc be liable for any direct indirect incidental special exemplary or consequential damages including but not limited to procurement of substitute goods or services loss of use data or profits or business interruption however caused and on any theory of liability whether in contract strict liability or tort including negligence or otherwise arising in any way out of the use of HY TEK Automation s software and hardware even if advised of the possibility of such damage Guara
25. O device and log analog input s data and read back logged data for basic analysis With this software user can browser through all the features in USBDAQ such as read single analog channel multiple analog channels streaming analog input data continuously for display and log into file with or without external trigger set DIO directions and read write DIO states set PWM output read counter etc Version 2 0 also adds the video functions for U1208LOG module Figure 8 shows an overall view of the iDAQTest amp Log screenshot Details of how each buttons controls work will also be explained graphically 20 S222 iDAQTest amp Log 2 0 June 2007 J Connected ware Version User Index AR d Copyright c 2005 2007 HYTEK Automation Inc 00000200 EE EE AN rights reserved y info hytekautomation com info hytekautomation com cn Re Enumerate EEN DLL Version 2 0 utility General Functions Analog Inputs Digital 1 0 Counter PWM Output l Read Write EEPROM Analysis Graph Logger Configuration Video amp Data Data and realtime life video synchronized display Voltage V 0 7 1209 1220 12301240 12501260 12701280129 DIOs a 8 s DIOS 9 16 Counter Value 990999900 9090909009 Playback Info Camera Selection Frameloss Missync a naaa cb Logitech ickC d wt tinh en No of Frames Up to 3 cameras will be listed EE o While video is running you can measure the terminal 39 de y Recon RC Ene No of Data
26. See Dieta VO POCOS os 64 9 4 1 US BDA DION NEE 64 9 5 EELER 65 9 5 1 IUSBDAOQO PWM OUL Vis coa 65 9 5 2 IUSBDAOQO WM caia 65 9 5 3 WUSBDAO StoOpeW WE Vb aa 65 9 6 Counter Ener EN 65 9 6 1 IUSBDAO Read COmMent is 66 9 7 Read Write EEPROM Functions uri as 66 10 11 12 9 7 1 ITSBDAO Redd EEPROM ista ie 66 9 7 2 USBDAO Writer EPR OM adas dadas 66 9 8 Video Functions U1 US OG ONLY heraren 66 9 8 1 USBDAO Enumerate Cas Vins a 66 9 8 2 IUSBDAQ Open am Preview vi 66 9 8 3 HERE e EE EE 67 9 8 4 IUSBDAO VideO RON Vinnie 67 9 8 5 USBODAO Vidco OP DEE 67 9 8 6 USBDACO Get En en EE 67 9 8 7 IUSBDAO Set Y WindoW Cad Uli 67 9 8 8 1USBDAO Camera Property Vii diia 68 9 8 9 IUSBDAO Video tee E E E a 68 9 8 10 1USBDAQ Video tartRecord Vi siria iii 68 9 8 11 IUSBDAO Video tOPRECOLO VE 69 9 9 ANT Eunctions U1208 LOG ON o as 69 9 9 1 LR TR ENT E E 69 9 9 2 IUSBDAO AVE RUN Varas 69 9 9 3 IUSBDAO AVI SOD E 69 9 9 4 IWSBDAQ AVI PSE Vi EE 69 9 9 5 IUSBDAO AVI RESUME Viana ais 70 9 9 6 IUSBDA O A VIE Sed Vesna E 70 9 9 7 IUSBDAQ_AVI GetPosition Vi Re 70 9 9 8 IUSBDAO AVI CIE Virada 70 9 9 9 IUSBDAQ_SetVWindow_AVLI Vi eseeseeeeseseesesesssessssesereesererseeerseserseee 70 99 10 JUSBDAC ENEE EIERE dE 71 Runtime Distribution of 1LUSBDAQ Driver ocoonccnnnccnnnccnnnoccnnnocnnnccnonacnonacnnnnccnnoss 71 Ree tee A TEE 71 Pecados 72 1 Overview of iUSBDAQ U120816 The credit card is only used for compare with iUSBDAQ
27. USBDAQ_AVI_Open vi This vi will open an AVI file session lt returns the file session back This file session is needed to call other AVI related functions Connector Pane IUSBDAQ Session In Path error in no error IUSBDAQ Session Out File Session error out 9 9 2 USBDAQ_AVI_Run vi This vi will run the avi file to playback The file session should be preopened by AVI open function and pass into this function Connector Pane SPGL Session In File Session error in no error IUSBDAO Session Out error out 9 9 3 USBDAQ_AVI_Stop vi This vi will stop the avi file to playback The file session should be preopened by AVI open function and pass into this function Connector Pane SPGL Session In File Session error in no error IUSBDAQ Session Out error out 9 9 4 iVUSBDAQ AVI Pause vi This vi will pause the avi file to playback The file session should be preopened by AVI open function and pass into this function Connector Pane 69 SPGL Session In see e ee USBDAO Session Out File Session error in no error AAA error out 9 9 5 USBDAQ_ AVI _Resume vi This vi will resume the avi file to playback if it was paused previously The file session should be preopened by AVI open function and pass into this function Connector Pane SPGL Session In seco en USBDAO Session Out File Session error in no error AAA error out 9 9 6 IUSBDAQ_ AVL Seek vi This vi will set the A
28. VI to a specified position It can also set the stop position of avi file Connector Pane IUSBDAQ Session In USB GC Session Out File Session Position error out stopPosition 0 no change error in no error 9 9 7 USBDAQ AVI GetPosition vi This vi will get the AVI current frame position Connector Pane USBDAG Session In File Session error in no error IUSBDAQ Session Cut Position error out 9 9 8 USBDAQ_AVI_Close vi This vi will close the opened AVI file session After closing the avi file session no other functions related to avi file are possible to be called for this avi file Connector Pane SPGL Session In File Session error in no error IUSBDAQ Session Out error out 9 9 9 USBDAQ_SetVWindow_AVI vi This vi sets the AVI file video window s name position parent window visibility etc Connector Pane 70 Top Left USBDAG Session In AVI File Session Win Mame Parent Win Ret error in no error Width Height visibility a E EEE E lUSBDAO Session Out error out 9 9 10 USBDAQ AVI GetDuration vi This vi will get the AVI total frame numbers Connector Pane USBDAG Session In File Session error in no error 10 Runtime Distribution of iUSBDAQ Driver When you want to distribute the system or software that integrates USBDAQ there is only one file that you need to distribute for USBDAQ to work the USBDAQ device driver It s the low level driver used for co
29. _ReadMultiAnalogin This function reads voltage from multiple analog channels at once 34 Syntax int USBDAQ_ReadMultiAnalogln DevSession Session int StartCh int NofChs int InputRange float Voltages int Reserved Parameters Session input device session that being opened StartCh input the starting channel range O 7 0 is AI 0 and so on NofChs input number of channels to read data from starting from the channel StartCh The maximum number of channels is 8 and it depends on which channel is the starting channel The StartCh NofChs should not exceed 8 InputRange input since currently USBDAQ has only one voltage range so this parameter should be O for now Voltages output the read data from the analog channels User should allocate this array it should has a size of NofChs with floating data type Reserved output reserved parameter it always returns O for now Return 1USBDAQ error code or O for no error 6 14 iUSBDAQ AlStartStream This function starts the streaming mode analog inputs acquisition This function returns right the way after the call and the streaming is in background with an internal pc side data buffer Please read more about this data buffer in 1USBDAQ_ AIGetScans description The maximum number of channels is 8 and it depends on which channel is the starting channel The StartChannel NumberOfChs should not exceed 8 The maximum sampling throughput varies with number
30. ae 20 ILF OVNI dio iii bd 20 DS MOP Bd AA ias 21 349 General Funcions Tabu is 22 FA Amalos npu EE 22 SG NERT RL E EE 25 322 COM daa 25 25 PWM OUMU abans 26 5 24 Read Write EEPROM EN E E 26 5329 Anass Gpr Lada nido 2 320 Utlty Tab DILOSLOG O Yaris 28 5 27 Logger Configuration Tab Ul208LOG Only oooooooocccnnnncncnnnnnncnncnnnnnnnnnnanos 28 3209 Video amp Data Tab UIZ0S LOG Only sis 29 6 Programming Reference GUSBDA Kees treater weindesuensitiweseadantiomwaweleees 30 6 1 Devsessi on Py Peer SUCUL unida 30 6 2 Devinto Ty peder Site ire EE 30 6 3 LES BDA Enumerte DE ee 31 6 4 TA Si RR EE 31 6 5 TU SB DAO Resta iii 32 6 6 DIS DAO Release EE 32 6 7 IUSBDAQ Eed dee 32 6 8 IUSBDAO Ge redada 33 6 9 IUSBDAO GA EI EI VE e EE 33 610 USBDAO GetElrmware Ver OM EE 33 GLF AUSBDAO Eeer ts 34 6 12 iUSBDAQ ReadSingleAnaloglh EEN 34 613 TUSBDAQO ReadMultandlos Aces 34 614 AUSBDAG 2A Starts teta 35 lo AWSBDA OA Gets Cams is ii 36 0 16 2 EE ee isis 38 OF JUSBDAO el E E 38 61S AWSBDAO DIOSA ia 38 619 AUSBDAO PW MOU aaa a 39 620 AUSBDAO STOPPW Mitos 40 O21 AUSBDAO Read MEMO ee col 40 6022 IUSBDAO Enter 41 IUSBDAQ DLL v2 0 New added Functions oocccncccnnnccnnnccnnnocnnnacnnnoccnnnccnonacnnnicnnns 41 7 1 IUS B DAO TOD WM Er O 41 72 AAPMUSBDAO OpenDeviceByY N narcisista 42 7 3 IU SBDAO OpenDeviceb BET ale ansiada 42 7 4 IUSBDAO Gel Device e Orun 42 7 5 IUSBDAQ_AIStartStream_HS U1208LOG only 43 7
31. al descriptions DIO 8 Digital UO 8 DIO 9 Digital I O 9 o gt UI UY Go Go Go Go Go 5 3 5V This is a nominal 5 volt internal power supply output Power can be drawn from this power supply by connecting to the 5V terminal The total output current drawn by the whole device connections including this 5V power supply the digital outputs PWM outputs should not exceed 450 mA for most desktop computers and self powered USB hubs We would recommend only draw around 250mA from this power terminal Some notebook computers and bus powered hubs will limit total USB current for a device to about 100 mA So the maximum current can be drawn from this power terminal 15 and all digital outputs PWM outputs should not exceed 50mA because at power up the device itself consumes 50mA 5 4 AGND This is the analog ground for analog input channels In order to reduce noise please use these ground only for analog inputs 9 5 AlLO Al 7 These are 8 single ended analog input channels It has a range of 0 4 096V 12 bit so the resolution would be Imv 1USBDAQ supports scan and streaming mode for data acquisition User can scan single channel or scan multi channels at once In scan mode the execution time is 8ms for U120816 4ms for U1208LOG So this will make up125HZ per channel in scan mode software timed data acquisition for U120816 and 250HZ for U1208LOG In streaming mode the device can start streaming the data to PC right
32. alling edge followed by a rising edge If you reset the counter while your signal is low you will not get the first count until it goes high low high again 5 10 GND This is the common ground All GNDs are the same The grounds can be used for all terminals except analog input channels which should use AGND 5 11 EEPROM 1USBDAQ has 240 bytes memory space reserved for user data Read write EEPROM execution time is Sms for Ul20816 model and 4ms for U1208LOG model 5 12 Video Log TriggerO line U1208LOG only IUSBDAQ U1208LOG has a dedicated trigger out line at screw terminal pin39 It sends out pulses whenever there is video frame coming by in iDAQTest amp Log software Or when in standalone logger mode it will also send out pulses whenever the data logging happens 5 13 USB Flash Drive Logger U1208LOG only IUSBDAQ U1208LOG model can also be used as stand alone data logger The connector USB2 is used for connecting USB flash disk while USB1 connector is used for PC control or for USB power adaptor The logging interval by default is 1 second user can change this value in iDAQTest amp Log software It s between 1 second to 12 hours 19 5 14 Switch U1208LOG only IUSBDAQ U1208LOG has a switch located beside the USB2 connector On switching to PC Stop side this will allow the module to be controlled by PC By switching to LOG Start side it will work as a standalone data logger and PC will not recognize this d
33. at forum hytekautomation com 1f you can not solve the problem yourself 12 Specifications The spec is for 25 C typically General Device compatibility 40 to 85 C for U120816 O to 70 C for U1208LOG 3 5 x 3 375 x 1 125 9cm x 8 5cm x 3cm Connector Type Power Supply USB bus powered min 4 5V max 5 5V Analog Input Typical A LL is approximation type Input voltage range Vref V fotos JI Mode LL LL Single ended Number of channels Resolution o 2 V of Vref 1 Throughput 32k Samples Number of channels 8 30 1k Je Numberof channels 7 27k Numberof channels 6 25k Numberof channels 5 22k Numberof channels 4 19 5k Numberof channels 3 18 4k Numberof channels 2 13k Numberof channels 1 125 Software timed scan Maximum input 7 6 V voltage range 72 Integral Nonlinearity Lin 20 LSB Differential 0 5 1 0 LSB No missing codes Nonlinearity over temperature Offset Error 125 3 LSB S Leakage Current 0001 ol ul Trigger source ll Software or Trigger line Gain Error 125 ap Digital input output Number of IOs 16 bi directional input ground Counter PWM Number of channels Pull up 470ohm pull up to Vs 1M ohm to ground 3us 333us 333kHz 3kHz 73 Trigger Line Pull up pull down 470ohm in series IM ohm to ground Input leakage current Input high voltage 2 0V min 5 5V absolute max Input low voltage 0 3V absolute min
34. com info hytekautomation com cn Data and realtime life video synchronized display Logitech QuickCam video is running you can measure the terminal 39 he video trigger out line you will notice the pulses Whenever there is a video frame passing by Figure 21 Video and Data Display tab 6 Programming Reference USBDAQ dIl The USBDAO device driver installs the programming API 1 USBDAQ dII into the computer system s directory This DLL is called by user application 6 1 DevSession Typedef Structure This is the device session typedef structure definition typedef struct int DevIndex int DevlInstance unsigned long DevType HANDLE iSession 1 HANDLE iSession 2 DevSession 6 2 Devinfo Typedef Structure typedef struct d 30 unsigned long serialNumber BYTE DevID BYTE UserIndex DWORD Version DevInfo 6 3 USBDAQ EnumerateDev This is the first function that need to be called for a selected device type before using any USBDAQ functions It enumerates the computer to create a mapping of the USBDAOs allocates some internal memory If any device s sessions were opened before they will be closed by this function in order to create the internal map It also returns the total number of iUSBDAQs of the selected type Normally this function only need to be called once at very beginning of application but user may want to re enumerate if some devices are disconnected while in use to make sure
35. d 8 InputRange input since currently 1 USBDAQ has only one voltage range so this parameter should be O for now ScanRate input the number of scans per second A scan is the reading from every selected channels ActualRate output the returned actual scan rate It may not always be the same as specified ScanRate because of the device internal timer withExternal Trigger input if 1 will wait for trigger line to go high if O will start background streaming right after this call Return 1USBDAQ error code or O for no error 6 15 USBDAQ AlGetScans This function gets the data back from the internal PC side data buffer The number of channels has to be the same as the number of channels in 1USBDAQ_AJIStartStream User can specify how many scans need to be read back This function only returns when all the asked scans are read To stop in between user needs to call the JUSBDAQ_AIStopStream and this function will error out and return The timeout is for read of 128 samples not for the total number of scans asked 1000ms usually is a good number for a timeout The returned data is interleaved for example if you start streaming 36 with starting channel of AI 0 number of channels is 2 then the output data is in the order of AI O AI 1 AJO AI 1 This function also returns the actual number of scans it may not always be the same as input number of scans The relation between data array size and actual number of scans 1s
36. data to HY TEK data format so that user can use the analysis screen in DAQTest Log software to do some analysis Device Manager JE Fie Action View Help al Batteries L Bluetooth Devices e Computer Disk drives A Display adapters Le DVD CD ROM drives ee HytekUSBDAO HYTEK USBDAQ ATASATAP controllers IEEE 1394 Bus host controllers E Keyboards 12 Mice and other pointing devices i Modems E Monitors Network adapters PCMCIA adapters a PCMCIA and Flash memory devices b Processors SCSI and RAID controllers L Secure Digital host controllers Ww gen Dm aa a Figure 1 USBDAO registered under device manager 12 9 Hardware Description 5 1 USBDAQ Block Diagram JSB Full speed USB2 0 Compliance interface A2 Digital 1 O lines USB one 16 bit counter two 10 bit pwm output A Digital LO lines Trigger line 3 Ch o cb t D o ke i 2 z e O o K S gt CO 3 Da a Figure 2 USBDAO Block Diagram 5 2 Terminal Layout and Description Figure 3 is the terminal layout of 1 USBDAQ U120816 and iUSBDAQ U1208LOG 13 1 5V 2 AGHD 3 Ald A Alt 5 AGHD 6 Al T Al 3 2 AGHD 9 Al 4 10 AI 5 11 AGHD 12 Al 13 Al T 1 GHD 15 DIO 4 16 DIO 2 17 DIO 3 18 DIO A iUSBDAQ 0120816 21 GHD 22 DIO 5 23 DIO 6 24 DIO 7 25 26 oT 28 C 29 30 31 32 33 34 DIO
37. e with DAQTest Log software Dedicated log trigger out line for synchronization of external devices Video Functions Real time video display along with the data readings 8 ch analog inputs 16 ch digital IOs and one counter AVI recording along with data recording 8 ch analog inputs 16 ch digital IOs and one counter Playback AVI file along with data 8 ch analog inputs 16 ch digital IOs and one counter Dedicated video trigger out line Work with USB webcam or firewire camera that support WDM driver or are directshow compliant 10 General Information e 30 Days Money Back Guarantee 6 Month Warranty and Trade In Policy e Approximately 3 5 x 3 375 x 1 125 9cm x 8 5cm x 3cm e 0 C to 70 C operating temperature range 3 Software Download and Upgrade The 1USBDAQ device driver LabVIEW interface LabVIEW examples C C examples dot net examples iDAQTest amp Log software and this document can be found and downloaded from http www hytekautomation com iDAQDownload html 4 Software and Hardware Installation For USBDAQ to work windows 2000 or higher OS is required and computer should have usb 1 1 or usb 2 0 ports Recommendation WinXP or higher OS 2 4GHZ with 512M RAM computer If you are using an usb hub please make sure the hub is self powered not bus powered because bus powered hub will limit power to max 100mA Following are the steps to install USBDAO e Do not connect the USBDAQ to PC
38. ect to the selected device in field 7 If successful the LED indicator in field 5 will turn to light green and the tabs will be enabled 9 Press this button will disconnect the device and the tabs will disabled user will see all the tabs are grey out 5 19 General Functions Tab In the general functions tab the information such as firmware version serial number and designer will be displayed Figure 9 General Functions Tab 5 20 Analog Inputs Tab In this tab user can scan one single analog channel or scan multiple channels or start streaming mode continuous data acquisition The max number of channels is 8 and it depends on which channel is starting channel The following condition has to meet StartingChannel Number of Channels lt 8 2 The max scan rate that can be set varies with the number of channels Here is the max throughput table again Number Of Channels Max Throughput samples s High speed streaming mode is for U1208LOG model only Below is the throughput rate Figure 10 Max throughput table The relationship between sample rate scan rate and number of channels is as below SampleRate ScanRate NumberOfChannels For example if you have 8 input channels with a scan rate of 4000 then the total sample rate would be 32ksamples s The minimum sample rate128 is required in normal streaming mode If lower than this required user can use scan mode For example if you have two channels the minimum scan
39. ed these functions will apply to both U120816 and U1208LOG models 7 1 USBDAQ 10bitPWMOut This function sets duty cycle of 10bit PWM output in integer value from 0 1023 Syntax int USBDAQ_10btPWMOut DevSession Session BYTE Channel int DutyCycle int period Parameters Session input device session that being opened DutyCycle input value from 0 1023 Period input PWM period value between 3us to 333 us which results a frequency of 333kHz to 3kHz pulse Both channels should have the same frequency or period the last set frequency will be used for both channels Return 1USBDAQ error code or O for no error 41 7 2 APII USBDAQ OpenDeviceBySN This function opens device session by unique serial number This is very useful when there are multiple USBDAQs in the computer this prevents the miss ordering of USB DAQs because Window OS will not remember the order of USB DAQs if they are plugged into the different USB ports Syntax 1USBDAQ_OpenDeviceBySN unsigned long SerialNumber DevSession Session Parameters Session output device session that being opened SerialNumber input the unique device serial number Return 1USBDAQ error code or O for no error 7 3 iUSBDAQ OpenDeviceByUserindex This function opens device session by user defined device index The user device index can be set in iDAQTest amp Log software s general Tab They should be set to an unique value to avoid mixing up This helps
40. eturns the USBDAQ designer s info And it s HYTEK Automation Inc Connector Pane LISBOA Session In SP AG Session Que Designer Info error in no error error aut 9 2 6 USBDAQ GetFWVersion vi This vi gets the firmware version inside the hardware Connector Pane LISBOA Session In IUISBDAG Session Que version error aut error in no error 9 2 7 USBDAQ_Reset vi This vi resets the USBDAO Connector Pane LISBOA Session In MULL Session Que error in no error error out 9 2 8 USBDAQ EnumerateDevices vi This is the first vi that need to be called for a selected device type before using any USBDAQ functions It enumerates the computer to create a mapping of the iUSBDAQ allocates some internal memory If any device s sessions were opened before they will be closed by this vi in order to creat the internal map It also returns the total number of IUSBDAQs of the selected type Normally this vi only need to be called once at very beginning of application but user may want to re enumerate if some devices are disconnected while in use to make sure the mapping is updated Connector Pane DevicelType Coumt error in no error error out 9 2 9 USBDAGQ_OpenDevicesSession vi This vi opens an USBDAO session This session will be used to call other device related 60 functions The order of using a device function is enumerate open session calling device related functions at very end close de
41. evice when in LOG mode It is strongly recommended that user should always switch to PC Stop mode before unplug the USB flash disk from USB2 connector to avoid data lose 5 15 On Board Real Time Clock U1208LOG only IUSBDAQ U1208LOG has a real time clock on PCB board that is powered by a 3V lithium battery This battery is exchangeable The time of the clock can be set at IDAQTest Log software This clock is used to time stamp the log file and logging data in stand alone logger mode 5 16 Automatic File Name Generation U1208LOG only When in logger mode 1 USBDAQ U1208LOG will automatically generate a new log file name whenever the USB flash disk is inserted into USB2 connector or when the log file has logged over 30 000 scans of data each scan includes 8 analog inputs data 16 digital lines data and one counter data it will also create a new file name The file name is starting with DL following by the time stamp DL Month Day Hour Minutes For example this is a file name DL060413 45 This will prevent data lose in big files and make easy for raw data file conversion The logged raw data files can be converted to HYTEK format data files with iDAQTest amp Log software Always use the switch to stop data logging before unplug the USB disk from USB2 connector to prevent data lose 4 iDAQTest amp Log Software 5 17 Overview IDAQTest Log is a standalone ready to run software that can be used to test the 1USBDA
42. h an interval less than the camera frame rate Say if your camera has 30 frames s ideally this function should be called at interval less than 33ms this way it will make sure it will not miss any video frames passing by The synchronization accuracy of data and video will be within one video frame time Note while putting this function in a loop for pulling you can still call 45 other functions that will communicate with the hardware such as start streaming in normal mode not high speed streaming mode for U1208LOG that is the only exception read analog data or digital lines etc but you need to make sure they happen in a sequence not parallel maybe by using a semaphore otherwise error may occur due to both functions trying to communicate with hardware at the same time Syntax int USBDAOQ VideoGetDatal DevSession Session int CamIndex float Voltages BYTE Portltosstate BYTE Port9to 1 6state unsigned int Counter not finished yet Parameters Session input USBDAQ device session that being opened CamIndex input selected camera index Starting from 0 should not exceed the number of cameras in system 1 The maximum number of cameras allowed with 1USBDAQ dIl is limited to 3 Voltages output either O or 1 If 1 the software will popup a video property window where user can set frame rate resolution and color space for the camera Owner input the parent window s handle If VideoPro
43. hannel Either 1 or 2 Return 1USBDAQ error code or 0 for no error 6 21 USBDAQ ReadMemory This function reads data from EEPROM Syntax int USBDAQ_ReadMemory DevSession Session BYTE ByteCount BYTE Address BYTE Data Parameters Session input device session that being opened ByteCount input number of bytes to read The following condition must meet Address B yteCount lt 240 because there are only 240 bytes space in EEPROM reserved for user data Address input the starting address to read data from Data output an array that holds the data read back from EEPROM An array of type BYTE the size of the array should not be smaller than the ByteCount Return 1USBDAQ error code or 0 for no error 40 6 22 USBDAQ WriteMemory This function writes data to EEPROM Syntax int USBDAQ_WriteMemory DevSession Session BYTE ByteCount BYTE Address BYTE Data E Parameters Session input device session that being opened ByteCount input number of bytes to write The following condition must meet Address B yteCount lt 240 because there are only 240 bytes space in EEPROM reserved for user data Address input the starting address to write data to Data input an array that holds the data to write to the EEPROM Return 1USBDAQ error code or 0 for no error 7 iVSBDAQ DLL v2 0 New added Functions Below are the new added functions in USBDAO dll version2 0 Unless otherwise specifi
44. her functions can still be executed such as read write digital lines etc but in high scan rate the performance may be affected since the hardware CPU is shared doing other things besides hardware timed data acquisition And overall performance is also system dependant In high speed streaming mode no other functions should be executed in iUSBDAQ UI208LOG except the stop streaming command Figure 6 shows a typical connection to the single ended analog input e AJO a Cu T o Ka CO E _ gt mi T I gt AGMO Figure 5 Typical connection to an analog input channel 17 5 6 Digital UO There are 16 bi directional digital I O lines in 1USBDAQ module Each line is software configurable to be either input or output high or output low At power up or reset all lines are set to be input by default All digital lines are CMOS output and TTL level or Smith trigger input All channels include a 470 Q series resistor that provides overvoltage short circuit protection Each channel also has a 1 MQ resistor connected to ground Figure 7 shows a typical usage of a digital input for measuring the state of a switch If switch is on 5V the DIO 1 will read state TRUE else if the switch is on GND the DIO 1 will read the state of FALSE Go 5 Figure 6 Typical usage of digital input for measuring the state There is one DIO function used for read write states and set pin directions for all DIO lines It
45. ions if any Syntax int 1USBDAQ_ AIGetScans DevSession StreamSession int NumbofScans int Timeout float buffer int actualScans Parameters Session input device session that being opened NumbotScans input number of scans requested Timeout timeout for reading 128 samples in unit of ms Usually pass in 1000ms would work for most cases Buffer output an array allocated by the user to hold the returned data It must has a size of Number of Scans requested x Number of channels The actual returned data size maybe equal or smaller than that because the actual number of scans maybe smaller than the requested number of scans And the data is interleaved in the order of channels for example AIO AI1 AIO AI1 1f you have two channels starting from channel AIO 37 actualScans output returns the actual number of scans read it s equal or smaller than the number of scans requested Return 1USBDAQ error code or O for no error 6 16 USBDAGQ AlStopStream This function stops the data streaming Syntax int USBDAQ_AlIStopStream DevSession Session Parameters Session input device session that being opened Return 1USBDAQ error code or 0 for no error 6 17 USBDAQ_ ReadCounter This function reads the counter Syntax int 1USBDAQ_ ReadCounter DevSession Session int Reset unsigned int Count J Parameters Session input device session that being opened Reset input 1
46. l start the data acquisition right after this call into pc side background data buffer This vi will return actual scan rate it may not always the same as the specified input scan rate This vi will return an error if the channel s settings are not correct Connector Pane 62 ExtTrigger is IUSEDAQ Session In o ISBOAC Session uk Stark Channel Nofths A meme 7 Actual Sc Date InputRange error ou Scan Rate error in no error 9 3 3 iIUSBDAQ StopStream vi This vi stops the streaming Connector Pane LISBOA Session In SP AG Session Que error in no error error aut 9 3 4 JUSBDAQ StartStream_HS vi U1208LOG only This vi starts the streaming mode analog inputs acquisition in high speed mode this function is only available for U1208LOG model This vi returns right the way after the call and the streaming is in background with an internal pc side data buffer Please read more about this data buffer in USBDAQ_GetStreamSamples vi description The maximum Number of Chs is 8 and it depends on which channel is the starting channel The StartChannel NumberOfChs should not exceed 8 The maximum throughput varies with number of Channels Please refer to USBDAQ User s Guide for details The relationship between sampling rate and scan rate is Sample Throughput Rate ScanRate NumberOfChannels For example if scan rate is 3000 number of channels is 8 the total sample throughput rate will be 24 000samples s
47. le Min 53 9 1 9 1USBDAQ_ReadWriteEEPROM_Example Vl cccccccccnnnnnnnnnnononnnnncnnnnnnnnos 53 9 1 10 iUSBDAQ Streammnghle Cont bxvample vu 54 9 1 11 iUSBDAQ StreamingAls_Cam_Example vi U1208LOG only 55 9 1 12 USBDAQ GetDAQCAM_Info_Example vi Ul208LOG only 55 9 1 13 iIUSBDAQ_DAQCAM_Example1 vi Ul208LOG only 56 9 1 14 iUSBDAQ StreamingAls_Cam_Example vi U1208LOG only 57 9 1 15 iUSBDAQ AVI_Examplel vi Ul208LOG online 58 9 2 General Device Keele EE 59 9 2 1 1 SBD AO AU VAS Vieira aos 59 9 2 2 USBDAO Gelb mons Une Visit cai 59 9 2 3 IOUSBDAO RETOQUE ui AAA E 59 9 2 4 USBDAO GetD LE Version Marni 60 9 2 5 USBDAO Get RENE Nr Yessica 60 9 2 6 IUSBDAQ_GetFWVersion Vi e 60 9 2 7 TO SI ese lnea aida 60 9 2 8 USBDAO Enumerate Devices Vie A A A iii 60 9 2 9 USBDAO OpenDeviceSession VE ii to 60 9210 IUSBDAQG ReleaseDeyice Vina ii iia 61 9 2 11 USBDAC Get Se al Number Visa 61 92 12 AUSBDAQ Bits To Voltage Viesis 61 9 2 13 1USBDAQ Voltage To Bits Vicar is 61 9 3 PAM AOS Input Ponce 61 9 3 1 IUSBDAO Read Smok AL Vira aa 62 9 3 1 IVSBDAQ Read_Multi E is 62 9 3 2 MIS BOAO Stats Cane Visca lisa a 62 9 3 3 IUSBDAO Ee dis ls 63 9 3 4 1USBDAQ_StartStream_HS vi U1208LOG only 63 9 3 5 1USBDAQ_StopStream_HS vi Ul208LOG only oooooccccnnnccnnnnnno 63 9 3 6 IUSBDAQ GetStreamSamples Vl ooooocccnnnccnnncconocnnnnnccnnnononanccnnncnnnnnnnnnos 64
48. mputer to recognize and enumerate the 1USBDAO devices This installation will also copy the USBDAQ dll the programming APIs that your software calls into computer system s directory IUSBDAQ Session Out Duration error out The method how you distribute either includes USBDAQ device driver in your full installation program with your own software or distribute it separately is up to the customers 11 Troubleshooting All 1USBDAQs are tested on good working condition prior shipping but in case the device still does not work after proper installation and the green light is not lit there are few things to check e If the device was installed properly check the device manager see if you see HYTEK USBDAO listed under HytekKUSBDAQ category e Change another USB cable prefer using a cable that has noise protection filter built in e Change to another USB port on the same computer e Make sure if it s laptop it s not on battery because the USB port power supply maybe low e Change to another computer so that you know if device or computer is the problem e For Ul208LOG must use a USB cable that has noise protection filter built in when connecting to the USB power adaptor e For U1208LOG if LED2 does not flash in the preset logging interval unplug USB flash disk and plug in again or re power up the device Also make sure the switch is on the LOG Start side 71 e Please check out the USBDAQ FAQ or post questions
49. nel StartCh The maximum number of channels is 8 and it depends on which channel is the starting channel The StartCh NofChs should not exceed 8 InputRange input since currently USBDAQ has only one voltage range so this parameter should be O for now ScanRate input the number of scans per second A scan is the reading from every selected channels ActualRate output the returned actual scan rate It may not always be the same as specified ScanRate because of the device internal timer withExternalTrigger input if 1 will wait for trigger line to go high if O will start background streaming right after this call Return 1USBDAQ error code or O for no error 7 6 USBDAQ AlStopStream_HS U1208LOG only This function stops the data streaming in high speed mode Syntax int 1USBDAQ_AIStopStream_HS DevSession Session Parameters Session input device session that being opened Return 1USBDAQ error code or 0 for no error 7 7 EnumerateCameras U1208LOG only This function will enumerate cameras in the system and return the total number of cameras found IUSBDAOQ dll limits number of cameras to 3 This function should be called once and at first before using any camera video related functions Syntax 44 int EnumerateCameras DevSession Session Parameters Session input device session that being opened Return Number of cameras in system 7 8 iUSBDAQ OpenCam U1208LOG only This function o
50. nge Future version will provide more analysis functions in this tab Reset General Functions Analog Inputs Digital 1 0 Counter PWM Output Read Write EEPROM Analysis Graph Start Channel Sumber of Channels Scan Rate HZ Date Time SED a 2000 12 33 02 30 07 2005 Load Data File d Cursori 23212 IESEL Cu abcl csw Cursor 160 0 720 PEO Data Graph 4 5 Ploto e St e Plot 1 3 5 r f Plot 2 3 l Plot 3 ag f Plot 4 E S d i Plot 5 E S y j Plote ef 7 BS Plot 7 E d d S f 0 5 A Au o g 7999 Figure 17 Analysis Graph Tab 27 5 26 Utility Tab U1208LOG only In this tab user can convert the raw logging file from Ul208LOG to HYTEK formatted data file so that it can be viewed and analyzed i iDAQTest Log Software 2 0 Eo index f DeviceiD 4 Serial Number _j Firmware Version User Index Copyright c 2005 2007 HYTEK Automation Inc 0 U1208LOG 4294967279 00000200 255 All rights reserved info hytekautomation com f info hytekautomation com cn Figure 19 Utility Tab The converted data 1s in the order of AI0O AI AI2 AI3 AI4 AI5 AI6 AI7 DIO1 8 in Byte DIO9 16 in Byte Counter Year Month Day Hour Minute Second 5 27 Logger Configuration Tab U1208LOG only In this tab user can set the real time clock read the current date time from real time clock User can also set the logging interval between 1 second to 12 hours 28 a
51. ntee Warranty and Trade In Policy Please check with your vendor or distributor for warranty period and trade in policy if applicable Trademark and Copyright Information USBDAQ and iDAQTest amp Log are trademarks of HYTEK Automation Inc LabVIEW is a trademark of National Instruments All other trademarks are the property of their respective owners Reproduction of HYTEK Automation s hardware software and document is prohibited without permission from HYTEK Automation Inc Copyright O 2005 2007 HYTEK Automation Inc Revision History July 2 2007 refine the documentation for U1208LOG June 2007 Add information for model USBDAQ U1208LOG Index Mportaa or ote dto doll 3 REVISO FAIS EOL Ee 3 l Overview Or IUSBDAQ U1 OS suscitada oil 8 Z Overview Ori SBDAO UI OSLO G arial iii 9 Dy EE Download and Update 11 A SO ware and Hardware Installat Onassis 11 de Hardware Descrip EE 13 5 1 1USBDAO Block Dia Srani e r Rios 13 52 Temminal Layo tand Descrip iia 13 5 3 FON AA a 15 EE Eeer 16 5 5 HR MT E E O TR 16 o PET EE 18 5 7 LOs 18 5 8 PWM ss 18 5 9 COU ICT E 19 O AND a a E a E OS 19 S A E 19 5 12 Video Log TriggerO line Ul208LOG only occcccnncnoncncnnnnncnnnnnonccnnnnnnnnnnnnnnos 19 5 13 USB Flash Drive Logger U1208LOG 0d 19 S14 Switch OZ OS MOG Eeer 20 5 15 On Board Real Time Clock U1208LOG only 20 5 16 Automatic File Name Generation U1208LOG only 20 A IDAOTestiiLos S OL Ware ova Eege
52. ous graph User may also want to consider using a separate data engine vi to handle streaming getting data so that this action will not block other user interface actions if any Please check out the example vis related to this function IUSBDAQ_StreamingAls_Example vi and USBDAQ_StreamingAls _Cont_Example vi Connector Pane LISBOA Session In Morscans Time utims MoftChs error in no error IUISBDAG Session Que Data ActualMofScans error aut 9 4 Digital l O Functions 9 4 1 USBDAQ DIO vi This vi sets DIO directions read write DIO states If Update Outputs control is true the output DIO pins states will be written A read of all DIO states is always performed at the end no matter 64 what For DIO directions true is input false is output and for DIO states true is high state false is low state Connector Pane DIO State ch 9 16M True CIO State ch 1 8H True USDA Session In repas pomm IUSEDAG Session Cut DIO Directions ch 1 BT F E peee i Actual DIO State ch 1 DIO Directions ch 9 16 pmi ka LUpdetecutpnuftes Actual DIO State ch 9 16 error out error in no error l 9 5 PWM Functions 9 5 1 USBDAQ_ PWM_Out vi This vi sets PWM outputs Both channels should have the same frequency or period The last set period will be in effect Duty cycle is between 0 100 Connector Pane LISBOA Session In Channel 1 2 Cuy ycleg 4 001 Period 3 333micro
53. output data is in the order of Al 0 Al 1 Al 0 Al 1 This vi also returns the actual number of scans it may not always be the same as input number of scans The relation between data array size and actual number of scans is Data array size actual number of scans x number of channels The minimum samples requested must not be less than 128 for example if you have two channels then the minimum NofScans must not be less than 64 There is no limit for maximum NofScans requested The internal data buffer has a size of 12 8k samples if this buffer is full the later coming data will be ignored Usually user should start calling this vi right after start streaming There are two possible ways user can use this vi pass in a big total number of scans to read at once can be bigger than 12 8k because the iUSBDAQ dIl will take care of this this vi will wait until all asked scans returned The other way is asking for a small amount number of scans and repeat calling this vi again and again The only risk of second method is if there is too many delays between two consecutive calls of this vi the internal data buffer may be full some data will be ignored which will result none continuous data between two calls In iDAQTest amp Log software it uses the second method each time it asks for one second long data which means the asked number of scans equals to scan rate and repeat calling this vi again and again concatenate the data to get a continu
54. pens a camera session associated with the camera index Before using other camera video related functions for the selected camera index this function should be called first Syntax int USBDAQ_OpenCam DevSession Session int CamIndex int VideoProperty HWND owner Parameters Session input USBDAQ device session that being opened CamIndex input selected camera index Starting from 0 should not exceed the number of cameras in system 1 The maximum number of cameras allowed with 1USBDAQ dIl is limited to 3 VideoProperty input either 0 or 1 If 1 the software will popup a video property window where user can set frame rate resolution and color space for the camera Owner input the parent window s handle If VideoProperty parameter is O this parameter is ignored If VideoProperty parameter is 1 and this parameter is not NULL then the popup video property window will be the child window of this parent window Otherwise the video property window will be a floating window Return 1USBDAQ error code or 0 for no error 7 9 USBDAQ VideoGetData U1208LOG only If there is new video frame passing by this function will send out pulse at TriggerO line screw terminal pin 39 and get 8 analog channels data 16 digital channels status and the 16 bit counter s value If there is no new video frame passed then it will return right the way with error This function should be pulled frequently wit
55. perty parameter is O this parameter is ignored If VideoProperty parameter is 1 and this parameter is not NULL then the popup video property window will be the child window of this parent window Otherwise the video property window will be a floating window Return 1USBDAQ error code or O for no error 7 10 1USBDAQ_ CloseCam U1208LOG only IUSBDAQ_ API int IUSBDAO STD_APIiUSBDAQ CloseCam DevSession Session int CamIndex 7 11 USBDAQ Video Run U1208LOG only IUSBDAQ_API int IUSBDAQ STD_APIiUSBDAQ Video_Run DevSession Session int CamIndex 7 12 USBDAQ Video_Stop U1208LOG only IUSBDAQ_API int IUSBDAQ_ STD_APIiUSBDAQ_ Video _Stop DevSession Session int CamIndex 46 7 13 USBDAQ_Get_CamName U1208LOG only IUSBDAQ_ API int IUUSBDAQ STD_APTIUSBDAO Get_CamName DevSession Session int CamIndex char value value 100 byte 7 14 USBDAQ_SetVWindow_Cam U1208LOG only IUSBDAQ_ API int IUSBDAQ STD_APIiUSBDAQ SetVWindow_Cam DevSession Session int CamIndex const char winname HWND owner int left int top int width int height int visibility winname 100 byte 7 15 iUSBDAQ_Camera_Property U1208LOG only TUSBDAQ_APTI int IUSBDAQ_STD_APIiUSBDAQ_ Camera_Property DevSession Session int CamIndex HWND owner 7 16 iUSBDAQ Start_Vrecord U1208LOG only IUSBDAQ_API int IUSBDAQ STD_APIiUSBDAQ Start_VRecord DevSession Session int CamIndex char VFilePath 7 17 iUSBDAQ_ Stop Vrecord U1208LOG only
56. put DIO 9 DIO 16 states For pins that directions being set to output if updateDio is 1 which means write update output pins the states will be written and the actual states will be read back and returned to the same parameter Or if udateDio is 0 only read action is performed and returned back to this parameter updateDio if 1 a write update action will be performed for all pin directions and output pins states and read action will be performed for all DIO pin s states If O only read action will be performed for all DIO pin s states Return 1USBDAQ error code or 0 for no error 6 19 USBDAQ PWMOut This function sets the PWM output channels and parameters Syntax int 1USBDAQ _PWMOut DevSession Session BYTE Channel int DutyCycle int Period Parameters Session input device session that being opened Channel input PWM channel Either 1 or 2 DutyCycle input value between O 100 39 Period input PWM period value between 3us to 333 us which results a frequency of 333kHz to 3kHz pulse Both channels should have the same frequency or period the last set frequency will be used for both channels Return 1USBDAQ error code or O for no error 6 20 USBDAQ STOPPWM This function stops the PWM output of the selected channel Syntax int USBDAQ_STOPPWM DevSession Session int Channel Parameters Session input device session that being opened Channel input PWM c
57. r continuously streaming to PC One dedicated trigger in line for streaming mode data acquisition One dedicated video Log trigger out line that sends out pulses for video frames or when log data in standalone data logging mode Two programmable 10 bit PWM outputs 3kHz 333kHz 16 channels of Bi Directional Digital I O lines 250HZ update rate One 16 Bit counter 240 bytes EEPROM reserved for user data Multiple USBDAQs can be connected on same computer Simultaneous Streaming from Multiple i USBDAQs Possible streaming data and streaming video at the same time possible Works with Windows 2000 or WinXP Recommend 2 4GHZ or up CPU at least 512M RAM USB flash drive standalone data logger mode Virtually unlimited storage size for data logging it s up to your USB flash disk s storage size Can be powered by USB bus from computer or use included USB power adaptor without computer Logging 8 channels of analog inputs 16 channels of digital inputs and one 16 bit counter All data are time stamped Logging interval frequency from 1 second to 12 hours unlimited log period as long as USB disk has enough free space Log frequency configurable with FREE IDAQTest amp Log software Automatic file name creation with time stamp Raw data conversion utility and simple analysis functions provided in IDAQTest Log software On board lithium battery to power the real time clock Date time setting of real time clock on board is configurabl
58. rate has to be 64 For high speed streaming mode the minimum sample rate can be 1Isample s due to different design method While streaming data in normal streaming mode other functions can still be executed such as read write digital lines etc but in high scan rate the performance may be affected since the hardware CPU is shared doing other things besides hardware timed data acquisition And overall performance is also system dependant In high speed streaming mode no other functions should be executed in iUSBDAQ UI208LOG except the stop streaming command 23 If wrong number of channels or scan rate is given the software will popup a dialog box telling the error code and error source Just click on OK and give a correct parameter the software will continue lo 4 096 Y BC abecsy Figure 11 Analog Inputs Tab By checking the Log Data box and specify a file path the data will be logged into the file The iDAQTest amp Log software allows up to 10M samples to be logged We recommend to use file ending csv so that the data file can be easily opened in Excel Figure 14 shows a sample log file in Excel The logged data file can be also opened in Analysis Graph Tab see session 4 9 and perform some basic analysis HYTEK USBDAQ Data File 12 33 02 30 07 2005 Number of Start Channel 0 Channels 3 ScanRate 2000HZ 0 528 0 0 528 0 544 0 0 528 0 528 0 032 0 544 0 528 0 032 0 528 0 528 0 032 0 528 0 528 0 03
59. rite read data beyond allowed EEPROM boundary 22 PWM period parameter too big max allowed 333 us 23 PWM period parameter too small min allowed 3 us 24 Null Video Session the camera maybe in use or session already opened 25 Data not ready 26 Exceed max allowed camera numbers 27 Camera is in use 28 General video related error 29 This video device is not supported 30 Video recording error 31 AVI file playback error 9 LabVIEW Interface Description The LabVIEW interface vis are wrapper around USBDAOQ dll which located in computer system s directory after the i1 USBDAQ device driver being installed Below are vis s simple descriptions more details about functions and parameter s meaning please also refer to chapter 7 of this document 9 1 LabVIEW Examples 9 1 1 USBDAQ_Getinfo_Example vi This vi enumerates init the devices and gets the firmware version device serial number and total number of USBDAQs in the computer of the selected type Connector Pane GET IMFO ERAMEL Front Panel 49 9 1 2 USBDAQ_SingleAl Example vi This examples hows how to read data from a single analog channel Connector Pane SIHGLE AHALOG SEL Front Panel LW1i20816 F al if 9 1 3 USBDAQ_MultipleAls Example vi This example shows how to read data from multiple analog channels Connector Pane MULTIF ERNAMEL Front Panel 50 voltages lo fe StarbChannel
60. ront Panel Device Type eJiusEDAQ Actual Scan Rate DIOs ito Waveform Graph lo SE Be 0 076 Jo rc 0 024 DIOs9to 16 De Initialize First Time Eo ae Car Voltages 0 018 Counter 0 012 lo 0 01 0 008 0 006 9 1 12 USBDAQ GetDAQCAM_Info_Example vi U1208LOG only This vi enumerates init the USBDAQ devices as well as cameras and gets the DAQ firmware version DAQ device serial number and total number of IUSBDAQs in the computer also gets the total number of cameras and camera name for the selected camera in Camera Index control Connector Pane GETIHFO DAG z CAMERA Front Panel 55 9 1 13 JISBDAQ DAQCAM Example1 vi U1208LOG only This example shows how to read data from multiple analog channels while the video is streaming Connector Pane DAQ CAMERA EXAMPL Front Panel 56 9 1 14iUSBDAQ StreamingAls Cam_Example vi U1208LOG only This example shows how to stream analog data continuously while video is streaming at the same time getting 8 analog input s data 16 digital line status and counter value Connector Pane ETREAM CAM EXAMFL Front Panel 57 Device Type epjiusenao Actual Scan Rate DIOs ito Waveform Graph lo ee Be 0 076 lo d 0 024 DIOs9to 16 SE 0 022 Initialize First Time Eo BER Cony Voltages 0 018 Lo o y 0016 S 0 014 Counter e E 0 012 lo et 0 01 0 008 0 006 0 004 0 002 0 l l l O 1 2 3 4 5 6 i
61. rsion O Parameters none Return 1USBDAOQ dll version number 6 10 USBDAQ GetFirmwareVersion This function returns the USBDAQ firmware version number Syntax int USBDAOQ_GetFirmwareVersion DevSession Session DWORD Version Parameters Session input device session that being opened Version output USBDAOQ dll version number 33 Return 1USBDAQ error code or O for no error 6 11 USBDAQ _ GetErrorDes This function takes an USBDAQ error code and outputs the error string for detailed error source Syntax void USBDAQ_GetErrorDes int ErrorCode char ErrorString Parameters ErrorCode input USBDAQ error code ErrorString output error description string User should allocate a string length of 256 byte Return none 6 12 USBDAGQ_ ReadSingleAnalogin This function reads voltage from one analog channel Syntax int 1USBDAQ_ReadSingleAnalogIn DevSession Session int Channel int InputRange float Voltage int Reserved Parameters Session input device session that being opened Channel input the channel to read data from range O 7 O is AI O and so on InputRange input since currently USBDAQ has only one voltage range so this parameter should be O for now Voltage output the read data from the analog channel Reserved output reserved parameter it always returns O for now Return 1USBDAQ error code or O for no error 6 13 USBDAQ
62. s to close a device session when they don t use that device anymore The order of using a device function is enumeration open session calling device related functions at very end close device session There is no need to enumerate open session and close session every time Syntax int 1USBDAQ _ ReleaseDevice DevSession Session Parameters Session input device session that being opened Return 1USBDAQ error code or 0 for no error 6 7 iUSBDAQ GetDeviceSerialNo This function returns an iUSBDAQ device serial number Each USBDAQ has an unique serial number User can use this unique ID to distinguish the devices if there are more than one USBDAQ connected to the same computer Syntax int 1USBDAQ GetDeviceSerialNo DevSession Session unsigned long SerialNumber Parameters Session input device session that being opened 32 SerialNumber output device serial number Return 1USBDAQ error code or 0 for no error 6 8 iUSBDAQ GetCredits This function returns the designer s information Syntax int 1USBDAQ _ GetCredits DevSession Session BYTE data Parameters Session input device session that being opened data output an array of size 64 type of BYTE User should allocate this array It returns the designer s info Return 1USBDAQ error code or 0 for no error 6 9 iUSBDAQ GetDLLVersion This function returns the USBDAQ dll version number Syntax DWORD USBDAQ_GetDLL Ve
63. takes 8ms to execute for U120816 and 4ms for Ul208LOG so the update rate for DIO will be 125HZ for U120816 and 250HZ for Ul208LOG It s the high level application responsibilities to backup the existing states and directions for each pin if user only wants to update one pin at a time 5 7 Trigger This is the external trigger line for streaming mode data acquisition It is software configurable if user wants to wait for this line When in use as soon as the line goes high the device will start hardware timed data acquisition This is a TTL level input 5 8 PWM There are two 10 bit PWM outputs in 1USBDAQ Software can set period and duty cycle for each channel separately The period is between 3 micro second to 333 micro second or the frequency is 333k to 3k Duty cycle can be set between 0 100 or 0 1023 as 18 integer Both PWM should be set to the same frequency the last set frequency will be in effect There are some protection circuits at the output of PWM but user should still be careful not to connect power source to this PWM outputs The PWM outputs can be used to lit LEDs drive motors or convert to analog outputs by adding an extra circuit See application note from microchip www microchip com AN538 Using PWM to generate analog output 5 9 Counter IUSBDAQ has a 16 bit counter Software has the option to select if the counter should be reset after the read or not The counter 1s incremented when it detects a f
64. the camera name Connector Pane USBDAG Session In Camera Index Camera Name error in no error error out IUSBDAQ Session Out 9 8 7 USBDAQ SetVWindow_Cam vi This vi sets the camera video window s name position parent window visibility etc Connector Pane 67 SPGL Session In Camera Index Win Name Parent Win Ref error in no error Width Height Visibility gett E lUSBDAO Session Out error out 9 8 8 USBDAQ Camera_Property vi This vi will bring out the camera property window where you can set brightness contrast white balance hue saturation etc camera properties Connector Pane USBDAG Session In Camera Index Parent Window Ref p error out error in no error IUSBDAO Session Out 9 8 9 USBDAQ Video GetData vi This vi will pull the data that are synchronized with video frames lt can only output data when video is running It returns error when there is no new data ready If there is new video frame passing by this function will send out pulse at TriggerO line screw terminal pin 39 and get 8 analog channels data 16 digital channels status and the 16 bit counter s value If there is no new video frame passed then it will return right the way with error This function should be called frequently with an interval less than the camera frame rate Say if your camera has 30 frames s ideally this function should be called at interval less than 33ms this way 1t will make sure
65. the mapping is updated Syntax int USBDAQ_EnumerateDev unsigned long DevType unsigned long Count Parameters DevType input Device type currently we have only U120816 so it s value should be 0 Count output It s the total number of all found USBDAQs of the selected type Return 1USBDAQ error code or 0 for no error 6 4 USBDAQ OpenDevice This function opens an USBDAQ session This session will be used to call other device related functions The order of using a device function is enumeration open session calling device related functions at very end close device session There is no need to enumerate open session and close session every time Syntax int USBDAQ_OpenDevice unsigned long DevType unsigned long DevIndex DevSession Session Parameters DevType input Device type currently we have only U120816 so it s value should be 0 DevIndex input It s the index of 1 USBDAQs of the selected type that you want to use Session Output This 1s the session that being opened and will be used by other device related function calls 31 Return 1USBDAQ error code or 0 for no error 6 5 USBDAQ Reset Reset the device Syntax int USBDAQ_Reset DevSession Session Parameters Session input device session that being opened Return 1USBDAQ error code or 0 for no error 6 6 iUSBDAQ ReleaseDevice This function closes an opened device session Normally user only need
66. to manage the multiple 1USBDAQs in the same computer because Windows OS will not remember the ordering of USB DAQs if they are plugged into different USB ports Syntax int 1USBDAQ_OpenDeviceByUserIndex unsigned long UserIndex DevSession Session Parameters Session output device session that being opened UserIndex input the user defined index They should be unique for each device Return 1USBDAQ error code or 0 for no error 7 4 USBDAQ GetDevicelnfo This function gets device information such as serial number user index device ID and firmware version etc Syntax Int USBDAQ_GetDevicelnfo unsigned long DevIndex DevInfo devInfo 42 Parameters DevIndex input device index devInfo output please refer to DevInto typedef Return 1USBDAQ error code or 0 for no error 7 5 USBDAQ AlStartStream_HS U1208LOG only This function starts the high speed streaming mode of analog inputs acquisition It has identical parameters as function USBDAQ_AIStartStream but allows higher speed sampling For high speed sampling rate please refer to chapter 3 3 of this document This function returns right the way after the call and the streaming is in background with an internal pc side data buffer Please read more about this data buffer in 1USBDAQ_AIGetScans description The maximum number of channels is 8 and it depends on which channel is the starting channel The StartChannel NumberOfChs should not e
67. vice session There is no need to enumerate open session and close session everytime Connector Pane DewviceType IUISBDAG Session Que Devicelndex error in no error error out 9 2 10 iUSBDAQ ReleaseDevice vi This vi closes a opened device session Normally user only need to close a device session when they don t use that device anymore The order of using a device function is enumerate open session calling device related functions at very end close device session There is no need to enumerate open session and close session everytime Connector Pane LISBOA Session In error in no error error out 9 2 11 USBDAQ Get SerialNumber vi This vi returns an USBDAQ device serial number Each iUSBDAQ has an unique serial number User can use this unique ID to distinguish the devices if there are more than one iUSBDAQs connected to the same computer Connector Pane LISBOA Session In IUISBDAG Session Que SerialNumber error aut error in mo error 9 2 12 iUSBDAQ Bits To Voltage vi converts bits to voltage IS error in no error error out Connector Pane Bits 0 4095 9 2 13 I USBDAQ Voltage To Bits vi Converts voltage to bits Connector Pane error in no error error out 9 3 Analog Input Functions 61 9 3 1 USBDAQ Read_SingleAl vi This vi reads voltage from one analog channel Connector Pane LISBOA Session In Channel InputRange error in no error IISBDACG Session Ouk Voltage
68. will reset the counter to start over after the read Value O will continue the counting after the read Count output returned counted number For how counter works please refer to the hardware part of this user s guide Return USBDAO error code or O for no error 6 18 USBDAQ DIO This function reads the counter The directions and states are represented in a byte which 1s 8 bits The lowest bit represents the lowest DIO pin number and highest bit represents the highest DIO pin number Syntax 38 int 1USBDAQ_ DIO DevSession Session BYTE Portlto8dir BYTE Port9to1 6dir BYTE Portltosstate BYTE Port9to 1 6state int updateDio Parameters Session input device session that being opened Portlto8dir input one byte represents DIO pin 1 8 directions If BYTE data type expressed in binary for input O for output For example 11011110 would result a value of 222 it represents that all pins from 1 8 are inputs pins except pin1 and pin6 are output pins Port9tol6dir input one byte represents DIO pin 9 16 directions Portlto8state input and output DIO 1 DIO states For pins that directions being set to output if updateDio is 1 which means write update output pins the states will be written and the actual states will be read back and returned to the same parameter Or if udateDio is 0 only read action is performed and returned back to this parameter Port9to16state input and out
69. xceed 8 The maximum sampling throughput varies with number of Channels Please refer to the hardware part chapter 5 5 of this document for details The relationship between sampling rate and scan rate is SampleRate ScanRate NumberOfChannels For example if scan rate is 3000 number of channels is 8 the total sample rate will be 24 000samples s If Ext Trigger is true after this function returns the device will wait for a high state from the trigger line to start the data acquisition False will start the data acquisition right after this call into pc side background data buffer This function will return actual scan rate it may not always the same as the specified input scan rate This function will return an error if the channel s settings are not correct Note in high speed streaming mode the hardware will not response to any other commands except the iIUSBDAQ_ AIStopStream_HS below Please do not call any other functions that will cause the communication with the hardware while in high speed streaming otherwise it will cause error Syntax int 1USBDAQ _ AIStartStream_HS DevSession Session 43 int StartCh int NofChs int InputRange int ScanRate int ActualRate int withExternalTrigger E Parameters Session input device session that being opened StartCh input the starting channel range O 7 0 is AI 0 and so on NofChs input number of channels to read data from starting from the chan
Download Pdf Manuals
Related Search
Related Contents
VizMaxx - Tv Philips CarStudio Car audio system CEM2100 FVS124G - Reseau Facile Interviewer Server Administration User's Guide Copyright © All rights reserved.
Failed to retrieve file