National Instruments 321645c-01 инструкция обслуживания

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554

Идти на страницу of

Хорошее руководство по эксплуатации

Законодательство обязывает продавца передать покупателю, вместе с товаром, руководство по эксплуатации National Instruments 321645c-01. Отсутствие инструкции либо неправильная информация, переданная потребителю, составляют основание для рекламации в связи с несоответствием устройства с договором. В законодательстве допускается предоставлении руководства в другой, чем бумажная форме, что, в последнее время, часто используется, предоставляя графическую или электронную форму инструкции National Instruments 321645c-01 или обучающее видео для пользователей. Условием остается четкая и понятная форма.

Что такое руководство?

Слово происходит от латинского "instructio", тоесть привести в порядок. Следовательно в инструкции National Instruments 321645c-01 можно найти описание этапов поведения. Цель инструкции заключается в облегчении запуска, использования оборудования либо выполнения определенной деятельности. Инструкция является набором информации о предмете/услуге, подсказкой.

К сожалению немного пользователей находит время для чтения инструкций National Instruments 321645c-01, и хорошая инструкция позволяет не только узнать ряд дополнительных функций приобретенного устройства, но и позволяет избежать возникновения большинства поломок.

Из чего должно состоять идеальное руководство по эксплуатации?

Прежде всего в инструкции National Instruments 321645c-01 должна находится:
- информация относительно технических данных устройства National Instruments 321645c-01
- название производителя и год производства оборудования National Instruments 321645c-01
- правила обслуживания, настройки и ухода за оборудованием National Instruments 321645c-01
- знаки безопасности и сертификаты, подтверждающие соответствие стандартам

Почему мы не читаем инструкций?

Как правило из-за нехватки времени и уверенности в отдельных функциональностях приобретенных устройств. К сожалению само подсоединение и запуск National Instruments 321645c-01 это слишком мало. Инструкция заключает ряд отдельных указаний, касающихся функциональности, принципов безопасности, способов ухода (даже то, какие средства стоит использовать), возможных поломок National Instruments 321645c-01 и способов решения проблем, возникающих во время использования. И наконец то, в инструкции можно найти адресные данные сайта National Instruments, в случае отсутствия эффективности предлагаемых решений. Сейчас очень большой популярностью пользуются инструкции в форме интересных анимаций или видео материалов, которое лучше, чем брошюра воспринимаются пользователем. Такой вид инструкции позволяет пользователю просмотреть весь фильм, не пропуская спецификацию и сложные технические описания National Instruments 321645c-01, как это часто бывает в случае бумажной версии.

Почему стоит читать инструкции?

Прежде всего здесь мы найдем ответы касательно конструкции, возможностей устройства National Instruments 321645c-01, использования отдельных аксессуаров и ряд информации, позволяющей вполне использовать все функции и упрощения.

После удачной покупки оборудования/устройства стоит посвятить несколько минут для ознакомления с каждой частью инструкции National Instruments 321645c-01. Сейчас их старательно готовят или переводят, чтобы они были не только понятными для пользователя, но и чтобы выполняли свою основную информационно-поддерживающую функцию.

Содержание руководства

  • Страница 1

    NI-DAQ ™ Function Reference Manual for PC Compatibles Version 6.1 Data Acquisition Softw are for the PC NI-DAQ FRM for PC Compatibles April 1998 Edition Part Number 321645C-01 © Copyright 1991, 1998 National Instruments Corporation. All rights reserved.[...]

  • Страница 2

    Inte rnet Sup port E-mail: support@natinst.com FTP Site : ftp.natinst.com Web Addres s: www.natinst.com Bulletin Board Sup port BBS Unite d St at es : 51 2 79 4 5422 BBS Unite d Kin gd om: 01 63 5 55 14 22 BBS Fran ce: 01 48 65 15 59 Fax- on-De mand S uppo rt 512 4 18 1 111 Teleph one Support (US A) Tel: 5 12 795 824 8 Fax: 51 2 794 5 678 Interna t[...]

  • Страница 3

    Important Information Warranty The media on wh ich you receive Na tional Instrume nts software are wa rranted not to fail to ex ecute programming instruc tions, due to defects in materials and workma nship, for a pe riod of 90 days from date of shipme nt, as evid enced by receipt s or other do cumentation. National In struments will, at its op tion[...]

  • Страница 4

    © Natio nal In strume nts Corp oration v NI-DA Q FRM for PC C omp atibles Cont ents About This M anual How to Use the NI-DAQ Manu al Set ............. ........... ................. ................. ........... ......... xiii Organization of This Manual ......... ........... ...... ..... ...... ........... ...... ..... ...... ........... ...... ..[...]

  • Страница 5

    Conten ts NI-DAQ FRM for PC Compatibles vi © Natio nal In strume nts Corp oratio n AI_VScale ....... ................. ................. ........... ................. ................. ........... ................. .... .2 - 2 0 Align_DMA_Buffer ......... ........... ................. ................. ........... ................. ...............[...]

  • Страница 6

    Conten ts © Natio nal In strume nts Corp oration vii NI-DA Q FRM for PC C omp atibles DIG_Block_Check............. ................. ............ ................. ................ ............ ................. ... 2-147 DIG_Block_Clear .......................... ........... ................. ................. ........... ................. ......[...]

  • Страница 7

    Conten ts NI-DAQ FRM for PC Compatibles viii © Natio nal In strume nts Corp oratio n RTSI_Clock .......... ................. ................. ....................... ................. ................. ........... ..... 2- 287 RTSI_Conn ................. ................. ................. ............................ ............................[...]

  • Страница 8

    Conten ts © Natio nal In strume nts Corp oration ix NI-DA Q FRM for PC C ompat ibles WFM_DB_Trans fer ................. ............................ ............................ ............................. ... 2-41 5 WFM_from_Disk............... ................. ............................. ...................... ................. ......... 2-[...]

  • Страница 9

    Conten ts NI-DAQ FRM for PC Compatibles x © Natio nal In strume nts Corp oratio n Figure 2-6. ND_INSIDE_REGION................... ................. ........... ................. ........... 2-85 Figure 2-7. ND_HIGH_HYSTERESIS ............. ................. ................. ...................... 2-86 Figure 2-8. ND_LOW_HYSTERESIS ...............[...]

  • Страница 10

    Conten ts © Natio nal In strume nts Corp oration xi NI-DA Q FRM for PC C omp atibles Table 2-1. Parameter Settings for A I_Configure ................. ................. ................. ... 2-7 Table 2-2. Port 0 Digital I/O Lines R eserved ..... ................. ............................ ......... 2-11 Table 2-3. Reglitching Parameters for Pe[...]

  • Страница 11

    Conten ts NI-DAQ FRM for PC Compatibles xii © Natio nal In strume nts Corp oratio n Table 2-39. Data Ranges for the Buffer Parameter for DAQAr b 5411 Devices........ 2-426 Table 2-40. Mode Values for the Cou nt Parameter for DAQArb 54 11 Devices ....... 2-427 Table 2-41. Mode Values for the I terations Parameter for DAQArb 5411 Devices ...........[...]

  • Страница 12

    © Natio nal In strume nts Corp oration xiii N I-DA Q FRM fo r PC Com pat ibles About This Manual The NI-DAQ Funct i on Refe re nce M anu al f or PC Co mpat i ble s is f or users of the NI-D A Q sof tware for PC com patibles version 6.1. NI-D A Q software is a po werful application pro gramming interf ace (API) between your data acquisition (DA Q) [...]

  • Страница 13

    NI-DAQ FRM for PC Compatibles xiv © Natio nal In strume nts Corp oratio n About This Ma nual •A p p e n d i x B , A nal og Inp ut Ch annel , Gain Se tting s, and Voltage Ca lculat ion , lists the valid channel and gain setting s for D A Q boards, describes ho w NI-D A Q calculates voltage, an d describes the measurement of of fset and gain adjus[...]

  • Страница 14

    © Natio nal In strume nts Corp oration xv NI-DA Q FRM for PC Co mpat ibles About This Ma nual Am9513- ba sed devic e These dev ice s are the AT- MI O-16 , AT-M IO -16F- 5, A T-MI O-16 X, AT-MIO -16D, and AT-MIO- 64F-5 . bold Bold text denotes the names o f menus, menu item s, par a meters , d ialog boxes, d ialog bo x buttons or options, ic ons, w[...]

  • Страница 15

    NI-DAQ FRM for PC Compatibles xvi © Natio nal In strume nts Corp oratio n About This Ma nual MIO-F -5 /16X d evi ce Refers to the A T-M IO - 16F- 5, AT- MI O-16 X, a nd the AT -M IO -64F -5 . MIO-16 /1 6D d evic e Refers to the A T-M IO - 16 an d A T -MIO - 16D. MIO-16 XE -50 d ev ice Refe rs to the AT -M IO- 16X E-50 , DAQ Pa d-M IO- 16XE -50 , a[...]

  • Страница 16

    © Natio nal In strume nts Corp oration xvii NI-DA Q FRM for PC C omp atibles About This Ma nual Simultaneous sampling Refers to the PCI-611 0E, PCI-61 11E, PCI-4 451, PCI-445 2, PCI-4551 , device and PC I-4552 . VXI- MIO de vice Refer s to the VXI -MIO-64 E-1 a nd VXI -MIO-6 4XE-10 . VXI-SC-110 2/B/C Refers to the VX I-SC-1 102 , VXI-SC- 1102B, an[...]

  • Страница 17

    NI-DAQ FRM for PC Compatibles xviii © Natio nal In strume nts Corp oratio n About This Ma nual NEC-AI-1 6XE-50 16 16-b it NEC AI E Series NEC-MIO-16E-4 16 1 2-bit NEC MIO E Seri es NEC-MIO-16XE-50 16 1 6-bit NEC MIO E Seri es PCI-6031E (MIO -64XE-1 0) 64 16-b it PCI MIO E Seri es PCI-6032E (AI- 16XE-10) 16 16-b it PCI AI E Series PCI-6033E (AI- 64[...]

  • Страница 18

    © Natio nal In strume nts Corp oration xix NI -DAQ FR M fo r PC Comp atib les About This Ma nual About the National Instruments Documenta tion Set The NI-DAQ Func tion Reference Manu al for PC Comp atibles is one piece of the docu mentation set for your D A Q system. Y ou m i ght ha ve any of sev eral types of m anua ls, d epen ding on th e ha rdw[...]

  • Страница 19

    NI-DAQ FRM for PC Compatibles xx © Natio nal In strume nts Corp oratio n About This Ma nual Related Documentation The follo wing documents contai n i nfo rmati on yo u may f ind useful as you read this manual: For detailed hardware information, refer to the user manual included with each board. The follo wing manuals are a v ail able from National[...]

  • Страница 20

    © Natio nal In strume nts Corp oration 1-1 NI-DA Q FRM fo r PC Com pat ibles Chapter 1 Using the NI-DAQ Functions This chapter contain s imp ortant information abou t ho w to apply the function descriptions in this manu al to yo ur programm ing lang uage and environment. When you are familiar with the material in the NI-DAQ User Manual fo r PC Com[...]

  • Страница 21

    Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-2 © Natio nal In strume nts Corp oratio n use the configuratio n utility to verify your device numbers . Y o u can use multiple D A Q devices in one application; to d o so, simply pass the appropriate de vice number to each fun ction. If you ar e using SCXI, you mu st pass t[...]

  • Страница 22

    Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-3 NI-DA Q FRM fo r PC Com pat ibles Arrays When a primary type is inside square brackets (for example, [i16]) an array of the type named is requ ired for that parameter. Multipl e T y pes Some param eters can be in multipl e types . Combin ations of the pr imary types [...]

  • Страница 23

    Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-4 © Natio nal In strume nts Corp oratio n The pre vious example describes a par ameter that can accept an arr ay of signed i nteg ers or an arr ay of float ing-poi nt number s. Programming Language Considerations Apart from the d ata type differences, there are a few languag[...]

  • Страница 24

    Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-5 NI-DA Q FRM fo r PC Com pat ibles NI-DAQ Constants I nclude File The file NIDAQCNS.INC contains definitions for constants required for some of the NI-DAQ fu nctions. You should use the constants symbo ls in your pro grams; do no t use the numer ical values. In V isua[...]

  • Страница 25

    Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-6 © Natio nal In strume nts Corp oratio n T able 1-3 shows ho w the Lab W in dows/CVI functio n p anel tree is org anized, and the NI -D A Q function nam e that corresponds to each functi on panel. Table 1-3. The LabWindo ws/CVI Func tion T ree for Data Acquisi tion LabWindo[...]

  • Страница 26

    Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-7 NI-DA Q FRM fo r PC Com pat ibles Analog I nput Single Point Change Analog Input Param eter AI_Change_Parameter Measure Voltage AI_VRead Clear Analog In put AI_Clear Read Analog Binary AI_Read Scale Binary to Voltage AI_VScale Setup An alog I n put AI_Setup Check Ana[...]

  • Страница 27

    Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-8 © Natio nal In strume nts Corp oratio n Start Scan SCAN_Start Check DAQ or Scan DAQ_Check Assign Rate to DAQ Group DAQ_Set_Clock Monitor DAQ or Scan DAQ_Monitor Start Lab Scan Lab_ISCAN_Start Check Lab Scan Lab_ISCAN_Check Clear DAQ or Scan DAQ_Clear Scale DAQ or Scan DAQ_[...]

  • Страница 28

    Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-9 NI-DA Q FRM fo r PC Com pat ibles Waveform Generation Generate WFM fr om Array WFM_Op Generate WFM fr om Disk WFM _from_Disk Low-Lev e l F unctions Scale Waveform Buffer WFM_Scale Convert Wavefor m Rate WFM_Rate Ass i gn W avef orm G rou p WFM_Group_Setup Load Wavefo[...]

  • Страница 29

    Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-10 © Natio nal In strume nts Corp oratio n Group Mode Confi gure Group DIG_Grp_Config Read Group DIG_In_Grp Write Group DIG_Out_Grp Get Group Status DIG_Grp_Status Set Group Mo de DIG_Grp_Mode Block Tr ansfe r Read Block DIG_Block_In Write Block DIG_Block_Out Check Block DIG[...]

  • Страница 30

    Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-11 NI -DA Q FRM fo r PC Comp ati bles Set Up Mux C ounter SCXI_MuxCtr_Setup Set Up Track/Hold SCXI_Track_Hold_Setup Control Track/Hold St ate SCXI_Track_Hold_Control Select Gain SCXI_Set_Gain Configure Filter SCXI_Configure_Filter Select Scanning Mode SCX I_Set_Input_M[...]

  • Страница 31

    Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-12 © Natio nal In strume nts Corp oratio n Count Periods CTR_Period Read Coun ter CTR_EvRead Stop Co unter CTR_Stop Restart Co unter CTR_Restart Reset Co unter CTR_Reset Get Counter Output St ate CTR_State Conver t CT R Rate CTR_Rate Generate Pulse CTR_Pulse Gener ate Squ ar[...]

  • Страница 32

    Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-13 NI -DA Q FRM fo r PC Comp ati bles Initializa tion/Utilities is a class of function s used for general bo ard initialization and configuration, for con figuration retrie v al, and for setting NI-D A Q p roperties. This clas s also contains s ev eral u seful utility [...]

  • Страница 33

    Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-14 © Natio nal In strume nts Corp oratio n Count er/Ti mer is a class of function p a n els that perform coun ting and timing operations. DAQ-STC C ounters (GPC TR) is a subclas s of Counter/ T imer that contains fu nctions that perform operations on th e D A Q-STC counters [...]

  • Страница 34

    © Natio nal In strume nts Corp oration 2-1 NI-DA Q FRM fo r PC Com pat ibles Chapter 2 Function Reference This chapter contains a d etailed explanation o f each NI-D A Q function. The function s are arranged alph abetically . AI_Change_Param eter Format status = AI_Change_Parameter (deviceNumber , channel, paramID, paramV alue) Purpose Selects a s[...]

  • Страница 35

    Chapter 2 Function R eference — AI_Change_Pa rameter NI-DAQ FRM for PC Compatibles 2-2 © Natio nal In strume nts Corp oratio n • Pascal pr ogrammers— NIDAQCNS.PAS Legal values for channel depend o n the ty pe of de vice you are us ing; analog i nput chann els are labele d 0 through n – 1, where n is the nu mber of analog i nput chann els o[...]

  • Страница 36

    Chapter 2 Function R eferenc e — AI_Che ck © Natio nal In strume nts Corp oration 2-3 NI-DA Q FRM fo r PC Com pat ibles AI_Check Format statu s = AI _C hec k (devic e Numbe r , read ing A vailabl e , reading ) Purpose Returns the status of the analog inpu t circuitry and an analog input reading if o ne is available. AI_Check is intended for use [...]

  • Страница 37

    Chapter 2 Function R eferenc e — AI_Che ck NI-DAQ FRM for PC Compatibles 2-4 © Natio nal In strume nts Corp oratio n Using This Function AI_Check chec ks the status of the analog input circuitry . If the de vice has p erformed an A/D con v ersion, AI_Check re tur ns read ingAvaila ble = 1 and the A/D con version result. Otherwise, AI_Check retur[...]

  • Страница 38

    Chapter 2 Function R eference — AI_ Clear © Natio nal In strume nts Corp oration 2-5 NI-DA Q FRM fo r PC Com pat ibles AI_Clear Format status = AI_Clear (deviceNumber) Purpose Clears the analog inp ut circuitry and empties the FIFO memory . Para meters Input Using This Function AI_Clear clears the analog in put circuitry and emp ties the analog [...]

  • Страница 39

    Chapter 2 Function R eference — AI_ Configure NI-DAQ FRM for PC Compatibles 2-6 © Natio nal In strume nts Corp oratio n AI_Configure Format status = AI_Confi gure (de viceNumber , chan, inputMode, inputRange, polarity , driveAIS) Purpose Informs NI-D A Q of the input mode (s ingle-ended or dif ferential), input r ange, and input polarity selecte[...]

  • Страница 40

    Chap ter 2 F unctio n Refere nce — AI_Co nfigure © Natio nal In strume nts Corp oration 2-7 NI-DA Q FRM fo r PC Com pat ibles 1: Referenced Single-Ended (RSE) con figuration (used when the inp ut signal does not have it s own ground reference. Th e negative inp ut of the inst rumentati on amplifier is tied to the instrumentation amplifier signal[...]

  • Страница 41

    Chapter 2 Function R eference — AI_ Configure NI-DAQ FRM for PC Compatibles 2-8 © Natio nal In strume nts Corp oratio n Not e If a device is software configurable, the inputMode , input Range , and polarity parameters are used to program the device f or the configuration you want. If a device is no t software co nfigurable, this function us es t[...]

  • Страница 42

    Chap ter 2 F unctio n Refere nce — AI_Co nfigure © Natio nal In strume nts Corp oration 2-9 NI-DA Q FRM fo r PC Com pat ibles Using This Function When you attach an SC -2040 or S C-2042- R TD to you r D A Q device, you must co nf igure channels 0 through 7 for d if ferential m ode. When yo u attach an SC-204 3-SG or an y SCC accessories to your [...]

  • Страница 43

    Chapter 2 Function R eference — AI_ Mux_Conf ig NI-DAQ FRM for PC Compatibles 2-10 © Natio nal In strume nts Corp oratio n AI_Mux_Confi g Format status = AI _Mux_C onfig (deviceNumber , numM ux Brds) Purpose Configures the number of multip lexer (AMUX-64T) devices connected to the MIO and AI de vices and informs NI-D A Q of the pr esence of any [...]

  • Страница 44

    Chap ter 2 F unctio n Refere nce — AI_Mu x_Conf ig © Natio nal In strume nts Corp oration 2-11 NI -DA Q FRM fo r PC Comp ati bles Fo r the A T-MIO-64F -5, A T-MIO-64E- 3, PCI-6031E (MIO-64XE-10), PCI-6033 (AI-64XE-10 ), and PCI-6071E (MIO-64 E-1), you als o must call M IO_Config if you pl an to u se AMUX -64T channels. Refer to the MIO_Config fu[...]

  • Страница 45

    Chapter 2 Function R eference — AI_ Read NI-DAQ FRM for PC Compatibles 2-12 © Natio nal In strume nts Corp oratio n AI_Read Format status = AI_Read (deviceNumber , chan, gain, reading) Purpose Reads an analog input channel (initiates an A/D con v ersion on an analog input channel) and returns the unscaled r esult. Para meters Input Output Para m[...]

  • Страница 46

    Chapter 2 Function R eference — AI_ Read © Natio nal In strume nts Corp oration 2-13 NI -DA Q FRM fo r PC Comp ati bles Not e NI-DA Q does no t distingu ish between the low-gain and high-gain vers ions of the AT -M I O - 1 6 . If you enter a gai n of 10 and you hav e a device with g ai n s of 1, 2 , 4, and 8, a gain of 2 actual ly is us ed and n[...]

  • Страница 47

    Chapter 2 Function R eference — AI_ Read_Scan NI-DAQ FRM for PC Compatibles 2-14 © Natio nal In strume nts Corp oratio n AI_Read_ Scan Format status = AI _Read_Scan (A I_ Read_Scan (d eviceNumber , reading) Purpose Returns readings f or all analog input channels selected b y SCAN_Setup (E Series de vices only , with or without the SC-2040 access[...]

  • Страница 48

    Chap ter 2 Funct ion Ref ere nce — AI_S etup © Natio nal In strume nts Corp oration 2-15 NI -DA Q FRM fo r PC Comp ati bles AI_Setup Format status = AI_Setup (de viceNumber , chan, gain) Purpose Selects an analog input channel and gain setting for externally pulsed con version operation s. Para meters Input Para meter Discussion chan is the anal[...]

  • Страница 49

    Chapter 2 Function R eferenc e — AI_Set up NI-DAQ FRM for PC Compatibles 2-16 © Natio nal In strume nts Corp oratio n Using This Function AI_Setup addresses the specif ied analog input chann el and changes the input gain to the specified ga in setting. AI_Setup , in conjunction with AI_Check and AI_Clear , is used for externally timed A/D con ve[...]

  • Страница 50

    Chapte r 2 Functio n Ref erence — AI_VRe ad © Natio nal In strume nts Corp oration 2-17 NI -DA Q FRM fo r PC Comp ati bles AI_VRead Format statu s = AI _V Read ( devic e Numbe r , chan, gain , voltag e) Purpose Reads an analog input channel (initiates an A/D con v ersion on an analog input channel) and returns the result scaled to a voltage in u[...]

  • Страница 51

    Chapter 2 Function R eferenc e — AI_VRe ad NI-DAQ FRM for PC Compatibles 2-18 © Natio nal In strume nts Corp oratio n volta ge is the floating-point v ariable in which NI-D A Q returns the measured v oltage, scaled to units of volts. Not e C Progr ammers— voltag e is a pass -by-refere nce pa rameter . Using This Function AI_VRead addresses the[...]

  • Страница 52

    Chapter 2 Function R eference — AI_ VRead_Sc an © Natio nal In strume nts Corp oration 2-19 NI -DA Q FRM fo r PC Comp ati bles AI_VRead_Scan Format status = AI _VRead_Scan (deviceNum ber , reading) Purpose Returns readings in volts for all analog input chann els selected by SCAN_Setup (E Series de vices only with or without the SC-2 040 accessor[...]

  • Страница 53

    Chapter 2 Function R eference — AI_ VScale NI-DAQ FRM for PC Compatibles 2-20 © Natio nal In strume nts Corp oratio n AI_VScale Format statu s = AI _V Scale (devic eNum ber , cha n, ga in , gai nAdj u s t, o ffse t, readi ng, volt age) Purpose Con verts the bin ary result from an AI_Read call to the actual input voltage. Para meters Input Output[...]

  • Страница 54

    Chapte r 2 Function Refe rence — AI_VSc ale © Natio nal In strume nts Corp oration 2-21 NI -DA Q FRM fo r PC Comp ati bles gainA djust is th e multiplying factor to adjust th e gain . Refer to Appendix B, Analo g Input Channel, Gai n Settings, and Volta ge C al culation , for the procedure for determining gainA djust . If you do not w ant to do [...]

  • Страница 55

    Chapter 2 Function R eference — Align_D MA_Buff er NI-DAQ FRM for PC Compatibles 2-22 © Natio nal In strume nts Corp oratio n Align_D MA_Bu ffer Format status = Align_DMA_Buffer (de viceNumber , resour ce, bu ffer , count, bufferSize, alignIndex) Purpose Aligns the data i n a DMA buf fer to a voi d crossing a physical page boun dary . This funct[...]

  • Страница 56

    Chapter 2 F unction Reference — Align_DMA_Buffer © Natio nal In strume nts Corp oration 2-23 NI -DA Q FRM fo r PC Comp ati bles buffer is the integer array of samples NI-D A Q uses in the waveform or pattern generation. The actual size of bu ffer sh ould be lar ger than th e number of samples to make room for possible align m ent. If the actual [...]

  • Страница 57

    Chapter 2 Function R eference — Align_D MA_Buff er NI-DAQ FRM for PC Compatibles 2-24 © Natio nal In strume nts Corp oratio n bufferSize ≥ count + 1. If neither form of alignment is p ossible, the function retu rns an error . If Align_DMA_Buffer partially aligned the data, the functio n returns a memPageError warning indicating that a page bou[...]

  • Страница 58

    Chapte r 2 Function Re ference — AO _Calibrate © Natio nal In strume nts Corp oration 2-25 NI -DA Q FRM fo r PC Comp ati bles AO_Calibrate Format status = A O_Calibrate (deviceNumber , operation, EEPR OMloc) Purpose Loads a set of calibration con stan ts into the calibration D A C s or copies a set of calibratio n constants from one of fou r EEP[...]

  • Страница 59

    Chapter 2 Function Refere nce — AO_Calibrate NI-DAQ FRM for PC Compatibles 2-26 © Natio nal In strume nts Corp oratio n Using This Function When NI-D A Q initializes th e A T- A O-6 /10, the D A C calibration constants s tored in EEPRO Mloc 1 (user calibration area 1) provide the gain and of fset values used to ensure proper de vice operation. I[...]

  • Страница 60

    Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-27 NI -DA Q FRM fo r PC Comp ati bles AO_Change_Param eter Format status = A O_Cha ng e_Parameter (deviceNumber , chan nel, pa ramID, param V alue) Purpose Selects a specific parameter setting for the analog ou tput section o f the device or an ana[...]

  • Страница 61

    Chapter 2 Function R eference — AO_Cha nge_Para meter NI-DAQ FRM for PC Compatibles 2-28 © Natio nal In strume nts Corp oratio n Legal v alues for para mValue depend on param ID . The follo wing paragr aphs list f eatures you can conf igure along with le gal va lues for paramID with expl anations and corresp onding legal v alu es fo r paramValue[...]

  • Страница 62

    Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-29 NI -DA Q FRM fo r PC Comp ati bles For the VXI- A O-48XDC device the para mID of ND_OUTPUT_TYPE is used in conj unction with the channel v alue to select the analog output chan nel to be af fected. T o select a voltage channel, set the paramV al[...]

  • Страница 63

    Chapter 2 Function R eference — AO_Cha nge_Para meter NI-DAQ FRM for PC Compatibles 2-30 © Natio nal In strume nts Corp oratio n When using PCI E Series devices with DMA (default data transfer condition), the device has an ef fecti ve FIFO size 32 samples lar g er than the FIFO size specified f or the board. This is due to a 32- sample FIFO on t[...]

  • Страница 64

    Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-31 NI -DA Q FRM fo r PC Comp ati bles T o change the FIFO transfer cou nt, set para mID to ND_FIFO_TRAN SFER_COUNT and use paramV alue to pass in a 3 2-bit integer . Set channel to one of the chann el numbers i n your wa veform gr oup. F or exampl [...]

  • Страница 65

    Chapter 2 Function R eference — AO_Cha nge_Para meter NI-DAQ FRM for PC Compatibles 2-32 © Natio nal In strume nts Corp oratio n Output Enable On some of the de vices, you can disabl e the outp ut e v en when th e wa v eform generation is in progres s. Y ou can use this feature to b ring the ou tput to a kno wn le ve l at an y time. On D A QA rb[...]

  • Страница 66

    Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-33 NI -DA Q FRM fo r PC Comp ati bles Output Attentuation Some de vices have atten u ators after the final amplifier stage. By attenuating the outp u t signal, you do n ot lose an y dynamic range of the signal; t hat is, you d o not lose an y bits [...]

  • Страница 67

    Chapter 2 Function R eference — AO_Cha nge_Para meter NI-DAQ FRM for PC Compatibles 2-34 © Natio nal In strume nts Corp oratio n T rigger Mode Some de vices can generate the wa veforms stored in the memor y on board in dif ferent ways by setting the trigger mode parameter . The foll o wing tri gger modes are possib le on the D A QA rb 5411 de vi[...]

  • Страница 68

    Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-35 NI -DA Q FRM fo r PC Comp ati bles PLL Reference Frequency On some of the d evices, yo u can phase-lock the in ternal timebase to an ex ternal reference clock. The internal t imebase can be an integral multiple of th e external reference clock. [...]

  • Страница 69

    Chapter 2 Function R eference — AO_Cha nge_Para meter NI-DAQ FRM for PC Compatibles 2-36 © Natio nal In strume nts Corp oratio n paramV alue to 0 or 10 0. By s etting it t o 0, the S YNC ou tput go es to 0 V . If you s et it to 100, it goes to +5 V . Using This Function Use this fu nct ion t o cu sto mi ze the beha vior of the anal og ou t put s[...]

  • Страница 70

    Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-37 NI -DA Q FRM fo r PC Comp ati bles Memory T ransfer Width When doing w aveform g eneration on PCI E Series boards that use the PCI-MITE f o r DMA transfers, NI-D A Q transfers data from host memory to the D A Q device 16 bits at a time. This all[...]

  • Страница 71

    Chapter 2 Function R eference — AO_Con figure NI-DAQ FRM for PC Compatibles 2-38 © Natio nal In strume nts Corp oratio n AO_Configure Format status = A O_Configur e (deviceNumber , chan, outputP olarity , intOrExtRef, r efV oltage, updat eMode) Purpose Informs NI-D A Q of the output r ange and polarity selected for each analo g output channel on[...]

  • Страница 72

    Chapte r 2 Function Re ference — AO _Configure © Natio nal In strume nts Corp oration 2-39 NI -DA Q FRM fo r PC Comp ati bles outp utPolar ity indicates whether the analog ou tput channel is conf igured for unipolar or bipol ar oper a tio n. Fo r the A T- A O-6/10 and MIO de vices (except the MIO-16XE-50 de vices): 0: Bip olar operation (default[...]

  • Страница 73

    Chapter 2 Function R eference — AO_Con figure NI-DAQ FRM for PC Compatibles 2-40 © Natio nal In strume nts Corp oratio n If you mak e a reference vo ltage connect ion, you mu st assign ref Voltage the v a lu e o f the external reference v oltag e in a call to AO_Configure for the AO_VWrite and AO_VScale function s to operate properly . F or devi[...]

  • Страница 74

    Chapte r 2 Function Re ference — AO _Configure © Natio nal In strume nts Corp oration 2-41 NI -DA Q FRM fo r PC Comp ati bles AO_Configure store s information abou t the analog output channe l on the specified bo ard in the conf iguration table for th e analog channel. The analo g output channel conf iguration table defaults ta bles default to t[...]

  • Страница 75

    Chapter 2 Function R eference — AO_U pdate NI-DAQ FRM for PC Compatibles 2-42 © Natio nal In strume nts Corp oratio n AO_Update Format status = A O_Update (deviceNumber) Purpose Updates analog output channels on the specified de vice to ne w vo ltage v alues when the later internal update mode is enab led by a pre vious call to AO_Configure . Pa[...]

  • Страница 76

    Chapter 2 Function Reference — AO_VSc ale © Natio nal In strume nts Corp oration 2-43 NI -DA Q FRM fo r PC Comp ati bles AO_VScale Format status = A O_VScale (deviceNumber , chan, voltage, binV al) Purpose Scales a voltage to a binary v alue that, when written to one of the an alog output channels, produces the specif ied voltage. Para meters In[...]

  • Страница 77

    Chapter 2 Function Refere nce — AO_VScale NI-DAQ FRM for PC Compatibles 2-44 © Natio nal In strume nts Corp oratio n Notice that refVoltage is the v alue you specify in AO_Configure . Because you can independently configu re the analog output chan nels for range and polarity , NI-D A Q can translate the same v o ltage to different v alues for ea[...]

  • Страница 78

    Chap ter 2 Funct ion Re fere nce — AO_V Writ e © Natio nal In strume nts Corp oration 2-45 NI -DA Q FRM fo r PC Comp ati bles AO_VWrite Format status = A O_VWrite (deviceNumber , chan, voltage) Purpose Accepts a floating-point voltage v alue, scales it to the proper binary number , and writes t hat number to an analo g output or current ch annel[...]

  • Страница 79

    Chapter 2 Function R eference — AO_VWr ite NI-DAQ FRM for PC Compatibles 2-46 © Natio nal In strume nts Corp oratio n If you set the output type to current by calling AO_Change_Param eter , the floating-point v alue indicates the current in am ps. Default rang es (unipolar , internal voltage ref erence): AO-2D C devi ce: 0 t o 0.02 A VXI-AO-48 X[...]

  • Страница 80

    Chap ter 2 Funct ion Ref ere nce — AO_Wr ite © Natio nal In strume nts Corp oration 2-47 NI -DA Q FRM fo r PC Comp ati bles AO_Write Format status = A O_Write (deviceNumber , chan, value) Purpose Writes a binary v alue to one of the analog output chan nels, changing the v o ltage pro duced at the channel. Para meters Input Para meter Discussion [...]

  • Страница 81

    Chapter 2 Function R eference — AO_Wr ite NI-DAQ FRM for PC Compatibles 2-48 © Natio nal In strume nts Corp oratio n Not e Some inaccuracy results when you use AO_Write on th e VXI-A O -48XDC, because this device w orks with a larger analog output resolution than can be represe nted by th e 16-bit value parame te r . val u e r epr esent s the mo[...]

  • Страница 82

    Chapter 2 Function R eference — Calibr ate_1200 © Natio nal In strume nts Corp oration 2-49 NI -DA Q FRM fo r PC Comp ati bles Calibrate_12 00 Format status = Calibrate_1200 (de vice, calOP , sa veNewCal, EEPR OMloc, calRefChan, gr ndRefChan, D A C 0chan, D AC1chan, ca lRefV olts, gain) Purpose The 1200 and 1200AI de vices come fully equipped wi[...]

  • Страница 83

    Chapter 2 Function R eference — Calibr ate_1200 NI-DAQ FRM for PC Compatibles 2-50 © Natio nal In strume nts Corp oratio n Caution R ead the calibration chapter in your device u ser manual before using Calibrate_1200 . Para meters Input Para meter Discussion calOP determines the operation to b e perform e d. 1: Load calibration constants from EE[...]

  • Страница 84

    Chapter 2 Function R eference — Calibr ate_1200 © Natio nal In strume nts Corp oration 2-51 NI -DA Q FRM fo r PC Comp ati bles obtained du ring the pr ocess remain in use by the DACs until the device i s initialized again. Not e The ADC mus t be in ref erenced single-ended and bipola r mode and ful ly calibrated (using calOP = 2) f or successful[...]

  • Страница 85

    Chapter 2 Function R eference — Calibr ate_1200 NI-DAQ FRM for PC Compatibles 2-52 © Natio nal In strume nts Corp oratio n sav eNewC al is v alid on ly when calOP i s 2 or 3. 0: Do not save new cali bration cons tants. Even though th ey are not p ermanently saved in the EEPROM, calibr ation constants created after a successful calibration remain[...]

  • Страница 86

    Chapter 2 Function R eference — Calibr ate_1200 © Natio nal In strume nts Corp oration 2-53 NI -DA Q FRM fo r PC Comp ati bles DAC1chan is the analog input ch annel connected to D A C1 when calOP is 3. Range: 0 through 7 . calRefVolts is the v alue of the DC calibr ation voltage con nected to calRefChan when calOP = 2. Not e If you a re ca libra[...]

  • Страница 87

    Chapter 2 Function R eference — Calibr ate_1200 NI-DAQ FRM for PC Compatibles 2-54 © Natio nal In strume nts Corp oratio n Next call this function again; for e xample: status = Calibrate_1200 (device, 5, 0, EEPROMloc, 0, 0, 0, 0, 0, 0) where the device and EEPR OMloc are the same as in the first function call. NI-D A Q automatically mod ifies th[...]

  • Страница 88

    Chapter 2 Function Refe rence — Calibrate _DSA © Natio nal In strume nts Corp oration 2-55 NI -DA Q FRM fo r PC Comp ati bles Calibrate_DSA Format status = Calibrate_ DSA (deviceNumbe r , operation, r efV oltage) Purpose Use this function to calibrate your DSA device. Para meters Input Para meter Discussion The leg al range for oper ation is gi [...]

  • Страница 89

    Chapter 2 Fun ction Reference — Calibrate_DSA NI-DAQ FRM for PC Compatibles 2-56 © Natio nal In strume nts Corp oratio n Using This Function Y our de vice contains calibration D/A con verters (calD ACs) that are u sed for f ine-tuning the analog cir cuitry . The calD A Cs must b e programmed ( loaded) with certain num bers called calibration con[...]

  • Страница 90

    Chapter 2 Function Refe rence — Calibrate _DSA © Natio nal In strume nts Corp oration 2-57 NI -DA Q FRM fo r PC Comp ati bles Restoring Factory Calibration T o restore the factory v alue of the internal reference voltage af ter an e xt ernal calibration, set operation to ND_RESTORE_FACTORY_CALIBRATION. Y ou might w ant to do so if yo u made a mi[...]

  • Страница 91

    Chapter 2 Function R eference — Calibr ate_E_Series NI-DAQ FRM for PC Compatibles 2-58 © Natio nal In strume nts Corp oratio n Calibrate_E_ Series Format status = Calibrate_E_Series (deviceNumber , calOP , setOfCalConst, calRefV olts) Purpose Use this function to c alibrate yo ur E Series de vice and to select a set of calibration con stants to [...]

  • Страница 92

    Chapter 2 Funct ion Refere nce — Calibrat e_E_Series © Natio nal In strume nts Corp oration 2-59 NI -DA Q FRM fo r PC Comp ati bles setOfCalCons t selects the set of calibration constants to be used by NI- D A Q. These calibration constants reside in the onboard EEPR OM or are maintained by NI-D A Q. Range: ND_FACTORY_EEPROM_AREA : Factor y cali[...]

  • Страница 93

    Chapter 2 Function R eference — Calibr ate_E_Series NI-DAQ FRM for PC Compatibles 2-60 © Natio nal In strume nts Corp oratio n the default load area is the area that contains the calibration constants obtained b y calibrating the de vice in the factory . NI-D A Q auto matically loads th e rele vant calibration constants sto red in the load area [...]

  • Страница 94

    Chapter 2 Funct ion Refere nce — Calibrat e_E_Series © Natio nal In strume nts Corp oration 2-61 NI -DA Q FRM fo r PC Comp ati bles Exam ple: Y ou w ant to perf orm self-calibrat ion of y our de vice and you w ant to store th e new s et of calibration const ants in the us er area of the EEPROM. Y o u should m ake the follo wing call: Calibrate_E[...]

  • Страница 95

    Chapter 2 Function R eference — Calibr ate_E_Series NI-DAQ FRM for PC Compatibles 2-62 © Natio nal In strume nts Corp oratio n Calibration Constant Loading by NI-DAQ NI-D A Q automatically loads calibration constants into calD A Cs whene ver you call functions that depend on them ( AI , AO , DAQ , SCAN , and WFM functions). Th e follo wing condi[...]

  • Страница 96

    Chapter 2 Funct ion Refere nce — Config_Ala rm_Dea dban d © Natio nal In strume nts Corp oration 2-63 NI -DA Q FRM fo r PC Comp ati bles Config_Alarm_De adband Format status = Co nfig_Alarm _Deadban d (deviceNumber , mode, chanS tr , trigLevel, deadbandWidth, handle, al armOnMessage, alarmOffMessa ge, callbackAddr) Purpose Notifi es NI-D A Q app[...]

  • Страница 97

    Chapter 2 Function R eference — Con fig_Alarm_D eadban d NI-DAQ FRM for PC Compatibles 2-64 © Natio nal In strume nts Corp oratio n The channel s tring has one of the fol lo w ing formats : xn SCn!MDn!CHn AMn!n where x: AI for analog input cha nnel. n: Analog channel, dig ital port, SCXI chassis, SCXI module number, or AMUX-64T device n umber. S[...]

  • Страница 98

    Chapter 2 Funct ion Refere nce — Config_Ala rm_Dea dban d © Natio nal In strume nts Corp oration 2-65 NI -DA Q FRM fo r PC Comp ati bles alar mOnM essag e and al armOffMessa ge are messages you define. W hen the alarm-on condition occurs , NI-D A Q p a ss es alarm OnMes sage back to you. Similarly , when the alarm-of f condition occurs, NI-D A Q[...]

  • Страница 99

    Chapter 2 Function R eference — Con fig_Alarm_D eadban d NI-DAQ FRM for PC Compatibles 2-66 © Natio nal In strume nts Corp oratio n Figu re 2- 2. Low Alar m Dead band Config_Alarm_Deadband is a high-le vel function fo r NI-D A Q event messaging. B ecause this function u ses the current inputRan ge and polari ty settings to translate triglevel an[...]

  • Страница 100

    Chap ter 2 Funct ion Refer enc e — Config _A T rig_Event _Mess age © Natio nal In strume nts Corp oration 2-67 NI -DA Q FRM fo r PC Comp ati bles Config_A T rig_ Event_Messa ge Format statu s = Config_A T rig_E vent_M essag e (deviceN umber , mode , chanSt r , trigL evel, window Size, trigSlope, trigSki pCount, pretrigScans, postT rig Scans, han[...]

  • Страница 101

    Chapter 2 Function R eference — Con fig_A T rig _Event_M essa ge NI-DAQ FRM for PC Compatibles 2-68 © Natio nal In strume nts Corp oratio n chanStr is a string descr iption of the t rigger analog channel or di gital port. The channel s tring has one of the fol lo w ing formats : xn SCn!MDn!CHn AMn!n where x : AI for analog input channel. n : Ana[...]

  • Страница 102

    Chap ter 2 Funct ion Refer enc e — Config _A T rig_Event _Mess age © Natio nal In strume nts Corp oration 2-69 NI -DA Q FRM fo r PC Comp ati bles windowSize is the nu m ber of volts belo w trigL eve l for positi ve slope or abo ve the analog trigger lev el for negativ e slope that the input s ignal must go before NI-DA Q recognizes a valid trigg[...]

  • Страница 103

    Chapter 2 Function R eference — Con fig_A T rig _Event_M essa ge NI-DAQ FRM for PC Compatibles 2-70 © Natio nal In strume nts Corp oratio n Figu re 2-3 . Analog T ri gger Event Config_ATrig_Event_Message is a high-le vel fun ction for NI-D A Q ev ent messaging. Because this function uses the curren t in putRange and polari ty settings to trans l[...]

  • Страница 104

    Chapter 2 Funct ion Refere nce — Config_D AQ_Eve nt_Mes sage © Natio nal In strume nts Corp oration 2-71 NI -DA Q FRM fo r PC Comp ati bles Confi g_DAQ _Even t_Mes sage Format statu s = Config_DA Q_E vent_M e ssage (deviceN u mber , mode, ch anStr , DA QE vent, D A Q T r i gV al0, DA QT rigV al1, t rigSkip Count , preT rig Scans, postT r i gScan[...]

  • Страница 105

    Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-72 © Natio nal In strume nts Corp oratio n Para meter Discussion mode indicates whether to add a new message, remo ve an old message, or clear all messages associated with the gi ven de vice. 0: Clear all messages associated with the device including mes[...]

  • Страница 106

    Chapter 2 Funct ion Refere nce — Config_D AQ_Eve nt_Mes sage © Natio nal In strume nts Corp oration 2-73 NI -DA Q FRM fo r PC Comp ati bles The follo wi ng string specifies SCXI channel 1 in SCXI module 2 of SCXI chassis 4 as the trigger channel: SC4!MD2!CH1 The follo wing specifies AMUX chann el 34 on the AMUX-64T device 1 as the trigger channe[...]

  • Страница 107

    Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-74 © Natio nal In strume nts Corp oratio n Table 2 -17. D AQEvent Mes sages DAQ E v e n t Ty p e Code Description of M essage Usable Dev ices <Usable Operation Families> Acquire or gener ate N scans 0 Send ex actly one message when an asynchr onous[...]

  • Страница 108

    Chapter 2 Funct ion Refere nce — Config_D AQ_Eve nt_Mes sage © Natio nal In strume nts Corp oration 2-75 NI -DA Q FRM fo r PC Comp ati bles Compl e te d opera tion or stopped b y error 2 Send ex actly one message when an asynchr onous operation completes or is stopped f or an error . chanStr indicates the type of channel or port, b u t the actua[...]

  • Страница 109

    Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-76 © Natio nal In strume nts Corp oratio n Analog positive slope triggering 5 Send a message when dat a from any chann el in chanStr positively triggers on the hyster esis wind ow specified by DAQTrigVal0 and DAQTrigVal1 , where DAQTrigVal0 ≥ DAQTrigVa[...]

  • Страница 110

    Chapter 2 Funct ion Refere nce — Config_D AQ_Eve nt_Mes sage © Natio nal In strume nts Corp oration 2-77 NI -DA Q FRM fo r PC Comp ati bles DAQEvent =3 through 8—These DAQEvents are fo r i nterrupt-dr i ven data acqu isition on ly . See Set_DAQ_Device_Info for switching between in t errup t -dr i ven and DMA-dri ven data acquisitio n. If you a[...]

  • Страница 111

    Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-78 © Natio nal In strume nts Corp oratio n using. The PC-TIO-10 can hav e two of these e vent messages conf igured at the same time, therefor e you must s pecify which pin you wan t to use on the PC-TIO-1 0 with the DAQTrigVal0 para meter . To u s e DAQE[...]

  • Страница 112

    Ch apt er 2 Functio n Reference — Config_DAQ_Event_Message © National Instruments Corporat ion 2-79 NI- DA Q FR M fo r PC C om pa t ib l es Table 2-19 . Usable Para meters for Different DAQ Events Codes Para meter DA QEvent 0 1 2 3 4 5 6 7 8 9 chanSt r (where n and m are numbers) AI n , DI n , DO n , SC n !..., AM n ! m, AO n AI n , DI n , DO n [...]

  • Страница 113

    Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-80 © Natio nal In strume nts Corp oratio n For the parameters that are ignored, set them to 0. For DAQEvent = 1, DAQTrigVal0 must be greater than zero. If y ou are using DMA with double b uf fer s or a pretri gger d ata acq uisitio n, DAQTrigVal0 must be[...]

  • Страница 114

    Chapter 2 Funct ion Refere nce — Config_D AQ_Eve nt_Mes sage © Natio nal In strume nts Corp oration 2-81 NI -DA Q FRM fo r PC Comp ati bles Event notif ication is d one through the Windo ws AP I function PostMessage an d/or a callback fu nction th at you def ine. When any trigger e vent hap pens, NI-D A Q calls PostMessage as follows: int PostMe[...]

  • Страница 115

    Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-82 © Natio nal In strume nts Corp oratio n default: // handle other usual messages... return DefWindowProc (hWnd, uMsgId, w Param, lParam); } } Callback Functions T o enable the callback function , you need to pro vide the address of the callback routine[...]

  • Страница 116

    Chap ter 2 Funct ion Re fere nce — Conf igur e_HW_ Analo g_T rigge r © Natio nal In strume nts Corp oration 2-83 NI -DA Q FRM fo r PC Comp ati bles Configure _HW_Analog_T rig ger Format status = Co nfigure_HW_Analo g_ T rigg er (deviceNumber , o nOrOff, lowV a lue, highV alue, mode, trigSource) Purpose Conf ig ures the ha rdware an alog tr igger[...]

  • Страница 117

    Chapter 2 Function R eference — Con figure_HW _Analog_T rigg er NI-DAQ FRM for PC Compatibles 2-84 © Natio nal In strume nts Corp oratio n lowVal ue and highValue s pecify the levels yo u want to use for triggering. For E Series de vices, the le gal range for th e two v alues i s 0 to 255 (0–4,095 for 16-bi t boards). In addi tion, lowVal ue m[...]

  • Страница 118

    Chap ter 2 Funct ion Re fere nce — Conf igur e_HW_ Analo g_T rigge r © Natio nal In strume nts Corp oration 2-85 NI -DA Q FRM fo r PC Comp ati bles • ND_BELOW_LOW_LEVEL —The trigger is generated when the signal value is less than th e lowValue . highValue is unused. Figu re 2-4. ND_BEL OW_LOW _LEVEL • ND_ABOVE_HIGH_LEVEL —The trigger is [...]

  • Страница 119

    Chapter 2 Function R eference — Con figure_HW _Analog_T rigg er NI-DAQ FRM for PC Compatibles 2-86 © Natio nal In strume nts Corp oratio n • ND_HIGH_HYSTERESIS —The trigger is generated when the signal v alue is greater than the highVa lue , with hys teresis speci fied by lowValue . Figu re 2-7. ND_HIGH_ HYSTERESIS • ND_LOW_HYSTERESIS —T[...]

  • Страница 120

    Chap ter 2 Funct ion Re fere nce — Conf igur e_HW_ Analo g_T rigge r © Natio nal In strume nts Corp oration 2-87 NI -DA Q FRM fo r PC Comp ati bles If you s et trigSource to ND_THE_AI_CHANNEL , you can use the sign al connected to one of the analog input pins for trig gerin g. In this case, the signal is ampl ified on the device before it is use[...]

  • Страница 121

    Chapter 2 Function R eference — Con figure_HW _Analog_T rigg er NI-DAQ FRM for PC Compatibles 2-88 © Natio nal In strume nts Corp oratio n For e xample, if you set source to ND_THE_AI_ CHANNEL , the channel you are interested in is in bipolar m ode, you w ant a gain of 100, and you w ant to set the v oltage windo w for trigger ing to +35 mV and [...]

  • Страница 122

    Chap ter 2 Funct ion Re fere nce — Conf igur e_HW_ Analo g_T rigge r © Natio nal In strume nts Corp oration 2-89 NI -DA Q FRM fo r PC Comp ati bles If you apply any of the formulas and get a value equ al to 256, use the value 255 instead; if you get 4,0 96 with th e 16-bit b o ards, use 4,095 in stead. Y ou can us e the follo wing programming s [...]

  • Страница 123

    Chapter 2 Function R eference — CTR_Co nfig NI-DAQ FRM for PC Compatibles 2-90 © Natio nal In strume nts Corp oratio n CTR_Config Format status = CTR_Conf ig (deviceNumber , ctr , edgeMode, gateMode, outT ype, outPolarit y) Purpose Specifi es the counting conf iguration to use for a coun ter . Para meters Input Para meter Discussion ctr is the c[...]

  • Страница 124

    Chapter 2 Func tion Reference — CTR_Config © Natio nal In strume nts Corp oration 2-91 NI -DA Q FRM fo r PC Comp ati bles 6: Active high on gate o f next high er-order coun ter. 7: Active high on gate of nex t lower-order counter. 8: Special gating. outT ype selects which ty pe of output is to be generated b y the counter . The co unters generat[...]

  • Страница 125

    Chapter 2 Function R eference — CTR_E vCount NI-DAQ FRM for PC Compatibles 2-92 © Natio nal In strume nts Corp oratio n CTR_EvCount Format sta tus = CTR _EvC ount (de viceN umbe r , ctr , ti meba se, cont) Purpose Conf igures the specif ied counte r for an e vent-counting operation and starts the coun ter . Para meters Input Para meter Discussio[...]

  • Страница 126

    Chapte r 2 Functio n Refe rence — CTR_EvCou nt © Natio nal In strume nts Corp oration 2-93 NI -DA Q FRM fo r PC Comp ati bles 10: SOURCE5 used as timebase if 1 ≤ ctr ≤ 5 or SOURCE 10 used as timebase if 6 ≤ ctr ≤ 10. 11: GATE 1 used as timebas e if 1 ≤ ctr ≤ 5 or GATE6 used as timebase if 6 ≤ ctr ≤ 10. 12: GATE 2 used as timebas [...]

  • Страница 127

    Chapter 2 Function R eference — CTR_E vRead NI-DAQ FRM for PC Compatibles 2-94 © Natio nal In strume nts Corp oratio n CTR_EvRead Format statu s = CTR _EvR ead (d eviceNu mber , c t r , overflow, count) Purpose Reads the current counter tot al without dis turbing the counting process and returns the count and overflo w con ditions. Para meters I[...]

  • Страница 128

    Chapte r 2 Function R efere nce — CTR_ EvRea d © Natio nal In strume nts Corp oration 2-95 NI -DA Q FRM fo r PC Comp ati bles Using This Function CTR_EvRead reads the current v alue of the counter without distur bing the counting pro cess and returns the v alue in co unt . CTR_EvRead also performs ov erflow detect ion and returns the over f l ow[...]

  • Страница 129

    Chapter 2 Function R eference — CTR_F OUT_Con fig NI-DAQ FRM for PC Compatibles 2-96 © Natio nal In strume nts Corp oratio n CTR_FOUT_C onfig Format status = CTR_ FOUT_Config (deviceNumber , FOUT_ port, mode, timebase, divis io n) Purpose Disables or enables and sets the frequ ency of the 4-bit program mable fr equency output. Para meters Input [...]

  • Страница 130

    Chap ter 2 F unctio n Refere nce — CTR _FOUT_ Config © Natio nal In strume nts Corp oration 2-97 NI -DA Q FRM fo r PC Comp ati bles 4: Internal 1 kHz clock used as timebase (1 ms resolution ). 5: Internal 100 Hz clock used as timebase ( 10 ms resolution) . 6: SOURCE 1 use d as t ime base if FOUT_port = 1 or SOURCE 6 used as timebase if FOUT_port[...]

  • Страница 131

    Chapter 2 Function R eference — CTR_Pe riod NI-DAQ FRM for PC Compatibles 2-98 © Natio nal In strume nts Corp oratio n CTR_Period Format status = CTR_Perio d (deviceNumber , ctr , timebase) Purpose Conf igures the specif ied counte r for period or p ulse-width measurement. Para meters Input Para meter Discussion ctr is the counter numb er . Rang[...]

  • Страница 132

    Chap ter 2 Funct ion Ref ere nce — CTR_P eri od © Natio nal In strume nts Corp oration 2-99 NI -DA Q FRM fo r PC Comp ati bles 10: SOURCE5 used as timebase if 1 ≤ ctr ≤ 5 or SOURCE 10 used as timebase if 6 ≤ ctr ≤ 10. 11: GATE 1 used as timebas e if 1 ≤ ctr ≤ 5 or GATE6 used as timebase if 6 ≤ ctr ≤ 10. 12: GATE 2 used as timebas[...]

  • Страница 133

    Chapter 2 Function R eference — CTR_Pu lse NI-DAQ FRM f or PC Compatibles 2-100 © Natio nal In strume nts Corp oratio n CTR_Pulse Format status = CTR_Pulse (deviceNumber , ctr , timebase, delay , pulseWidth) Purpose Causes the specif ied counter to generate a specif ied pulse-programmable delay and pu lse width. Para meters Input Para meter Disc[...]

  • Страница 134

    Chap ter 2 Funct ion Re fere nce — CTR_ Puls e © National In strum ents Corp oration 2-101 N I-DA Q FRM fo r PC Compatibles 8: SOURCE3 used as timebase if 1 ≤ ctr ≤ 5 or SOURCE 8 used as timebase if 6 ≤ ctr ≤ 10. 9: SOURCE4 used as timebase if 1 ≤ ctr ≤ 5 or SOURCE 9 used as timebase if 6 ≤ ctr ≤ 10. 10: SOURCE5 used as timebase [...]

  • Страница 135

    Chapter 2 Function R eference — CTR_Pu lse NI-DAQ FRM f or PC Compatibles 2-102 © Natio nal In strume nts Corp oratio n Pulse Generation Timing Considerations Figure 2-9 sho ws pulse generati on timin g for both the TC toggled output and TC pulse output cases. These signals are positiv e polarity output signals. Figur e 2-9. Pul se G enerat ion [...]

  • Страница 136

    Chap ter 2 Funct ion Re fere nce — CTR_ Puls e © National In strum ents Corp oration 2-103 N I-DA Q FRM fo r PC Compatibles pulseWidth = 0 generates a special case signal as sho wn in Figure 2 -10. Figur e 2-10. Pulse Tim ing for pu lseWi dth = 0 0 < sync period < 1 1 T imebase Starting Signal TC T oggle Output TC Pulse Output 1 units = ti[...]

  • Страница 137

    Chapter 2 Function R eferenc e — CTR_Ra te NI-DAQ FRM f or PC Compatibles 2-104 © Natio nal In strume nts Corp oratio n CTR_Rate Format status = CTR_ Rate (freq, duty , timebase, period1 , perio d2) Purpose Con verts frequenc y and duty-c ycle v alues of a selected square wa ve into the timebase and period parameters n eeded for inpu t to the CT[...]

  • Страница 138

    Chapte r 2 Function Refe rence — CTR_Rat e © National In strum ents Corp oration 2-105 N I-DA Q FRM fo r PC Compatibles 3: 100 µs. 4: 1 ms. 5: 10 ms. period1 and period2 represent the number of units of time (selected by tim ebase ) that the square wa ve is high and low , respecti vely . The roles of period1 and period2 ar e rev ersed if the ou[...]

  • Страница 139

    Chapter 2 Function R eferenc e — CTR_Re set NI-DAQ FRM f or PC Compatibles 2-106 © Natio nal In strume nts Corp oratio n CTR_Reset Format status = CTR_Reset (deviceNumber , ctr , output) Purpose T urns of f the specif ied counter operation and places the co unter output dri vers in the selected output st ate. Para meters Input Para meter Discuss[...]

  • Страница 140

    Chapter 2 Function R eference — CTR_R estart © National In strum ents Corp oration 2-107 N I-DA Q FRM fo r PC Compatibles CTR_Restart Format status = CTR_Restart (deviceNumber , ctr) Purpose Restarts operation of the specified cou nter . Para meters Input Para meter Discussion ctr is the counter numb er . Range: 1, 2, or 5 for an MIO d evice exc[...]

  • Страница 141

    Chapter 2 Function Refere nce — CTR_Simul_Op NI-DAQ FRM f or PC Compatibles 2-108 © Natio nal In strume nts Corp oratio n CTR_Simul_Op Format status = CT R_ Simul_Op (deviceNumber , nu mCtrs, ctrLis t, mode) Purpose Configures and si multan eously s tarts an d stops m u ltiple counters . Para meters Input Para meter Discussion numCtrs is the num[...]

  • Страница 142

    Chapte r 2 Function Re ference — CT R_Simu l_Op © National In strum ents Corp oration 2-109 N I-DA Q FRM fo r PC Compatibles Not e It is not necessary to ca ll CTR_Simul_Op with mode set to 1 before calling CTR_Simul_Op with mode set to 4 . That is, it is permiss ible to sta rt two or more counters at diff erent times a nd still latch their cou [...]

  • Страница 143

    Chapter 2 Function R eference — CTR_Sq uare NI-DAQ FRM f or PC Compatibles 2-110 © Natio nal In strume nts Corp oratio n CTR_Square Format status = CTR_ Square (deviceNumber , ctr , timebase, perio d1 , perio d2) Purpose Causes the specif ied counter to generate a continuo us square wa ve outp ut of specif i ed duty cycle and frequency . Para me[...]

  • Страница 144

    Chapte r 2 Function R eferenc e — CT R_Square © National In strum ents Corp oration 2-111 N I-DA Q FRM fo r PC Compatibles 8: SOURCE3 used as timebase if 1 ≤ ctr v 5 or SOURCE 8 used as timebase if 6 ≤ ctr ≤ 10. 9: SOURCE4 used as timebase if 1 ≤ ctr ≤ 5 or SOURCE 9 used as timebase if 6 ≤ ctr ≤ 10. 10: SOURCE5 used as timebase if [...]

  • Страница 145

    Chapter 2 Function R eference — CTR_Sq uare NI-DAQ FRM f or PC Compatibles 2-112 © Natio nal In strume nts Corp oratio n When you use special g ating ( gateMode = 8), yo u can achiev e gate-controlled pulse generation. When th e gate input is high, NI-D A Q uses period1 to gen erate the pu lses. When the gate input is low , NI-DA Q uses period2 [...]

  • Страница 146

    Chap ter 2 Funct ion Ref ere nce — CTR_S tate © National In strum ents Corp oration 2-113 N I-DA Q FRM fo r PC Compatibles CTR_State Format status = CTR_State (dev iceNumber , ctr , outState) Purpose Returns the OUT logic le vel of the specif ied counter . Para meters Input Output Para meter Discussion ctr is the counter numb er . Range: 1, 2, o[...]

  • Страница 147

    Chapter 2 Function R eference — CTR_St op NI-DAQ FRM f or PC Compatibles 2-114 © Natio nal In strume nts Corp oratio n CTR_Stop Format status = CTR_Stop (deviceNumber , ctr) Purpose Suspends operation o f the specifi ed counter so that you can restart the coun ter operation. Para meters Input Para meter Discussion ctr is the counter numb er . Ra[...]

  • Страница 148

    Chapter 2 Function Refer ence — DAQ_ Check © National In strum ents Corp oration 2-115 N I-DA Q FRM fo r PC Compatibles DAQ_Check Format sta tus = D A Q_Che ck ( de viceN umbe r , da qSto pped , r etriev ed) Purpose Checks whether the current D A Q operation is complete and returns the status and the number of samples acquired to th at point. Pa[...]

  • Страница 149

    Chapter 2 Function R eferenc e — DAQ_ Check NI-DAQ FRM f or PC Compatibles 2-116 © Natio nal In strume nts Corp oratio n automatically rearranges the array upon completion of the acquisition so that the oldest data point is at the beginning of the array . Thus, retrieved alwa ys equals 0 upon comp letion o f a pretrigger mode acquisitio n. Not e[...]

  • Страница 150

    Chapter 2 Function R eference — DA Q_Clear © National In strum ents Corp oration 2-117 N I-DA Q FRM fo r PC Compatibles DAQ_Clear Format status = D AQ_Clear (de viceNu mber) Purpose Cancels the current D A Q operation (both single-channel and multiple-chann el scanned) and reinitializes the D A Q circuitry . Para meters Input Using This Function[...]

  • Страница 151

    Chapter 2 Function R eference — DA Q_Config NI-DAQ FRM f or PC Compatibles 2-118 © Natio nal In strume nts Corp oratio n DAQ_Config Format status = D AQ _Conf ig (de viceNumber , startT rig, extCon v) Purpose Stores co nfi guratio n inform ation for s ubsequent D A Q operations. Para meters Input Para meter Discussion startTrig indicates whether[...]

  • Страница 152

    Chapter 2 Function Re ference — DAQ_Conf ig © National In strum ents Corp oration 2-119 N I-DA Q FRM fo r PC Compatibles Using This Function DAQ_Config sav es th e param eters in the configuration table for futu re data acq uisition. DAQ_Start and SCAN_Start use the configuration table to set the D A Q circuitry to the correct timing modes. If b[...]

  • Страница 153

    Chapter 2 Function R eference — DA Q_Config NI-DAQ FRM f or PC Compatibles 2-120 © Natio nal In strume nts Corp oratio n Not e (PCI -6110E and PCI-611 1E only) The only allo wed val ues for extCon v ar e 0 and 2. The con versions occur simultaneously for all c hannels and are controlled by the scan interval . The DSA de vices cannot use e xterna[...]

  • Страница 154

    Chap ter 2 Function Re ferenc e — DAQ_DB_ Config © National In strum ents Corp oration 2-121 N I-DA Q FRM fo r PC Compatibles DAQ_DB_Config Format status = DA Q_DB_C onfig (dev iceNumber , DBmo de) Purpose Enables or disables double-b uffered D A Q operations. Para meters Input Para meter Discussion DBmo de indicates whethe r to en able or disab[...]

  • Страница 155

    Chapter 2 Function R eferenc e — DAQ_ DB_HalfR eady NI-DAQ FRM f or PC Compatibles 2-122 © Natio nal In strume nts Corp oratio n DAQ_DB_Hal fReady Format status = DA Q_DB_Ha lfReady (deviceNum ber , ha lf Rea dy , daqSto pped) Purpose Checks whether the next half b uffer of data is a v ailable during a dou ble-bu ffered data acquisition. Y o u c[...]

  • Страница 156

    Chap ter 2 Functio n Refe rence — DAQ_D B_Ha lfRea dy © National In strum ents Corp oration 2-123 N I-DA Q FRM fo r PC Compatibles Using This Function Double-b uf fered data acquisition cy clically fills a b uffer with acquired d ata. The bu ffer is divided into two equal halves so that NI-D A Q can sav e data from one half wh ile filling the ot[...]

  • Страница 157

    Chapter 2 Function R eferenc e — DAQ_ DB_T rans fer NI-DAQ FRM f or PC Compatibles 2-124 © Natio nal In strume nts Corp oratio n DAQ_DB_T ra nsfer Format status = D AQ_DB_T ransfer (deviceNumber , halfBuffer , ptsTfr , daqStopp ed) Purpose T ransfers half of the data from the b uffer being u sed for double-b uf fered data acquisition to another [...]

  • Страница 158

    Chap ter 2 F unctio n Refere nce — DAQ_D B_T ra nsfer © National In strum ents Corp oration 2-125 N I-DA Q FRM fo r PC Compatibles after the acquisitio n has stop ped, the last trans fer of data to halfBuffer contai ns the numbe r of v al id points from the half of the circular b uffer wher e acquisition stopped. daqStopped is a v alid output p [...]

  • Страница 159

    Chapter 2 Function R eferenc e — DAQ_ Monitor NI-DAQ FRM f or PC Compatibles 2-126 © Natio nal In strume nts Corp oratio n DAQ_Monitor Format status = D AQ_Monitor (de viceNumber , channel, sequential, numPts, monitorBuffer , newestPtIndex, daqS topped) Purpose Returns data from an asyn ch ronous data acquisitio n in progress. Durin g a multiple[...]

  • Страница 160

    Chapter 2 Function R eferenc e — DAQ_Mo nitor © National In strum ents Corp oration 2-127 N I-DA Q FRM fo r PC Compatibles in Lab_ISCAN_Start . If you are using an AMUX-64T , channel can be equal to an y one of the AMUX-64T channels. Range: –1 for data fr om all channel s being sampl ed. n where n is on e of the ch annels being s ampled. seque[...]

  • Страница 161

    Chapter 2 Function R eferenc e — DAQ_ Monitor NI-DAQ FRM f or PC Compatibles 2-128 © Natio nal In strume nts Corp oratio n Using This Function DAQ_Monitor is i ntended to r eturn small blocks o f data from a back ground acquisition operation. This is especially useful when y ou ha ve put the acquisition in a circular mode by enabling either the [...]

  • Страница 162

    Chapte r 2 Functio n Refe rence — DAQ_Op © National In strum ents Corp oration 2-129 N I-DA Q FRM fo r PC Compatibles DAQ_Op Format status = D AQ_Op (de vi ceNumb er , chan, gain, buffer , count, sampleRate) Purpose Performs a synchronou s, sing le-channel D A Q operation. DAQ_Op does not return until NI-D A Q has acquired all the data or an acq[...]

  • Страница 163

    Chapter 2 Function R eferenc e — DAQ_ Op NI-DAQ FRM f or PC Compatibles 2-130 © Natio nal In strume nts Corp oratio n in valid gain, NI-D A Q w ill return an error . NI-D AQ ignores gain for 516 and LPM de vices and the D A QCard-500/7 00. buffer is an integer array . buffe r has a length equal to or greater than count . When DAQ_O p returns wit[...]

  • Страница 164

    Chapte r 2 Functio n Refe rence — DAQ_Op © National In strum ents Corp oration 2-131 N I-DA Q FRM fo r PC Compatibles Again, if you do not apply t he stop tr igger , DAQ_Op does not retu rn con tro l to your application. In an y case, you can use Timeout_Config to establish a m aximum length of time for DAQ_Op to ex ecu te.[...]

  • Страница 165

    Chapter 2 Funct ion Refere nce — DA Q_Rate NI-DAQ FRM f or PC Compatibles 2-132 © Natio nal In strume nts Corp oratio n DAQ_Rate Format status = DA Q_Ra te (rate, un its, timeba se, samp leIn terval) Purpose Con ver ts a D A Q rate into the timebase and sample-interv al v alues needed to produce the rate you want. Para meters Input Output Para m[...]

  • Страница 166

    Chap ter 2 Funct ion Re ferenc e — DAQ_R ate © National In strum ents Corp oration 2-133 N I-DA Q FRM fo r PC Compatibles 1: 1 µs. 2: 10 µs. 3: 100 µs. 4: 1 ms. 5: 10 ms. sampleInt erval is the number of timebase units that elapse between consecuti ve A/D con versions. The combination of the timebase resolution v alue and the sampleInterv al [...]

  • Страница 167

    Chapter 2 Function R eference — DA Q_Set_Cloc k NI-DAQ FRM f or PC Compatibles 2-134 © Natio nal In strume nts Corp oratio n DAQ_Set_Clock Format D AQ_Set_Clock (deviceNumber , g roup, whichClock, desiredRate, units, actualRat e ) Purpose Sets the scan rate for a group of ch annels (DSA de vices only) . Input Output Para meter Discussion whichCl[...]

  • Страница 168

    Chap ter 2 Funct ion Ref ere nce — DAQ_S et_Cl ock © National In strum ents Corp oration 2-135 N I-DA Q FRM fo r PC Compatibles Using This Function DAQ_Set_Clock sets the specif ied clock rate for the nex t acquisition operation. Be sure to call DAQ_Set_Clock be fore DAQ_Start or SCAN_Start . When calling thos e functions, the timebase and inter[...]

  • Страница 169

    Chapter 2 Function R eferenc e — DAQ_ Start NI-DAQ FRM f or PC Compatibles 2-136 © Natio nal In strume nts Corp oratio n DAQ_Start Format status = D A Q_Start (deviceNumber , chan, g ain, buffer , count, tim ebase, sampInter val) Purpose Initiates an asynchronous, single-ch annel D A Q operation and stores its input in an array . Input Output Pa[...]

  • Страница 170

    Chap ter 2 Funct ion Refer enc e — DAQ_Star t © National In strum ents Corp oration 2-137 N I-DA Q FRM fo r PC Compatibles buffer is an integer array . buffer must have a length equal to or greater th an count . The elements of buffer are the results of each A/D con version in the D A Q op eration. This b uffer is often referr ed to as the acqui[...]

  • Страница 171

    Chapter 2 Function R eferenc e — DAQ_ Start NI-DAQ FRM f or PC Compatibles 2-138 © Natio nal In strume nts Corp oratio n If you use ex ternal con version pulses, NI-D A Q ignores the timebase parameter and y ou can set it to any v a lu e. Fo r DSA de vices, timebase is ignored. Use DAQ_Set_Clock to set the sampling rate. sampInterva l indicates [...]

  • Страница 172

    Chap ter 2 Funct ion Refer enc e — DAQ_Star t © National In strum ents Corp oration 2-139 N I-DA Q FRM fo r PC Compatibles Not e Y ou need to apply a trigger that you select through the Select_Signal or DAQ_Config functions to initiate d ata acquisitio n. B e aware that if you do not apply t he star t trigg er , DAQ_Op does not retu rn control t[...]

  • Страница 173

    Chapter 2 Function R eference — DA Q_StopT rig ger_Con fig NI-DAQ FRM f or PC Compatibles 2-140 © Natio nal In strume nts Corp oratio n DAQ_StopT rigg er_Config Format status = D AQ _StopT rigger_Config (de viceN umb er , stopT rig, ptsAfterStoptrig) Purpose Enables the pretrigger mode o f data acquisition an d in dicates the number of data po i[...]

  • Страница 174

    Chapte r 2 Function R eferenc e — D AQ_StopT rigger_Conf ig © National In strum ents Corp oration 2-141 N I-DA Q FRM fo r PC Compatibles apply a pulse at the ST OPTRIG* input o f the MIO-16/1 6D or the EXT TRIG* input of the A T-MIO-16F-5, A T-MI O-64F-5, or A T -MIO-16X or the EXTTRIG i nput of Lab and 1200 Series de vices, NI-D A Q acquires an[...]

  • Страница 175

    Chapter 2 Function R eferenc e — DAQ_ to_Disk NI-DAQ FRM f or PC Compatibles 2-142 © Natio nal In strume nts Corp oratio n DAQ_to_Disk Format status = D A Q_to_Disk (devic eNumber , chan, gain, filename, co unt, sampleRate, concat) Purpose Performs a synchron ous, single-ch annel D A Q operation and sa ves t he acquired data in a dis k file. DAQ[...]

  • Страница 176

    Chapte r 2 Function Ref erenc e — DAQ_to_Disk © National In strum ents Corp oration 2-143 N I-DA Q FRM fo r PC Compatibles count is th e num ber o f sam p les to b e acqui r e d (that i s, th e num ber o f A/D conv ersions to be performed). The length of you r data file in bytes should be exactly twice the value of count upon comp letion of the [...]

  • Страница 177

    Chapter 2 Function R eferenc e — DAQ_ to_Disk NI-DAQ FRM f or PC Compatibles 2-144 © Natio nal In strume nts Corp oratio n when you enable pretrigger mode . If you do not apply the sto p trigger , DAQ_to_Disk returns control to yo ur application because, y ou e ventually will run out of disk space. In an y case, you can use Timeo ut_Config to es[...]

  • Страница 178

    Chapte r 2 Function R eferenc e — D AQ_VScale © National In strum ents Corp oration 2-145 N I-DA Q FRM fo r PC Compatibles DAQ_VScale Format status = D AQ _VScale (deviceNumber , chan, gain, gainAdjust, offset, count, binArray , voltArray) Purpose Con verts the values of an array of acquired binary dat a and the gain setting for th at data to ac[...]

  • Страница 179

    Chapter 2 Function R eferenc e — DAQ_ VScale NI-DAQ FRM f or PC Compatibles 2-146 © Natio nal In strume nts Corp oratio n gainA djust is th e multiplying factor to adjust th e gain . Refer to Appendix B, Analo g Input Channel, Gai n Settings, and Volta ge C alcu la tion , for the procedure for determining gainA djust . If you do not w ant to do [...]

  • Страница 180

    Chapter 2 Function R eference — DIG _Block_Che ck © National In strum ents Corp oration 2-147 N I-DA Q FRM fo r PC Compatibles DIG_Block_Check Format status = DIG_Block_Check (deviceNumber , group, r emaini ng) Purpose Returns the nu mber of item s remaining to be trans ferred after a DIG_Block_In or DIG_Block_Out call. Para meters Input Output [...]

  • Страница 181

    Chapter 2 Function R eference — DIG _Block_Clea r NI-DAQ FRM f or PC Compatibles 2-148 © Natio nal In strume nts Corp oratio n DIG_Block_Clear Format status = DIG_Block_Clear (deviceNumber , group) Purpose Halts an y ongoing asynchronous transfer , allowin g another tr ansfer to be i nitiated. Para meters Input Para meter Discussion group is the[...]

  • Страница 182

    Chapte r 2 Function Refere nce — DIG_Blo ck_In © National In strum ents Corp oration 2-149 N I-DA Q FRM fo r PC Compatibles DIG_Block_In Format status = DIG_Block_In (d eviceNum ber , group, buffer , count) Purpose Initiates an asynchrono us transfer of data fro m the specifi ed group to memory . Para meters Input Output Para meter Discussion gr[...]

  • Страница 183

    Chapter 2 Function R eference — DIG _Block_In NI-DAQ FRM f or PC Compatibles 2-150 © Natio nal In strume nts Corp oratio n Using This Function DIG_Block_In initiates an asynchronous transfer of data from a specified group to your buf fer . The ha rdwa r e is re sp onsi ble fo r the ha n dsh aking detai ls. Ca ll DIG_Grp_Config for the DIO-32F an[...]

  • Страница 184

    Chapte r 2 Function Refere nce — DIG_Blo ck_In © National In strum ents Corp oration 2-151 N I-DA Q FRM fo r PC Compatibles you must us e the value of alignI ndex return by Align_DMA_Buffer to access your data. In other w ords, data i n an aligned b uffer begi ns at buffer[alignIndex] . Data in an unaligned bu ffer begins at bu ffe r [0]. Not e [...]

  • Страница 185

    Chapter 2 Function R eference — DIG _Block_Out NI-DAQ FRM f or PC Compatibles 2-152 © Natio nal In strume nts Corp oratio n DIG_Block_Out Format status = DIG_Block_Out (dev iceNumber , group, b u ffer , count) Purpose Initiates an asynchrono us transfer of data fro m memory to the specif ied group. Para meters Input Para meter Discussion group i[...]

  • Страница 186

    Chapte r 2 Function R efere nce — DIG_ Block_O ut © National In strum ents Corp oration 2-153 N I-DA Q FRM fo r PC Compatibles If you u se a DIO-32F o r a DIO 6533 d e vice, NI-D A Q writes all b ytes in you r bu ffer to the group re gardless of the group size. If the group s ize is one (w hich is supp orted only by the DIO 6533), DIG_Block_Out [...]

  • Страница 187

    Chapter 2 Function R eference — DIG _Block_PG_ Config NI-DAQ FRM f or PC Compatibles 2-154 © Natio nal In strume nts Corp oratio n DIG_Block_PG_Config Format statu s = DIG_ Block _PG_ Config (devi ceNumb er , grou p, config, reqSou rce, timeba se, reqInterval, externalGa te) Purpose Enables or disables the pattern generation mode of b uffered di[...]

  • Страница 188

    Chap ter 2 F unctio n Refere nce — DIG_ Block_PG_ Config © National In strum ents Corp oration 2-155 N I-DA Q FRM fo r PC Compatibles 2: Change det ection ( DIO 6533 ( DIO-32HS) in put grou ps only ). The board generates an internal requ est whenever it detects a change on a significant input pin. When using internally gen erated requests (reqSo[...]

  • Страница 189

    Chapter 2 Function R eference — DIG _Block_PG_ Config NI-DAQ FRM f or PC Compatibles 2-156 © Natio nal In strume nts Corp oratio n DIG_Block_PG_Config enabl es or dis abled the patt ern genera tion mode of d igital I/ O. If the config p aram eter e quals 1 or 2 , any sub sequ ent DIG_Block_In or DIG_Block_Out call initiates a pattern ge nerati o[...]

  • Страница 190

    Chap ter 2 F unctio n Refere nce — DIG_ Block_PG_ Config © National In strum ents Corp oration 2-157 N I-DA Q FRM fo r PC Compatibles On the DIO 6533 (DIO-32HS), o utput is al ways double-b uffered, t hus minimi zing the v ariability in updat e intervals. In addition, the ACK pulse irregularities are not present. Therefore, v alues 1 and 2 for t[...]

  • Страница 191

    Chapter 2 Function R eference — DIG _DB_Config NI-DAQ FRM f or PC Compatibles 2-158 © Natio nal In strume nts Corp oratio n DIG_DB_Con fig Format status = DIG_DB_ Conf ig (de viceNumber , grou p, dbMo de, oldData S top, p artialT ransfer) Purpose Enables or disabl es doubl e-buf fered digit al transfer operations and s ets the dou ble-b uf fered[...]

  • Страница 192

    Chapte r 2 Function Ref erenc e — DIG_DB_Config © National In strum ents Corp oration 2-159 N I-DA Q FRM fo r PC Compatibles partialTransfer is a flag whose value enables or disables the mechanism whereby NI-D A Q can transfer a final partial half buf fer to the di gital outpu t block throug h a DIG_DB_Transfer call. The fu nction stops digital [...]

  • Страница 193

    Chapter 2 Function R eference — DIG _DB_Half Ready NI-DAQ FRM f or PC Compatibles 2-160 © Natio nal In strume nts Corp oratio n DIG_DB_H alfReady Format statu s = DIG_ DB_H a lfRe ad y (dev ic eNumbe r , group, ha lf Read y) Purpose Check s whet her the next ha lf buffer of d ata is availabl e duri ng a do uble- buf f ered digital block operatio[...]

  • Страница 194

    Chapte r 2 Function Refere nce — DIG_DB_ HalfRead y © National In strum ents Corp oration 2-161 N I-DA Q FRM fo r PC Compatibles function, when called, waits until NI-DA Q can complete the data trans fer before returning. During slower paced digital block operations this waiting p eriod can be significant. Y ou can use DIG_DB_HalfReady so that t[...]

  • Страница 195

    Chapter 2 Function R eferenc e — DIG_DB _T ransf er NI-DAQ FRM f or PC Compatibles 2-162 © Natio nal In strume nts Corp oratio n DIG_DB_T ransf er Format sta tus = DIG_D B_T ransfe r (de viceNum ber , gr oup, ha lfBu ffer , pt sTfr) Purpose Fo r an inpu t operati on, DIG_ DB_Transfer waits until NI-D A Q can transfer half the data from the buf f[...]

  • Страница 196

    Chapte r 2 Function Re ference — DIG_DB_ T ransf er © National In strum ents Corp oration 2-163 N I-DA Q FRM fo r PC Compatibles size. NI-D A Q ignores this field for all other cases (input or outp ut without partial transfers enabled) and the transfer count is equal to half th e buf fer size. Range: 0 to half the si ze of the di gital block buf[...]

  • Страница 197

    Chapter 2 Function R eference — DIG _Grp_Conf ig NI-DAQ FRM f or PC Compatibles 2-164 © Natio nal In strume nts Corp oratio n DIG_Grp_ Config Format status = DI G_Grp_Config (deviceNumber , group, groupSize, port, dir) Purpose Conf igures t he specif ied group f or port ass ignment, dire ction (input or ou tput), and size. Para meters Input Para[...]

  • Страница 198

    Chapter 2 Functio n Refere nce — DIG _Grp_Conf ig © National In strum ents Corp oration 2-165 N I-DA Q FRM fo r PC Compatibles port = 2 assi gns port 2 (C). port = 3 assi gns port 3 (D). group Size = 2 port = 0 assi gns ports 0 and 1 (A and B). port = 2 assi gns ports 2 and 3 (C and D). group Size = 4 port = 0 assi gns ports 0, 1, 2, and 3 (A, B[...]

  • Страница 199

    Chapter 2 Function R eferenc e — DIG_Grp_ Mode NI-DAQ FRM f or PC Compatibles 2-166 © Natio nal In strume nts Corp oratio n DIG_Grp_ Mode Format status = DI G_Grp_Mode (deviceNum ber , g roup, protocol , edge, reqPol, ackP ol, delayTime) Purpose Conf igures the specif ied group f or handshak e signal modes. Para meters Input Para meter Discussio[...]

  • Страница 200

    Chapte r 2 Functio n Refe rence — DIG_Grp _Mode © National In strum ents Corp oration 2-167 N I-DA Q FRM fo r PC Compatibles edge indicates whether the group is to be conf igured for leading- edge or trailing-edge pulsed signals. edge is v alid only if p rotocol = 1 or 2. 0: Group is confi gured for leadi ng-edge pu lsed handshake s ignals. 1: G[...]

  • Страница 201

    Chapter 2 Function R eferenc e — DIG_Grp_ Mode NI-DAQ FRM f or PC Compatibles 2-168 © Natio nal In strume nts Corp oratio n ackP ol = 0: Acknowledge handshake signal is not inverted (active high ). delayTim e = 0: Settling tim e is 0 ns. Y ou need to call DIG_Grp_Mode only i f you need a d if fer ent hands hake mode. R efer t o your board’ s u[...]

  • Страница 202

    Chap ter 2 F unctio n Refere nce — DIG_ Grp_Status © National In strum ents Corp oration 2-169 N I-DA Q FRM fo r PC Compatibles DIG_Grp_ Status Format status = DI G_Grp_St a tus (deviceNumb er , group, han dshakeSta tu s) Purpose Returns a hand shake status wor d indicating whether the specified group is r eady to be read (input g roup) or writt[...]

  • Страница 203

    Chapter 2 Function R eference — DIG _Grp_Sta tus NI-DAQ FRM f or PC Compatibles 2-170 © Natio nal In strume nts Corp oratio n DIG_In_Grp can fetch th e data an extern al dev ice has latched in. If the specif ied group is conf igured as an output gr oup and DIG_Grp_Status retur ns hands hakeSta tus = 1, DIG_Out_Grp can write the ne xt piece of da[...]

  • Страница 204

    Chap ter 2 Funct ion Ref ere nce — DIG_ In_Grp © National In strum ents Corp oration 2-171 N I-DA Q FRM fo r PC Compatibles DIG_In _Grp Format status g DIG_ In_Gr p (de viceNumbe r , gr oup, gr oupPa ttern) Purpose Reads digital inpu t data from the specified digital group. Para meters Input Output Para meter Discussion group is the gro up to be[...]

  • Страница 205

    Chapter 2 Function R eference — DIG _In_Grp NI-DAQ FRM f or PC Compatibles 2-172 © Natio nal In strume nts Corp oratio n Using This Function DIG_In_Grp retu rns digital d ata from t he group on t he specif ied de vice. If the group is conf igu red as an input gro up, reading that group return s the digital logic state of the lines of the por ts [...]

  • Страница 206

    Chap ter 2 Function R efere nce — DIG_ In_Line © National In strum ents Corp oration 2-173 N I-DA Q FRM fo r PC Compatibles DIG_In _Line Format status = DIG_In_Line (deviceNumber , port, line, state) Purpose Returns the dig ital lo gic state of the specified digital line in the s pecified port. Para meters Input Output Para meter Discussion port[...]

  • Страница 207

    Chapter 2 Function R eference — DIG _In_Line NI-DAQ FRM f or PC Compatibles 2-174 © Natio nal In strume nts Corp oratio n state returns the digital logic state of th e specified line. 0: The specified digital line is at a digital logic low. 1: The specified digital line is at a digital logic high. Not e C Progr ammers— state is a p ass-by-refe[...]

  • Страница 208

    Chapte r 2 Function Re ference — D IG_In_Port © National In strum ents Corp oration 2-175 N I-DA Q FRM fo r PC Compatibles DIG_In _Port Format status = DIG_In_Port (dev iceNumber , port, pattern) Purpose Returns digital input data from the specified digital I/O port. Para meters Input Output Para meter Discussion port is the digital I/O port nu [...]

  • Страница 209

    Chapter 2 Function R eference — DIG _In_Port NI-DAQ FRM f or PC Compatibles 2-176 © Natio nal In strume nts Corp oratio n four bits wide , only bits 0 throu gh 3 of pattern r eflect the digital state of these ports, while NI-D A Q sets all other bits of pattern to 0. Not e C Progr ammers— pattern is a p ass-by-reference parameter . Using This [...]

  • Страница 210

    Chapter 2 Function Referenc e — D IG_Line_C onfig © National In strum ents Corp oration 2-177 N I-DA Q FRM fo r PC Compatibles DIG_Li ne_Confi g Format status = DIG_Line_Config (de viceNumber , port, line, dir) Purpose Conf igures a specif ic line on a port for d irection (inpu t or output). Para meters Input Para meter Discussion port is the di[...]

  • Страница 211

    Chapt er 2 Function Re ference — DIG_Ou t_Grp NI-DAQ FRM f or PC Compatibles 2-178 © Natio nal In strume nts Corp oratio n DIG_Out_Grp Format sta tus = D IG_Out _Gr p (de viceNumb er , gr oup, gr oupPa ttern) Purpose Writes digital ou tput data to th e sp ecified digital group. Para meters Input Para meter Discussion group is the gro up to be wr[...]

  • Страница 212

    Chapter 2 Funct ion Ref erence — DI G_O ut_Line © National In strum ents Corp oration 2-179 N I-DA Q FRM fo r PC Compatibles DIG_Out_Li ne Format status = DI G_Out_Lin e (deviceNumber , port, line, st at e) Purpose Sets or clears the specified digital outpu t line in the specified digital port. Para meters Input Para meter Discussion port is the[...]

  • Страница 213

    Chapter 2 Function R eference — DIG _Out_Line NI-DAQ FRM f or PC Compatibles 2-180 © Natio nal In strume nts Corp oratio n Using This Function DIG_Out_Line sets the digital line in the specif ied port to the specif ied state. The remaining digital output lines m aking up the port are not affected by this call. If the port is configurable and you[...]

  • Страница 214

    Chap ter 2 Functio n Refere nce — DI G_Out_ Port © National In strum ents Corp oration 2-181 N I-DA Q FRM fo r PC Compatibles DIG_Out_Port Format status = DIG_Out_P ort (dev iceNumber , port, pattern) Purpose Writes digital ou tput data to th e sp ecified digital port. Para meters Input Para meter Discussion port is the digital I/O port nu mber [...]

  • Страница 215

    Chapt er 2 Function Re ference — DIG_Ou t_Port NI-DAQ FRM f or PC Compatibles 2-182 © Natio nal In strume nts Corp oratio n Using This Function DIG_Out_Port writes the specif ied digital data to th e port on the specif ied de vice. If the specified port is configur able and you h av e not conf igured that port as an o utput port, NI-D A Q does n[...]

  • Страница 216

    Chapter 2 Func tion Reference — DIG_Prt_Config © National In strum ents Corp oration 2-183 N I-DA Q FRM fo r PC Compatibles DIG_Prt_Conf ig Format status = DIG_ Prt_Config (de viceNumber , port, mo de, dir) Purpose Conf i g ures t he s pecif ied port for d ir ect io n ( i nput o r ou t put) . DIG_Prt_Config also se t s t h e handshak e mode for [...]

  • Страница 217

    Chapter 2 Function R eference — DIG _Prt_Config NI-DAQ FRM f or PC Compatibles 2-184 © Natio nal In strume nts Corp oratio n 1: Port is conf igured for hands haking (latch ed) mode. mo de = 1 is valid only for ports 0 and 1 of the DIO-24 and Lab and 1200 S eries devices; for po rts 2 and 3 of the AT-MIO-16D and AT-MIO-16 DE-10 ; and for por ts 0[...]

  • Страница 218

    Chapter 2 Func tion Reference — DIG_Prt_Config © National In strum ents Corp oration 2-185 N I-DA Q FRM fo r PC Compatibles After system startup, the digital I/O ports on all the b oards supported by this function are conf igured as follo ws: dir = 0: Input port. mode = 0: No-handshakin g mode. Also, ports on the DIO-24, A T -MIO-16D, DIO-3 2F ,[...]

  • Страница 219

    Chapter 2 Function R eference — DIG _Prt_Status NI-DAQ FRM f or PC Compatibles 2-186 © Natio nal In strume nts Corp oratio n DIG_Prt_Stat us Format status = DI G_Prt_Status ( deviceNum ber , po rt, handshakeSt atus ) Purpose Returns a status w ord indicating the handshak e s tatus of the specif ied port. Para meters Input Output Para meter Discu[...]

  • Страница 220

    Chapte r 2 Function Re feren ce — DIG_Prt_Sta tus © National In strum ents Corp oration 2-187 N I-DA Q FRM fo r PC Compatibles Using This Function DIG_Prt_Status reads the handshak e status of the specified port and returns the port status in ha ndshake Sta tus . DIG_Prt_Status , along with DIG_Out _Port and DIG_In_Port , facilitates handshaking[...]

  • Страница 221

    Chapter 2 Fun ction Reference — DIG_SCAN_Setup NI-DAQ FRM f or PC Compatibles 2-188 © Natio nal In strume nts Corp oratio n DIG_SCAN_Setup Format status = DI G_SCAN_S etup (deviceNumber , group, groupSize, port Lis t, dir) Purpose Conf igures t he specif ied group f or port ass ignment, dire ction (input or ou tput), and size. Para meters Input [...]

  • Страница 222

    Chapter 2 F unction Reference — DIG_SCAN_Setup © National In strum ents Corp oration 2-189 N I-DA Q FRM fo r PC Compatibles dir sele cts the direction, input or output, t o which the group is to be confi gur ed. 0: Port is configured as an input port ( default). 1: Port is conf igured as an outpu t port. 2: Port is conf igured as a bidir ectiona[...]

  • Страница 223

    Chapter 2 Fun ction Reference — DIG_SCAN_Setup NI-DAQ FRM f or PC Compatibles 2-190 © Natio nal In strume nts Corp oratio n Each output port also h as a dif ferent Ackno wledge Inp ut (A CK*) control si gnal. • PC6 on the I/O conne ctor is for po rt 0. • PC2 on the I/O conne ctor is for po rt 1. On the DIO-96 I/O connector , you can f ind fo[...]

  • Страница 224

    Chapter 2 F unction Reference — DIG_SCAN_Setup © National In strum ents Corp oration 2-191 N I-DA Q FRM fo r PC Compatibles Figu re 2- 13. Digi tal Scan ning Ou tput Grou p Hand shaking C onnectio ns For DIO-24 users, the correct W1 jumper setting is required to allo w DIG_Block_In and DIG_Block_Out to functio n properly . If port 0 is conf igur[...]

  • Страница 225

    Chapter 2 Function R eference — DIG _T r igger_Co nfig NI-DAQ FRM f or PC Compatibles 2-192 © Natio nal In strume nts Corp oratio n DIG_T rigger_Conf ig Format status = DIG_T rigger_Conf ig (dev iceNumber , gr oup, sta rtT rig, start Pol , stopT rig, stopPol, pt sAfterStopT rig, pattern, patter nMask) Purpose Sets up trigger conf iguration for s[...]

  • Страница 226

    Chapter 2 Function R eferen ce — D IG_T rigger_ Config © National In strum ents Corp oration 2-193 N I-DA Q FRM fo r PC Compatibles stopTrig specifies the source of the stop trigger . 0: None. 1: Hardware trigger. 2: Digital p attern tri gger (inpu t group only). stopP ol specifies the polarity of the stop trigger . 0: Active h igh. 1: Active lo[...]

  • Страница 227

    Chapter 2 Function R eference — DIG _T r igger_Co nfig NI-DAQ FRM f or PC Compatibles 2-194 © Natio nal In strume nts Corp oratio n If startTrig or stopTrig is 2, the oper ation s tarts or st ops when the i ncoming dat a match es the pattern on all b its declared signif icant by li neMa sk . If startTrig or sto pTrig is 3, the operation starts o[...]

  • Страница 228

    Chapte r 2 Function Refere nce — Get_DAQ_ Device_ Info © National In strum ents Corp oration 2-195 N I-DA Q FRM fo r PC Compatibles Get_DAQ_Device_Info Format status = Get_DA Q_Device_Info (de viceNumber , infoT ype, infoV alue) Purpose Allo ws you to retrie ve parameter s pertaining to the de vice operatio n. Para meters Input Output Para meter[...]

  • Страница 229

    Chapter 2 Funct ion Refere nce — Get _DAQ_ Devic e_Info NI-DAQ FRM f or PC Compatibles 2-196 © Natio nal In strume nts Corp oratio n infoT ype can be one of the foll owing . Not e C Progr ammers— inf oV alue is a pass-by-reference parameter . infoT ype Description ND_ACK_REQ_EXCHANGE_GR1 ND_ACK_REQ_EXCHANGE_GR2 See the Set_DAQ_Device_Info func[...]

  • Страница 230

    Chapter 2 Functio n Refere nce — Get _NI_DAQ_Ver sion © National In strum ents Corp oration 2-197 N I-DA Q FRM fo r PC Compatibles Get_NI_DAQ_Version Format statu s = Get _NI_DA Q _V e rsion (versi on ) Purpose Returns the version n umb er of the NI-D A Q library . Para meter Output Using This Function Get_NI_DAQ_Version returns a 4-byte value i[...]

  • Страница 231

    Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-198 © Natio nal In strume nts Corp oratio n GPCTR_Change_Param eter Format status = GPCTR_Change_Para meter (deviceNumber , gpctrNum, paramID, paramV alue ) Purpose Selects a speci fic paramet er setting for the general- purpose count er (E Series, 6602 , [...]

  • Страница 232

    Chapte r 2 Function Refere nce — GPCTR_Cha nge_Pa rameter © National In strum ents Corp oration 2-199 N I-DA Q FRM fo r PC Compatibles Legal v alues for para mValue depend on param ID . The follo wing paragr aphs list l egal va l u e s f o r para mID with explanations and corresponding legal v alues for paramValue : paramID = ND_SOURCE The gener[...]

  • Страница 233

    Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-200 © Natio nal In strume nts Corp oratio n Not e The default source selectio n for all other appl ications is ND_INTERNAL_20_MHZ. Use this function with paramID = ND_SOURCE_POLARITY to select polarity of transitions to use fo r co unt ing. Not e If you ha[...]

  • Страница 234

    Chapte r 2 Function Refere nce — GPCTR_Cha nge_Pa rameter © National In strum ents Corp oration 2-201 N I-DA Q FRM fo r PC Compatibles paramID = ND_START_TRIGGER (660 2 and 45 5 X devic e s only) This param ID allows you to ch ange ho w a counter arms itself. If paramV alu e is set to ND_ENABLED , the counter will be armed using a hardware arm. [...]

  • Страница 235

    Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-202 © Natio nal In strume nts Corp oratio n Synchro ni zati on on de faul t So ur ce an d Up/Down pins is enabled when you call GPCTR_Change_Parameter with paramID = ND_INPUT_CONDITIONING an d paramV alue as any of the quadrat ure modes or the two-pulse co[...]

  • Страница 236

    Chapte r 2 Function Refere nce — GPCTR_Cha nge_Pa rameter © National In strum ents Corp oration 2-203 N I-DA Q FRM fo r PC Compatibles Output counterValue } GPCTR_Control (deviceNumber, gpctrNu m, ND_RESET) paramID = ND_GATE This si gnal contro ls the operation o f the gener al-pur pose counter in some applicatio ns. The default values of paramV[...]

  • Страница 237

    Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-204 © Natio nal In strume nts Corp oratio n Use this functio n with paramID = ND_GATE_POLARITY to select polarity of the gate si gnal. paramID = ND_GATE_POLARITY This gate signal con trols the operation of th e general-purpose coun ter in s ome application[...]

  • Страница 238

    Chapte r 2 Function Refere nce — GPCTR_Cha nge_Pa rameter © National In strum ents Corp oration 2-205 N I-DA Q FRM fo r PC Compatibles paramID = ND_SECOND_GATE (6602 and 4 55 X devi c es only ) This si gnal contro ls the operation o f the gener al-pur pose counter in some applicatio ns. Corresp onding le gal v alues for paramV alu e are s h own [...]

  • Страница 239

    Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-206 © Natio nal In strume nts Corp oratio n paramID = ND_COUNT_1 , ND_COUNT_2 , ND_COUNT_3 , ND_COUNT_4 The general-pu rpose counter uses these num bers for pulse width specif ications when the counter is config ured for one of the simple pulse and pulse t[...]

  • Страница 240

    Chapte r 2 Function Refere nce — GPCTR_Cha nge_Pa rameter © National In strum ents Corp oration 2-207 N I-DA Q FRM fo r PC Compatibles Soft ware Cont rol This funct ion lets you customize the counter fo r your appl ication. Y ou can use this function after the GPCTR_Set_Applicatio n func tion , and befo re GPCTR_Control function with actio n = N[...]

  • Страница 241

    Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-208 © Natio nal In strume nts Corp oratio n paramID = ND_OUTPUT_MODE This v alue changes the output mode fr om defau lt toggle (the output of t he counter togg les on each terminal coun t) to pulsed (the outpu t of the counter mak es a pulse on each termin[...]

  • Страница 242

    Chapter 2 Function R eference — GPCTR _Config_B uffer © National In strum ents Corp oration 2-209 N I-DA Q FRM fo r PC Compatibles GPCTR_Config_Buf fer Format status = GP CTR_Config_Buffer (d eviceNumber , gpct rNum , reserved, numP oints, buffer) Purpose Assigns a buf fer that NI-D A Q will use for a b u ffered coun ter operation. Para meters I[...]

  • Страница 243

    Chapter 2 Function R eference — GPCTR _Config_B uffer NI-DAQ FRM f or PC Compatibles 2-210 © Natio nal In strume nts Corp oratio n Using This Function Y ou need t o use this f unction to u se a general-pu rpose counter for b u ffered oper ation. Y ou should call this fun ction after calling the GPCTR_Set_Application funct ion. NI-D A Q transfers[...]

  • Страница 244

    Chapter 2 Function Reference — GPCTR_Control © National In strum ents Corp oration 2-211 N I-DA Q FRM fo r PC Compatibles GPCTR_Control Format status = GPCTR_Control (de viceNumber , gpctrNum, action) Purpose Contr ols the op eration of t he general -purpose co unter . Para meters Input Para meter Discussion Le gal ranges for the gpctrNum and ac[...]

  • Страница 245

    Chapter 2 Function R eference — GPCTR _Control NI-DAQ FRM f or PC Compatibles 2-212 © Natio nal In strume nts Corp oratio n Using This Function Y ou need to use this fun ction with actio n = ND_PROGRAM PROGRAM after completing the configuration sequence consistin g of calling GPCTR_Set_Application follo wed by optional calls to GPCTR_Change_Para[...]

  • Страница 246

    Chapte r 2 Function Refe rence — GPCTR_Re ad_Buff er © National In strum ents Corp oration 2-213 N I-DA Q FRM fo r PC Compatibles GPCTR_Read_Buff er Format status = GPCTR_Read_Buffer (de viceNumber , gpctrNum, r eadMode, numPts, readOffSet, timeOut, b u ffer) Purpose Returns the data fr om a asynchrono us counter input operation . The read mode [...]

  • Страница 247

    Chapter 2 Function R eference — GPCTR _Read_B uffer NI-DAQ FRM f or PC Compatibles 2-214 © Natio nal In strume nts Corp oratio n numPts is the number of points to retrie ve from the b uffer be ing us ed. Th is argument is passe d by refere nce. When this f uncti on retu rns, numPts holds the v alue of actual number o f inputs that were read. rea[...]

  • Страница 248

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-215 N I-DA Q FRM fo r PC Compatibles GPCTR_Set_Applic ation Format status = GP CTR_Set_Application ( deviceNum ber , gp ctrNum, applica t io n) Purpose Selects the application fo r which you use the general- purpose counter . Para meters Input Para mete[...]

  • Страница 249

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-216 © Natio nal In strume nts Corp oratio n applicat ion can be one of the fol lowing . Table 2 -31. Descri ptions for appl ication Group Applicat ion Description Simple Count i ng and T ime Measurement ND_SIMPLE_EVENT_CNT Si m p le e ven t c oun ting ND_SINGL[...]

  • Страница 250

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-217 N I-DA Q FRM fo r PC Compatibles Using This Function NI-D A Q requires you to select a set of parameters so that it can program the counter hardware. Those parameters include, for e xample, signals to be used as counter source and gate and the polar[...]

  • Страница 251

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-218 © Natio nal In strume nts Corp oratio n The following pseudo-code continuati on of the example giv en earlier illustrates what you can do to read the coun ter valu e continuously ( GPCTR_Watch functi on wit h entityID = ND_COUNT does this) and pr int it: R[...]

  • Страница 252

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-219 N I-DA Q FRM fo r PC Compatibles Figure 2-15 sho ws one p ossible scenario of a co unter us ed for ND_SINGLE_PERIOD_MSR after the follo wing programm ing sequ ence: GPCTR_Control(deviceNumber, gpctrNum , ND_RESET) GPCTR_Set_Application(deviceNumber,[...]

  • Страница 253

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-220 © Natio nal In strume nts Corp oratio n until (counter_armed = ND_NO) GPCTR_Watch(deviceNumber, gpctrNumbe r, ND_COUNT, counted_value) T o calculate the measured in terval, you need to mu ltip ly the counted value by the period correspo nding to th e timeb[...]

  • Страница 254

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-221 N I-DA Q FRM fo r PC Compatibles measure a t ime inter val between 100 ns and 0. 8 s long.F or the 6602 and 455 X de vices with counter width 32 bits, you can measure a time inte rv al between 1 00 ns and 2 14 s lo ng. Figure 2-16 sho ws one p ossib[...]

  • Страница 255

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-222 © Natio nal In strume nts Corp oratio n GPCTR_Watch(deviceNumber, gpctrNumbe r, ND_COUNT_AVAILABLE, count_available) } until (count_available = ND_YES) GPCTR_Watch(deviceNumber, gpctrNumbe r, ND_COUNT, counted_value) T o calculate the measured in terval, m[...]

  • Страница 256

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-223 N I-DA Q FRM fo r PC Compatibles actio n = ND_PROGRAM returns gateSignalError . If this happens, you should not rely on values returned by GPCTR_Watch . applicat ion = ND_TRIG_PULSE_WIDTH_MSR In this application, the counter is used for a single mea[...]

  • Страница 257

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-224 © Natio nal In strume nts Corp oratio n Figu re 2-17. Sin gle T rig gered Pu lse Wi dth Gen eration Me asuremen t Use the GPCTR_Watch function with entityID = ND_COUNT_AVAILABLE to monitor th e progress of the counting process. This measurement comp letes [...]

  • Страница 258

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-225 N I-DA Q FRM fo r PC Compatibles When the counter reaches terminal count (2 24 – 1 for E Ser ies and 44 5 X de vices, and 2 32 – 1 for 6602 and 455 X d evices), it ro lls over and keeps counting. T o check if this occurred, u se GPCTR_Watch func[...]

  • Страница 259

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-226 © Natio nal In strume nts Corp oratio n Figure 2- 18 show s one pos sible us e of a counte r for ND_TWO_SIGNAL_EDGE_SEPARATION_MSR a fter the following programming sequence: GPCTR_Control (deviceNumber, gpctrNu m, ND_RESET) GPCTR_Set_Application (deviceNum[...]

  • Страница 260

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-227 N I-DA Q FRM fo r PC Compatibles { GPCTR_Watch (deviceNumber, gpctrNumb er, ND_ARMED, counter_armed) until (counter_armed = ND_NO) GPCTR_Watch (deviceNumber, gpctrNumb er, ND_COUNT, counted_value) T o calculate the measured in terval, multipl y the [...]

  • Страница 261

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-228 © Natio nal In strume nts Corp oratio n Fo r example, as sume that you wa nt to generate a pulse 20 0 ns long af ter 150 ns o f delay . Y ou need to set ND_COUNT_1 t o 150 ns /50 ns = 3 and ND_COUNT_2 to 2 00 ns/50 ns = 4. Figure 2-19 sho ws th e scenario [...]

  • Страница 262

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-229 N I-DA Q FRM fo r PC Compatibles between 2 0 ns and 11.37 ho urs for 6602 and 455 X de vices. The timing reso lution w ill be lo wer than if you are us ing th e ND_INTERNAL_20_MHZ timebase. Y ou can use the GPCTR_Change_Paramet er function after cal[...]

  • Страница 263

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-230 © Natio nal In strume nts Corp oratio n In Fi gure 2-20, the fo llo w ing beha vior is prese nt: • Gate is the signal present at the counter gate input. • Source is the signal present at the coun ter source input. • Output is the signal present at th[...]

  • Страница 264

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-231 N I-DA Q FRM fo r PC Compatibles T o pro vide your timebase, yo u can connect your timebase sour ce to one of the PFI pins on the I/O connector and change ND_SOURCE and ND_SOUR CE_POLARITY to the appr opriate v alues. Y ou also can con figure the ot[...]

  • Страница 265

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-232 © Natio nal In strume nts Corp oratio n Figur e 2-21. Retr iggerab le Pu lse Gener ation Use the GPCTR_Control funct ion with action = ND_RESET to stop t he pulse gen eration. T ypically , you will f ind modifyin g the foll owing parameters throu gh the GP[...]

  • Страница 266

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-233 N I-DA Q FRM fo r PC Compatibles W ith th e default 20 MHz timebase, combined with the counter width (24 bits), you can generate tra i ns consi sting of pul ses with delay and len gth between 100 n s and 0.8 s . For t he 6602 de vices, yo u can gene[...]

  • Страница 267

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-234 © Natio nal In strume nts Corp oratio n Y ou can use the GPC TR_Change_Parameter function after calling GPCTR_Set_Application and before calling GPCTR_Control with actio n = ND_PROGRAM or ND_PREPARE . T o pro vide your timebase, yo u can connect your timeb[...]

  • Страница 268

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-235 N I-DA Q FRM fo r PC Compatibles In Fi gure 2-23, the fo llo w ing beha vior is prese nt: • Gate is the signal present at the counter gate input. • Source is the signal present at the coun ter source input. • Output is the signal present at th[...]

  • Страница 269

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-236 © Natio nal In strume nts Corp oratio n are the lo w-to-high transitions of the sign al on the PFI9/GPCTR0_GA TE I/O conn ector pin for general-p urpose coun ter 0 and the PFI4/ GPCTR1_GA TE I /O connector pin fo r general-purpose cou nter 1. The coun ter [...]

  • Страница 270

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-237 N I-DA Q FRM fo r PC Compatibles Use the GPCTR_Watch function with entityID = ND_ARMED to moni tor the pr ogress of the counting pr ocess. This measurement completes when entityValue becomes ND_NO . Y ou can d o this as follows: Create u32 variable [...]

  • Страница 271

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-238 © Natio nal In strume nts Corp oratio n 6602 and 45 5 X de vices with counter wi d th 32 bi ts , yo u can gen e rate pu lses with a d el ay an d length b etween 100 n s and 214 s lon g. Figur e 2-25 . Buffer ed Per iod Meas ureme nt T ypically , you will f[...]

  • Страница 272

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-239 N I-DA Q FRM fo r PC Compatibles Figu re 2- 26. Buffered P eriod Measu rement when No Source Edges Ar e Present be tween Gat e Edges applicat ion = ND_BUFFERED_SEMI_PERIOD_MSR In this applicatio n, th e counter is used for the continuo u s measureme[...]

  • Страница 273

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-240 © Natio nal In strume nts Corp oratio n Caution If g ate edges arrive and no source edges are present between those gate edges, then the previ ously sa ved val ue is sav ed agai n, as s hown by F igure 2-28. Please mak e sure that this condition does not o[...]

  • Страница 274

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-241 N I-DA Q FRM fo r PC Compatibles Figu re 2-29. Buffered Pul se Width Measu reme nt Not e Y ou must make sure that there is a t leas t one source tr ansiti on d uring the measured pulse and between consecutive measured pulses in or der for this appli[...]

  • Страница 275

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-242 © Natio nal In strume nts Corp oratio n applicat ion = ND_BUFFERED_TWO_SIGNAL_EDGE_SEPARATION_MSR Not e This applicatio n is applicab le o nly to 6602 and 455X devices. In this applicatio n, th e counter is used for continu ous measu rement of the time in [...]

  • Страница 276

    Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-243 N I-DA Q FRM fo r PC Compatibles Figur e 2-31. Buffe red T wo-Signa l Edge Separat ion Measu rement Use the GPCTR_Watch function with entityID = ND_ARMED to monitor the prog ress o f the counting process. This measurement completes when entityV alue[...]

  • Страница 277

    Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-244 © Natio nal In strume nts Corp oratio n • ND_SECOND_GATE to any legal v alue l isted in the GPCTR_Change_Parameter functi on desc ripti on. • ND_SECOND_GATE_POLARITY to ND_NEGATIVE . Measurement will be performed on the acti ve lo w pulses. • ND_BUFF[...]

  • Страница 278

    Chapte r 2 Function Re ferenc e — GPCTR _Watch © National In strum ents Corp oration 2-245 N I-DA Q FRM fo r PC Compatibles GPCTR_Watch Format status = GPCTR_W a tch (deviceNumber , gpctrNum, entityID, entityV alue) Purpose Monitors s tate of th e general-purpo se counter and it s operation. Para meters Input Output Para meter Discussion Legal r[...]

  • Страница 279

    Chapter 2 Function R eference — GPCTR _Watch NI-DAQ FRM f or PC Compatibles 2-246 © Natio nal In strume nts Corp oratio n entityID = ND_COUN T This is the coun ter contents. entityValue can be between 0 and 2 24 – 1 for E Seri es and 445X and between 0 and 2 32 – 1 for 6602 a nd 4 55 X de vices. entityID = ND_COUNT_AVAILABLE If the applicati[...]

  • Страница 280

    Chapte r 2 Function Re ferenc e — GPCTR _Watch © National In strum ents Corp oration 2-247 N I-DA Q FRM fo r PC Compatibles entityID = ND_MAX_PRESCALE (6602 and 4 55 X devic es only ) Indicates the maximum v alue of the prescale factor that can be applied to the source selection of a 6602 or 455 X de vice. Not e C Progr ammers— en tity V alu e[...]

  • Страница 281

    Chapter 2 Function R eferenc e — ICTR_Re ad NI-DAQ FRM f or PC Compatibles 2-248 © Natio nal In strume nts Corp oratio n ICTR_Read Format status = ICTR_Read (deviceNumber , ctr , count) Purpose Reads the current contents of the selected counter without disturbing the counting process and returns the count. Para meters Input Output Para meter Dis[...]

  • Страница 282

    Chapter 2 Functio n Refere nce — ICTR_ Read © National In strum ents Corp oration 2-249 N I-DA Q FRM fo r PC Compatibles Not e B ASIC Pro grammers—NI -DA Q re tur ns count as a 16 -bit unsign ed number . In B ASIC, int eger variables are represent ed by a 16- bit two’ s complement system. Thus, values grater than 32,767 are incorrectly treat[...]

  • Страница 283

    Chapter 2 Function R eferenc e — ICTR_Re set NI-DAQ FRM f or PC Compatibles 2-250 © Natio nal In strume nts Corp oratio n ICTR_Reset Format status = ICTR_Reset (deviceNumber , ctr , state) Purpose Sets the output of the selected counter to the specif ied state. Para meters Input Para meter Discussion ctr is the counter numb er . Range: 0 throug [...]

  • Страница 284

    Chap ter 2 Funct ion Refer enc e — ICTR_Set up © National In strum ents Corp oration 2-251 N I-DA Q FRM fo r PC Compatibles ICTR_Setu p Format status = IC TR_Setup (deviceNumber , ctr , mo de, cou nt, binBcd) Purpose Conf igures the gi ven counter to oper ate in the specif ied mode . Para meters Input Para meter Discussion ctr is the counter num[...]

  • Страница 285

    Chapter 2 Function R eferenc e — ICTR_S etup NI-DAQ FRM f or PC Compatibles 2-252 © Natio nal In strume nts Corp oratio n Figu re 2-32. Mo de 0 Timi ng Diagram In mode 1, the outp ut goes low on the count fo llowing the risin g ed ge o f the gate input and goes high on t ermin al count . The v a lu e of t he coun ter bef ore the ris ing edge of [...]

  • Страница 286

    Chap ter 2 Funct ion Refer enc e — ICTR_Set up © National In strum ents Corp oration 2-253 N I-DA Q FRM fo r PC Compatibles In mode 3 , the outp ut stays hi gh for on e half of t he count clock pulses and stays low for the other h alf. Figur e 2-35 s ho ws the mod e 3 timin g diagram. Figu re 2-35. Mo de 3 Timi ng Diagram In mode 4, the output i[...]

  • Страница 287

    Chapter 2 Function R eferenc e — ICTR_S etup NI-DAQ FRM f or PC Compatibles 2-254 © Natio nal In strume nts Corp oratio n See the 8253 Pr ogrammable In terv al T imer dat a sheet in yo ur D A QCard-500/700 or Lab and 1200 Series user manual for a detailed description of these modes an d the associated timing diagra ms. count is t he period fro m[...]

  • Страница 288

    Chap ter 2 Funct ion Re fere nce — Init _DA_B rds © National In strum ents Corp oration 2-255 N I-DA Q FRM fo r PC Compatibles Init_DA_Brds Format status = In it_D A_Br ds (deviceNumber , deviceNum berCode) Purpose Initializes the hardware and software states of a National Instruments D A Q device to its default state, and then returns a n umeri[...]

  • Страница 289

    Chapter 2 Function R eference — In it_DA_Brds NI-DAQ FRM f or PC Compatibles 2-256 © Natio nal In strume nts Corp oratio n 14: PC-TIO-10. 15: AT-AO-6. 19: AT-MIO-16X. 20: AT-MIO-64F -5. 21: AT-MIO-16DL-9 . 22: AT-MIO-16DL-2 5. 23: AT-MIO-16DH-9. 24: AT-MIO-16DH-25 . 25: AT-MIO-16E-2 . 26: AT-AO-10. 27: AT-A21 50C. 28: Lab-PC +. 30: SCXI-1 200. 3[...]

  • Страница 290

    Chap ter 2 Funct ion Re fere nce — Init _DA_B rds © National In strum ents Corp oration 2-257 N I-DA Q FRM fo r PC Compatibles 65: PC-DIO-24PnP. 66: PC-DIO-96PnP. 67: AT-DIO-32HS. 68: PXI-653 3. 69: DAQArb AT-5411. 75: DAQPa d-6507/ 6508. 76: DAQPa d-6020E. 200: PCI-DIO- 96. 201: PCI-1 200. 202: PCI-MI O-16XE-50. 204: PCI-MI O-16XE-10. 205: PCI-[...]

  • Страница 291

    Chapter 2 Function R eference — In it_DA_Brds NI-DAQ FRM f or PC Compatibles 2-258 © Natio nal In strume nts Corp oratio n Using This Function Init_DA_Brds initializes the device in the specified slot to the default condition s. Thes e conditions are summarized for each device as f ollows: • MIO and AI dev ices – Analo g Input def aults : nu[...]

  • Страница 292

    Chap ter 2 Funct ion Re fere nce — Init _DA_B rds © National In strum ents Corp oration 2-259 N I-DA Q FRM fo r PC Compatibles • DIO-24/DIO-3 2F/DIO 6533 ( DIO-32HS)/DIO- 96 – Digital Input and Ou tput defaul ts: Direction = Input. Hands hakin g = Dis a bled. Group assignments = No ports assigned to an y group. •P C - T I O - 1 0 – An al[...]

  • Страница 293

    Chapter 2 Function R eference — In it_DA_Brds NI-DAQ FRM f or PC Compatibles 2-260 © Natio nal In strume nts Corp oratio n Start trigger = Disabled. External con version = Stop trigg er = Disabled. – Analo g Output defaul ts: Mode = Bipolar (–5 to +5 V). Range = 20 Lev el = 0 V . – Digital Input and Ou tput defaul ts: Direction = Input. Ha[...]

  • Страница 294

    Chap ter 2 Funct ion Re fere nce — Init _DA_B rds © National In strum ents Corp oration 2-261 N I-DA Q FRM fo r PC Compatibles • A O-2DC devices – Analo g Output defaul ts: Mode = Unip olar (0 to 10 V). Lev el = 0 V . – Digital Input and Ou tput defaul ts: Direction = Input. • D A QArb 5411 de vices – Defaults Analog filter = On. Digit[...]

  • Страница 295

    Chapter 2 Function R eference — In it_DA_Brds NI-DAQ FRM f or PC Compatibles 2-262 © Natio nal In strume nts Corp oratio n Of all these defaults, you can alter only the analo g input and analog output s ettin gs of the non-E Ser ies MIO and AI de vic es, Lab-P C+, and PC-LPM-1 6 de vi ces b y settin g jumpers on the de vice. If you hav e changed[...]

  • Страница 296

    Chapter 2 Function Reference — L ab_ISCAN_Check © National In strum ents Corp oration 2-263 N I-DA Q FRM fo r PC Compatibles Lab_ISCAN_Check Format status = Lab_ISCAN_Check (deviceNumber , daqS topped, retrie ved, f inalScanOrder) Purpose Checks whether the current mu ltiple-channel scanned data acquisition begun b y the Lab_ISCAN_Start function[...]

  • Страница 297

    Chapter 2 Fun ction Reference — Lab_ISCAN_Check NI-DAQ FRM f or PC Compatibles 2-264 © Natio nal In strume nts Corp oratio n Ho we ver , if pretrigger mode is enab led, retrieved returns the of fset of th e position i n your bu f fer where NI-DA Q places the next data point when the function acquires. After the value of retrieved reaches count -[...]

  • Страница 298

    Chapter 2 Function Reference — L ab_ISCAN_Check © National In strum ents Corp oration 2-265 N I-DA Q FRM fo r PC Compatibles sample from channel 1, the ol dest da ta point belongs to channel 0. So finalScanOrder retur ns: finalScanOrder [0] = 0. finalScanOrder [1] = 2. finalScanOrder [2] = 1. So the first sample in the buf fer belon gs to ch ann[...]

  • Страница 299

    Chapter 2 Fun ction Reference — Lab_ISCAN_Op NI-DAQ FRM f or PC Compatibles 2-266 © Natio nal In strume nts Corp oratio n Lab_ISCAN_Op Format status = La b_ISCAN_Op (deviceNumber , numChans, gain, buffer , count, sa mpleRate, scanRa te, finalScanOrder) Purpose Performs a synchr on ous, multip le-chan nel scanned dat a acquisition operation. Lab_[...]

  • Страница 300

    Chapter 2 Function Reference — Lab_ISCAN_Op © National In strum ents Corp oration 2-267 N I-DA Q FRM fo r PC Compatibles Range: 1 through 4 for the 5 16 and La b and 1200 Series devi ces in di fferential mode. 1 through 8 for DAQCard-500 (single- ended mode only). 1 through 8 for DAQCard-70 0 in differential mode. 1 throug h 8 for t he Lab and 1[...]

  • Страница 301

    Chapter 2 Fun ction Reference — Lab_ISCAN_Op NI-DAQ FRM f or PC Compatibles 2-268 © Natio nal In strume nts Corp oratio n finalScanOrder is an array that indicates the scan channel o rder of the data in the buf fer passe d to Lab_ISCAN_Op . The size of finalScanOrder must be at least equal to the number of channels scann ed. This parameter is va[...]

  • Страница 302

    Chapter 2 Function Reference — Lab_ISCAN_Op © National In strum ents Corp oration 2-269 N I-DA Q FRM fo r PC Compatibles Not e If you have selected external s tart trigg ering of the data acquisition op eration, a lo w-to-high edge at the EXTT RIG of the Lab and 1200 Seri es device I/O connector input initiates th e operatio n. Be a ware that if[...]

  • Страница 303

    Chapter 2 Fun ction Reference — Lab_ISCAN_Start NI-DAQ FRM f or PC Compatibles 2-270 © Natio nal In strume nts Corp oratio n Lab_ISCAN_Start Format status = Lab_ISCAN_Start (deviceNumber , num Chans, gain, b uffer , count, sampTimebase, sampI nterval, sc a nInt erval) Purpose Initiates a multip le-channel scan ned data acquis ition op eration an[...]

  • Страница 304

    Chapter 2 Fun ction Reference — Lab_ISCAN_Start © National In strum ents Corp oration 2-271 N I-DA Q FRM fo r PC Compatibles the NI-DAQ User Manu al for PC Compatibles for more information o n SCXI channel assignm ent s. Range: 1 through 4 for the 5 16 and La b and 1200 Series devi ces in di fferential mode. 1 through 8 for the DAQCard-5 00 (sin[...]

  • Страница 305

    Chapter 2 Fun ction Reference — Lab_ISCAN_Start NI-DAQ FRM f or PC Compatibles 2-272 © Natio nal In strume nts Corp oratio n where the sample timebas e resolu tio n is equal to on e of the values of s ampTi mebase as specifi ed abov e. Fo r example, if sampInterval = 25 and sampTimeb ase = 2, the actual sample interval is 25 * 10 µs = 250 µs. [...]

  • Страница 306

    Chapter 2 Fun ction Reference — Lab_ISCAN_Start © National In strum ents Corp oration 2-273 N I-DA Q FRM fo r PC Compatibles Fo r the Lab and 12 00 Ser ies de vices, if you en able pretrigger mode , Lab_ISCAN_Start initiates a cyclical acquisitio n th at continually fills the buf f er with data, wrapping around to the start of the buf fer once N[...]

  • Страница 307

    Chapter 2 Fun ction Reference — Lab_ISCAN_to_Disk NI-DAQ FRM f or PC Compatibles 2-274 © Natio nal In strume nts Corp oratio n Lab_ISCAN_to_Disk Format status = Lab_ISCAN_to_Disk (deviceNumber , numChans, gain, filename, count, sampleRate, scanRate, concat) Purpose Performs a synchr on ous, multip le-chan nel scanned dat a acquisition operation [...]

  • Страница 308

    Chapter 2 Fun ction Reference — Lab_ISCAN_to_Disk © National In strum ents Corp oration 2-275 N I-DA Q FRM fo r PC Compatibles 1 through 8 for the DAQCard-700 in differential mode. 1 throug h 8 for t he 516 and L ab and 1200 Series devices in single-ended mode. 1 through 1 6 for the DAQCard-700 and LPM devices in s ingle-e nded mode. gain is the[...]

  • Страница 309

    Chapter 2 Fun ction Reference — Lab_ISCAN_to_Disk NI-DAQ FRM f or PC Compatibles 2-276 © Natio nal In strume nts Corp oratio n Using This Function Lab_ISCAN_to_Disk initiates a synchronous process of acq uiring A/D co n v ersion s amples and storin g th em in a disk file. Lab_ISCAN_to_Disk does not retur n control to your application until NI-D [...]

  • Страница 310

    Chap ter 2 Funct ion Ref ere nce — Line _Change_ Attr ibut e © National In strum ents Corp oration 2-277 N I-DA Q FRM fo r PC Compatibles Line_Cha nge_Attri bute Format status = L ine_ Change_Att ribute (deviceNumber , lineNum, attri bID, a ttribV alue) Purpose Sets v arious opti ons on an I/ O connector and intern al lin es (6602 d e vices only[...]

  • Страница 311

    Chapter 2 Function R eference — Line_Ch ange_ Attribute NI-DAQ FRM f or PC Compatibles 2-278 © Natio nal In strume nts Corp oratio n attribID = ND_LINE _FILTER (valid only fo r lineNum = ND_PFI_0 throu g h ND_PFI_39 ) attribID = ND_LINE_F ILTER (valid only fo r lineNum = ND_RTSI_0 through ND_RTSI_6 a nd ND_RTSI_CLOCK ) Using This Function When a[...]

  • Страница 312

    Chap ter 2 Funct ion Ref ere nce — LPM16 _Cali brat e © National In strum ents Corp oration 2-279 N I-DA Q FRM fo r PC Compatibles LPM16_Calib rate Format status = LPM16_Calibrate (deviceNumber) Purpose Calibrates the LPM devices con verter . The calibration calculates the correct offset v o ltage for the v oltage comparator , adjusts positiv e [...]

  • Страница 313

    Chapter 2 Function R eference — MIO _Calibrate NI-DAQ FRM f or PC Compatibles 2-280 © Natio nal In strume nts Corp oratio n MIO_Ca libra te Format status = MIO_Calibrate (de viceNumber , calOP , saveNewCal, E EPR OMloc, calRefChan, DA C0chan, D A C1chan, calRefV olts, refLoc) Purpose Not e If you have an E Series device, use Calibrate _E_Series [...]

  • Страница 314

    Chapte r 2 Function Refe rence — MIO_ Calibrate © National In strum ents Corp oration 2-281 N I-DA Q FRM fo r PC Compatibles Para meter Discussion calOP determines the operation to b e perform e d. 1: Load calibrat ion const ants from EEPR OMloc . 2: C alibrate the ADC us in g internal reference volt age calib ration constant s in refLoc . 3: C [...]

  • Страница 315

    Chapter 2 Function R eference — MIO _Calibrate NI-DAQ FRM f or PC Compatibles 2-282 © Natio nal In strume nts Corp oratio n Fo r the A T-MIO-64F -5 and A T-MIO-1 6X: 1: User calibration area 1. 2: User calibration area 2. 3: User calibration area 3. 4: User calibration area 4. 5: User calibration area 5. 6: User calibration area 6. 7: User calib[...]

  • Страница 316

    Chapte r 2 Function Refe rence — MIO_ Calibrate © National In strum ents Corp oration 2-283 N I-DA Q FRM fo r PC Compatibles Unless you ha ve pre viously s tored ne w internal v oltage refere nce constant s in refL oc (the user reference area) 1 o r 2 by calling MIO_ Calibrate with calOp set to 4, you must us e refLoc 6 (the f actory reference a[...]

  • Страница 317

    Chapter 2 Function R eference — MIO _Config NI-DAQ FRM f or PC Compatibles 2-284 © Natio nal In strume nts Corp oratio n MIO_Co nfig Format status = MIO_Conf ig (deviceNumber , dither , useAMUX) Purpose T urns ditheri ng (the add i ti o n of Ga uss ian no is e to the analo g input si gn al ) on and of f, for an E Series de vice except the A T-MI[...]

  • Страница 318

    Chapte r 2 Function Re ference — MIO_Con fig © National In strum ents Corp oration 2-285 N I-DA Q FRM fo r PC Compatibles Using This Function T o use the AMUX-64T with de vices with 64 channels, you must call this function to specify whether to use the AMUX-64T input channels or the onboard channels for these d evices. F or examp le, if you hav [...]

  • Страница 319

    Chapter 2 Function R eferenc e — RTSI_Clea r NI-DAQ FRM f or PC Compatibles 2-286 © Natio nal In strume nts Corp oratio n R TSI_Cl ear Format status = R TSI_Clear (deviceNumber) Purpose Disconnects all R TS I bus trigger lines from signals on the specified device. Para meter Input Using This Function RTSI_Clear clears all R TSI bus trigger line [...]

  • Страница 320

    Chapter 2 Function R eferenc e — RTSI_Clock © National In strum ents Corp oration 2-287 N I-DA Q FRM fo r PC Compatibles R TSI_Clo ck Format status = R TSI_Clock (deviceNumber , connect, dir) Purpose Connects or d isconnects the system clock fr om the R TSI b us if the de vice can be programmed to do so. Y ou can connect or disco nnect the other[...]

  • Страница 321

    Chapter 2 Function R eferenc e — RTSI_Clock NI-DAQ FRM f or PC Compatibles 2-288 © Natio nal In strume nts Corp oratio n RTSI_Clock al ways returns an error if deviceNumber is not an A T-MIO-16X, A T-MIO-64F -5, A T- A O-6/10, or a DIO 6533 ( D IO-32HS). T o connect the system clock signal of an y other de vice to the R TS I bus, you must chang [...]

  • Страница 322

    Chap ter 2 Funct ion Re fere nce — RTS I_Co nn © National In strum ents Corp oration 2-289 N I-DA Q FRM fo r PC Compatibles RTSI_Conn Format status = RTSI_Conn (deviceNumber , sig Co de, trigLine, dir) Purpose Connects a de vice to the specified R T SI bus trigger line. Para meters Input Para meter Discussion sigCode is the signal code number of[...]

  • Страница 323

    Chapter 2 Function R eference — RTSI_C onn NI-DAQ FRM f or PC Compatibles 2-290 © Natio nal In strume nts Corp oratio n The second call could access another non-E Series MIO or AI device an d use parameters sigCode = 0, trig Lin e = 3, and dir = 0. This call conf igures the second non -E Series MIO or AI de vice R TSI interface to recei ve a sig[...]

  • Страница 324

    Chap ter 2 Fun ctio n Refe rence — RTS I_D isConn © National In strum ents Corp oration 2-291 N I-DA Q FRM fo r PC Compatibles R TSI_DisConn Format sta tus = R TSI_D isCo nn (de viceNum ber , si gCo de, t rigL ine) Purpose Disconnects a de vice signal from the specified R TSI bus trigger line. Para meters Input Para meter Discussion sigCode is t[...]

  • Страница 325

    Chapter 2 Function R eference — SC_2 040_Config NI-DAQ FRM f or PC Compatibles 2-292 © Natio nal In strume nts Corp oratio n SC_204 0_Config Format status = SC_20 40_Conf ig (deviceNum ber , channel, s c2040gai n) Purpose Informs NI-D A Q that an SC-2040 T rack-and-Hold accessory is attached to the de vice specified b y deviceNumber and communic[...]

  • Страница 326

    Chapte r 2 F unction Re ferenc e — SC_2040_Conf ig © National In strum ents Corp oration 2-293 N I-DA Q FRM fo r PC Compatibles Example 1 Y ou ha ve selected set the jumper for a gai n of 100 for all y our SC-2040 channels. Y ou should call SC_2040_Config as follo ws: SC_2040_Config(deviceNumber, -1, 100 ) Example 2 Y ou ha ve selected g ain set[...]

  • Страница 327

    Chapter 2 Fun ction Reference — SCAN_Demux NI-DAQ FRM f or PC Compatibles 2-294 © Natio nal In strume nts Corp oratio n SCAN_Demux Format status = SCA N_D emux (buffer , cou nt, numC hans, num Mu xBrds ) Purpose Rearranges, or demultiplex es, data acquired b y a SCAN operation into row-major order (that is, each ro w of the array h olding the da[...]

  • Страница 328

    Chapter 2 Function Reference — SCAN_Demux © National In strum ents Corp oration 2-295 N I-DA Q FRM fo r PC Compatibles numMu xBrds is the number o f AMUX-64T de vices used during the multip le-chann el acquisition. NI-D A Q igno res this parameter for the DA QCard-50 0/700 and 516, Lab and 1200 Series, and LP M de vices and DSA devices. Range: 0[...]

  • Страница 329

    Chapter 2 Fun ction Reference — SCAN_Op NI-DAQ FRM f or PC Compatibles 2-296 © Natio nal In strume nts Corp oratio n SCAN_Op Format status = SCA N_Op (deviceNumber , nu mChans, chan s, gains, buffer , count, sa mpleRate, scanRate) Purpose Performs a synchronous, m ultiple-channel scan ned data acqui sition operatio n. SCAN_Op do es not return un[...]

  • Страница 330

    Chapter 2 F unction Reference — SCAN_ Op © National In strum ents Corp oration 2-297 N I-DA Q FRM fo r PC Compatibles chans is an integer array of a length not less than nu mCha ns that co ntains the channel scan sequence to be used. chans can contain an y on board analo g input channel nu mber (Range: 0 throug h 7 dif ferential, 0 through 15 si[...]

  • Страница 331

    Chapter 2 Fun ction Reference — SCAN_Op NI-DAQ FRM f or PC Compatibles 2-298 © Natio nal In strume nts Corp oratio n Voltage Ca lculat ion , for v alid gain setting s. If you use an inv alid gain, NI-DA Q returns an error . count is th e num ber o f sam p les to b e acqui r e d (that i s, th e num ber o f A/D conv ersions to be performed) . Rang[...]

  • Страница 332

    Chapter 2 F unction Reference — SCAN_ Op © National In strum ents Corp oration 2-299 N I-DA Q FRM fo r PC Compatibles Not e If you have selected external s tart trigg ering of the data acquisition op eration, a high-t o-lo w edge at the ST AR TTRIG* pin on the I/O con nector of th e MIO-16 and A T-MIO-1 6D, or the EXTTRI G* pin on the A T -MIO-1[...]

  • Страница 333

    Chapter 2 Fun ction Reference — SCAN_Sequence_Demux NI-DAQ FRM f or PC Compatibles 2-300 © Natio nal In strume nts Corp oratio n SCAN_Seque nce_Demux Format status = SCAN_Sequence_Demux (numChans, chanV ector , bufferSize, b uffer , samplesPerSequence, scanSequenceV ector , samplesPerChannelV ector) Purpose Rearranges the data produ ced by a mul[...]

  • Страница 334

    Chapter 2 Function Reference — SCAN_Sequence_Demux © National In strum ents Corp oration 2-301 N I-DA Q FRM fo r PC Compatibles chanVector contains the chann els sampled in the acquisition that produced the data contained in buffer . It might be identical to the channel vecto r you used in the call to SCAN_Sequence_Setup , or it m ight contain t[...]

  • Страница 335

    Chapter 2 Fun ction Reference — SCAN_Sequence_Demux NI-DAQ FRM f or PC Compatibles 2-302 © Natio nal In strume nts Corp oratio n samplesPerChannelVector [1]) - 1 (inde x 11). The f irst sample for the ch annel listed in chanVector [2] (ch annel 7) be gins at ( samplesPerCha nnelVector [0 ] + samplesPerChannelVector [1]) (index 12) and ends at ( [...]

  • Страница 336

    Chap ter 2 Functio n Refe renc e — SC AN_ Seq uence_R etrie ve © National In strum ents Corp oration 2-303 N I-DA Q FRM fo r PC Compatibles SCAN_Seque nce_Retrieve Format status = SCAN_Sequence_Retrieve (de vice, samplesPerSequence, scanSequenc eV ector) Purpose Returns the scan sequence created by NI-D A Q as a result of a pre vious call to SCA[...]

  • Страница 337

    Chapter 2 Fun ction Reference — SCAN_Sequence_Setup NI-DAQ FRM f or PC Compatibles 2-304 © Natio nal In strume nts Corp oratio n SCAN_Seque nce_Setup Format status = SCAN_Sequence_Setup (device, numChans, chanV ector , gainV ector , scanRateDivisorV ector , scansPerSequence, samplesPerSequence) Purpose Initializes the device for a multirate scan[...]

  • Страница 338

    Chapter 2 Func tion Reference — SCAN_Sequence_Setup © National In strum ents Corp oration 2-305 N I-DA Q FRM fo r PC Compatibles gainVector contains the g ain settings to be used for each channel in cha nVector . The channel listed in entry i of chanVector will have the gain listed in entry i of gainVector . scanRateDivisorVector con tains the s[...]

  • Страница 339

    Chapter 2 Fun ction Reference — SCAN_Sequence_Setup NI-DAQ FRM f or PC Compatibles 2-306 © Natio nal In strume nts Corp oratio n The scan sequence created b y NI-D A Q looks like this: scan numbe r: 1 2 3 4 chan nels sampled: 2, 5, 7, 2, 2, 5, 2 scansPerSequence = 4 samplesPerSequence = 7 If your bas e scan rate is 1,000 scans/s , channel 2 is s[...]

  • Страница 340

    Chapter 2 Function Reference — SCAN_Setup © National In strum ents Corp oration 2-307 N I-DA Q FRM fo r PC Compatibles SCAN_Setup Format status = SCAN_Setup (deviceNumber , numChans, chanV ector , gainV ector) Purpose Initializes circuitry for a scanned d ata acquisition operatio n. Initialization incl udes storin g a table of the channel sequen[...]

  • Страница 341

    Chapter 2 Fun ction Reference — SCAN_Setup NI-DAQ FRM f or PC Compatibles 2-308 © Natio nal In strume nts Corp oratio n de vices), or the total number of chan nels scanned equals (4) * ( numChan s ) * (num_mux _brds). Fo r example, if you use o ne AMUX-64T and scan eight onboard channel s, the total number of ch annels scanned equals (4) * (8) *[...]

  • Страница 342

    Chapter 2 Fun ction Reference — SCAN_Start © National In strum ents Corp oration 2-309 N I-DA Q FRM fo r PC Compatibles SCAN_Sta rt Format status = SCA N_Start (d eviceNumber , buffer , count , sam pTimebase, sampInt erval, scanT imebase , scanIn terv al) Purpose Initiates a multiple-chann el scanned da ta acqu isition operation , with or withou[...]

  • Страница 343

    Chapter 2 Fun ction Reference — SCAN_Start NI-DAQ FRM f or PC Compatibles 2-310 © Natio nal In strume nts Corp oratio n 2 throug h 2 24 * (total numb er of channels scanned) or 2 32 – 1, which ever is les s for E Serie s and DSA devi ces. For PCI -61 1 X d evices, count must be EVEN. count must be an integer multiple of the total number of cha[...]

  • Страница 344

    Chapter 2 Fun ction Reference — SCAN_Start © National In strum ents Corp oration 2-311 N I-DA Q FRM fo r PC Compatibles 0: External clock used as timebase (Conn ect your own timebase fr equency to the internal scan-interval counter via the SOURCE5 input for the MIO d evices or, by default, the PFI8 input for the E Series devices). 1: 1 MHz clock[...]

  • Страница 345

    Chapter 2 Fun ction Reference — SCAN_Start NI-DAQ FRM f or PC Compatibles 2-312 © Natio nal In strume nts Corp oratio n 1: 1 MHz clock used as timebase (1 µs resolution) (no n-E Series only). 2: 100 kHz clock used as timebase ( 10 µs resolution). 3: 10 kHz clock used as timebase (1 00 µs resolut ion) (non- E Series onl y). 4: 1 kHz clock used[...]

  • Страница 346

    Chapter 2 Fun ction Reference — SCAN_Start © National In strum ents Corp oration 2-313 N I-DA Q FRM fo r PC Compatibles you cannot control the scan interval externally . In thi s case, NI-DA Q scans th e channels repeatedly as fa st as you apply the external con version pulses. Not e Simultaneous sampling devices ignore parameters for sampTimeba[...]

  • Страница 347

    Chapter 2 Fun ction Reference — SCAN_Start NI-DAQ FRM f or PC Compatibles 2-314 © Natio nal In strume nts Corp oratio n If you hav e selected external start triggerin g of the data acquisitio n o peration, a high-to-low edge at the ST AR TTRIG* I/O connector input on the MIO-1 6/16D, or the EXTTR IG* connector on the MI O-F-5/16X initiates the d[...]

  • Страница 348

    Chapter 2 Fun ction Reference — SCAN_to_Disk © National In strum ents Corp oration 2-315 N I-DA Q FRM fo r PC Compatibles SCAN_to_Di sk Format status = SCA N_to_D isk ( deviceNumber , numChans , chans, gains , filename, count, sampleRa te, scanRate, concat) Purpose Performs a synchr on ous, multip le-chan nel scanned dat a acquisition operation [...]

  • Страница 349

    Chapter 2 Fun ction Reference — SCAN_to_Disk NI-DAQ FRM f or PC Compatibles 2-316 © Natio nal In strume nts Corp oratio n chans is an integer array of a length not less than numCh ans that contains the onboard channel scan sequence to be used. chans can con tain any analog inpu t channel numb er in any order . For channel number ranges, refer to[...]

  • Страница 350

    Chapter 2 Fun ction Reference — SCAN_to_Disk © National In strum ents Corp oration 2-317 N I-DA Q FRM fo r PC Compatibles count is th e num ber o f sam p les to b e acqui r e d (that i s, th e num ber o f A/D conv ersions to be performed). The length of your data file should be exactly twice the value of co unt . If you hav e previou sly enabled[...]

  • Страница 351

    Chapter 2 Fun ction Reference — SCAN_to_Disk NI-DAQ FRM f or PC Compatibles 2-318 © Natio nal In strume nts Corp oratio n when you en able pret rigger mod e. If you do not apply the stop trig ger , SCAN_to_Disk ev entually returns control to your app lication because you e ventually run out of disk space. In an y case, you can use Timeout_Config[...]

  • Страница 352

    Chapter 2 Func tion Reference — SCXI_AO_Write © National In strum ents Corp oration 2-319 N I-DA Q FRM fo r PC Compatibles SCXI_AO_Write Format status = SCX I_A O _Write (SCXIcha s sisID, moduleS lot, channel , opCo de, rangeCod e, voltCurr entData, binaryData, binaryWritten) Purpose Sets the D AC chan nel on the SCXI-1124 module to the specifi [...]

  • Страница 353

    Chapter 2 Fun ction Reference — SCXI_AO_Write NI-DAQ FRM f or PC Compatibles 2-320 © Natio nal In strume nts Corp oratio n 2: Translate a voltage or current v alue to binary, retur n in bi naryWr itt en . rangeCode is the v oltage or curren t range to be used fo r the analog ou tput channel. 0: 0 to 1 V. 1: 0 to 5 V. 2: 0 to 10 V. 3: –1 to 1 V[...]

  • Страница 354

    Chapter 2 Func tion Reference — SCXI_AO_Write © National In strum ents Corp oration 2-321 N I-DA Q FRM fo r PC Compatibles The SCXI-1 124 is sh ipped with a set of f actory calibrat ion const ants in t he facto ry-set EEPR OM area and a copy of the factory con stants in the EEPR O M load area. Y ou can recalibrate your m odule and store yo ur o [...]

  • Страница 355

    Chapter 2 Fun ction Reference — SCXI_Cal_Constants NI-DAQ FRM f or PC Compatibles 2-322 © Natio nal In strume nts Corp oratio n SCXI_Cal_Consta nts Format status = SCX I_Cal_Co nstants (SC XIchassisI D, moduleSlot , cha nnel, opCode, cal ibrationArea, rangeCode, SCXIg ain, D A Qboa rd, D A Qchan, DA Qgain, TBgain , scaled1, binary1, s caled2, bi[...]

  • Страница 356

    Chapter 2 Function Reference — SCXI_Cal_Con stants © National In strum ents Corp oration 2-323 N I-DA Q FRM fo r PC Compatibles Output Para meter Discussion channel is the number of th e channel on the mo dule. Range: 0 to n –1, wher e n is the number of chan nels available on the modu le. –1: All channe ls on the m odule. F or instance, the[...]

  • Страница 357

    Chapter 2 Fun ction Reference — SCXI_Cal_Constants NI-DAQ FRM f or PC Compatibles 2-324 © Natio nal In strume nts Corp oratio n 5: C opy the entire calib ration tab le in calibrationArea to driv er memory so NI-DAQ can use the table in subsequen t scaling operations in the curr ent NI-DAQ session (SCXI-1122, SCXI-112 4, SCXI-1126, and SCXI -1141[...]

  • Страница 358

    Chapter 2 Function Reference — SCXI_Cal_Con stants © National In strum ents Corp oration 2-325 N I-DA Q FRM fo r PC Compatibles range and p olarity setting s for this ch annel. This applies only when op Cod e = 0, 1, 2, or 3 and moduleSlot is an an alog input modu le. Otherwise, set to 0. DAQgain is the gai n setting for DAQchan . It is used to [...]

  • Страница 359

    Chapter 2 Fun ction Reference — SCXI_Cal_Constants NI-DAQ FRM f or PC Compatibles 2-326 © Natio nal In strume nts Corp oratio n milliamperes. If opCode = 3, y ou sho uld pa ss your second calibr ation const ant in calConst2 for N I-DA Q to s tore in calib rationArea . Not e C Progr ammers— calConst1 and calConst2 are pass-b y- reference para m[...]

  • Страница 360

    Chapter 2 Function Reference — SCXI_Cal_Con stants © National In strum ents Corp oration 2-327 N I-DA Q FRM fo r PC Compatibles 4. Ground your SC XI input chan nel. If yo u are usin g an SCXI-1100 , SCXI-112 2, or SCXI-11 41, you can use th e SCXI_Calibrate_Setup function to internally ground the module amplifier inputs. For other analog input m[...]

  • Страница 361

    Chapter 2 Fun ction Reference — SCXI_Cal_Constants NI-DAQ FRM f or PC Compatibles 2-328 © Natio nal In strume nts Corp oratio n use the end points of your e xpected inpu t range as sca led1 and sc ale d2 . Then yo u would be specifically calibrating your expected input voltage range. If you ar e using an S CXI-1100, SCXI -1122, SCXI-11 26, or SC[...]

  • Страница 362

    Chapter 2 Function Reference — SCXI_Cal_Con stants © National In strum ents Corp oration 2-329 N I-DA Q FRM fo r PC Compatibles calibrating, and then call SCXI_Cal_Constants ag ain at the end of your calibration sequence with opCode = 4 to copy the user EEPR O M area to the def ault load area. That way there will be two copies of your ne w const[...]

  • Страница 363

    Chapter 2 Fun ction Reference — SCXI_Calibrate_Setup NI-DAQ FRM f or PC Compatibles 2-330 © Natio nal In strume nts Corp oratio n SCXI_Calibrate_Set up Format status = SCX I_Calibra te_Setup (SCXIch assis ID, mo dul eSlot, calO p) Purpose Used to gro und the amplif ier inpu ts of an SCXI-110 0, SCXI-1122, or S CXI-1141 so th at you can determine[...]

  • Страница 364

    Chapter 2 Function Reference — SCXI_Calibrate_Se tup © National In strum ents Corp oration 2-331 N I-DA Q FRM fo r PC Compatibles 4. Ac quire dat a usi ng the DAQ functions; you sho uld acquire an d av erage ma ny sampl es. If y ou hav e enabled th e filter on the module, wait for the amplifier to settle after calling SCXI_Calibrate_Setup before[...]

  • Страница 365

    Chapter 2 Fun ction Reference — SCXI_Change_Ch an NI-DAQ FRM f or PC Compatibles 2-332 © Natio nal In strume nts Corp oratio n SCXI_Change_ Chan Format status = SCX I_Change_Ch an (SCXIch assisID, mo duleSlot, modu leChan) Purpose Selects a new ch annel of a m ultiple xed mo dule that you ha ve pre viously set up for a single- channel analog inp[...]

  • Страница 366

    Chapter 2 F unction Referenc e — SCXI_ Configure_Filte r © National In strum ents Corp oration 2-333 N I-DA Q FRM fo r PC Compatibles SCXI_Configu re_Filt er Format status = SCXI_Conf igure_Filter (chassisID, moduleSlot, channel, filterMode, fr eq, cutoffDi vDown, outClkDivDo wn, actualFr eq) Purpose Configures the filter on any SCXI module that[...]

  • Страница 367

    Chapter 2 Fun ction Reference — SCXI_Configure_Filter NI-DAQ FRM f or PC Compatibles 2-334 © Natio nal In strume nts Corp oratio n 2: Configure the filter to use an external sig nal. The module divides the external signal by cutoffDivDown to deter mine the filter cutof f frequency. T he module also divi des the ext ernal si gnal by ou tClkDivDow[...]

  • Страница 368

    Chapter 2 F unction Referenc e — SCXI_ Configure_Filte r © National In strum ents Corp oration 2-335 N I-DA Q FRM fo r PC Compatibles The SCXI-1126 has eight f ilter settings, one for each channel. These settings only work with f ilterMode = 1. The defau lt frequenc y setting for the S CXI-1126 is 1 Hz. The SCXI-11 41 also has one f ilter s etti[...]

  • Страница 369

    Chapter 2 Fun ction Reference — SCXI_Get_Chassis_Info NI-DAQ FRM f or PC Compatibles 2-336 © Natio nal In strume nts Corp oratio n SCXI_Get_Cha ssis_Info Format status = SCXI_Get_Chassis_Info ( SCXIchassis ID, chassisT yp e, chassisA ddress, commMode, commPath, numSlo ts) Purpose Return s chass i s conf iguration in formation. Para meters Input [...]

  • Страница 370

    Chapter 2 Func tion Reference — SCXI_Get_Chassis_Info © National In strum ents Corp oration 2-337 N I-DA Q FRM fo r PC Compatibles comm Mode is the Communicatio n mode that will be us ed when the driver co mmunicates with the SCXI chassis and modules. 0: Communication mode is disabled. In effect, the chassis is disabled. 1: Serial commu nication[...]

  • Страница 371

    Chapter 2 Fun ction Reference — SCXI_Get_Module_Info NI-DAQ FRM f or PC Compatibles 2-338 © Natio nal In strume nts Corp oratio n SCXI_Get_M odule_In fo Format status = SCX I_Get_Modu le_Info (SCXIchassisI D, moduleSlot , modulePresent, operatingMode, DA QdeviceNumber) Purpose Return s conf igurati on infor mation for t he gi ven chassi s slot n[...]

  • Страница 372

    Chapter 2 F unction Reference — SCXI_Get_Module_Info © National In strum ents Corp oration 2-339 N I-DA Q FRM fo r PC Compatibles 24: SCXI-1 162HV. 28: SCXI-1 163R. 30: SCXI-1 102. 32: SCXI-1 141. 38: SCXI-1 200. 40: SCXI-2 400. 42: VXI-S C-1102 44: VXI-S C-1150 68: SCXI-1 120D. Any other v alu e return ed in the modulePresent parameter indicate[...]

  • Страница 373

    Chapter 2 Fun ction Reference — SCXI_Get_State NI-DAQ FRM f or PC Compatibles 2-340 © Natio nal In strume nts Corp oratio n SCXI_Get_Sta te Format sta tus = SCXI _Get_S tate (SC XICh assis ID, mo duleSlo t, por t, c hanne l, da ta) Purpose Gets the state of a single channel or an entire port on a dig ital or relay SCXI module. Para meters Input [...]

  • Страница 374

    Chap ter 2 Functio n Refe renc e — SC XI_G et_ State © National In strum ents Corp oration 2-341 N I-DA Q FRM fo r PC Compatibles When channel = –1, dat a contains the pattern of an entire port. Bit 0 corresponds to th e state of channel 0 in the port, and the s tates of the other ch annels are represented in ascending order in dat a so that b[...]

  • Страница 375

    Chapter 2 Fun ction Reference — SCXI_Get_Status NI-DAQ FRM f or PC Compatibles 2-342 © Natio nal In strume nts Corp oratio n SCXI_Get_Sta tus Format statu s = SCX I_Get_ Statu s (SCXIC hassisID, moduleSlo t, wait, data) Purpose Reads the data in the Status Register on the specif ied module. This function suppor ts the SCXI-1160, V XI-SC-1102 , S[...]

  • Страница 376

    Chapter 2 Function Reference — SCXI_Get_Status © National In strum ents Corp oration 2-343 N I-DA Q FRM fo r PC Compatibles Using This Function If wait = 1, the function will wait a maximum o f 100 m s (or 3 s econds for the SCXI-1126) for the module status to be r eady . If, while polling the Status Register , a timeout occurs, the output pa ra[...]

  • Страница 377

    Chapter 2 Fun ction Reference — SCXI_Load_Config NI-DAQ FRM f or PC Compatibles 2-344 © Natio nal In strume nts Corp oratio n SCXI_Load_Co nfig Format statu s = SCXI_ Loa d _C onfig (SCX Ichas sisID) Purpose Loads the SCXI chass is configuration inform ation that you established in th e configuration utility . Sets the software states of the cha[...]

  • Страница 378

    Chapter 2 Function Reference — SCXI_ModuleID_Read © National In strum ents Corp oration 2-345 N I-DA Q FRM fo r PC Compatibles SCXI_Modu leID_Read Format status = SCX I_ModuleID_ Read (SCXIchas sisID, modu leSlot, ModuleI D) Purpose Reads the Module ID re gister of the SCXI module in the gi ven slot. Para meters Input Output Para meter Discussio[...]

  • Страница 379

    Chapter 2 Fun ction Reference — SCXI_ModuleID_Read NI-DAQ FRM f or PC Compatibles 2-346 © Natio nal In strume nts Corp oratio n 30: SCXI-1 102. 32: SCXI-1 141. 38: SCXI-1 200. 40: SCXI-2 400. 42: VXI-S C-1102. 44: VXI-S C-1150. 68: SCXI-1120 D. Using This Function The principal dif ference between this function and SCXI_Get_Modul e_Info is th at[...]

  • Страница 380

    Chapter 2 Func tion Reference — SCXI_MuxCtr_Setup © National In strum ents Corp oration 2-347 N I-DA Q FRM fo r PC Compatibles SCXI_MuxCtr_Setup Format status = SCX I_ Mu xCtr_Setup (deviceNumber , enable, scanDiv , ctrV alu e) Purpose Enables or disabl es a D A Q de vice counter to be u sed as a multiple xer coun ter during SCXI channel scannin[...]

  • Страница 381

    Chapter 2 Fun ction Reference — SCXI_MuxCtr_Setup NI-DAQ FRM f or PC Compatibles 2-348 © Natio nal In strume nts Corp oratio n Using This Function Y ou can use this functi on to synchron ize the s can list that NI-DA Q has load ed in to the mux-gain mem ory of the DA Q de vice and the SCXI module scan list that NI-D A Q has loaded into Slot 0 of[...]

  • Страница 382

    Chapter 2 F unction Reference — SCXI_Reset © National In strum ents Corp oration 2-349 N I-DA Q FRM fo r PC Compatibles SCXI_Reset Format status = SCX I_Reset (SCXIch assisID, mo du leSlot) Purpose Resets the specified module to its default state. Y ou can also use SCXI_Reset to reset the Slot 0 scanning circuitry or to reset the entire chassis.[...]

  • Страница 383

    Chapter 2 Fun ction Reference — SCXI_Reset NI-DAQ FRM f or PC Compatibles 2-350 © Natio nal In strume nts Corp oratio n • SCXI-11 20, SCXI-11 20D, SC XI-1121, and SCXI-1140: – If the module is op eratin g in Multip lexed mode: Channel 0 is sel ected. Multiplexed channel scann ing is disabled . Module output is enabled if the module is cabled[...]

  • Страница 384

    Chapter 2 F unction Reference — SCXI_Reset © National In strum ents Corp oration 2-351 N I-DA Q FRM fo r PC Compatibles • SCXI-11 63: Initializes all of the d igi tal output lines on the m o dule to a logical high state. • SCXI-11 63R: Initializes all of the solid state relays to their open states. • SCXI-12 00: Sets channel 0 to read from[...]

  • Страница 385

    Chapter 2 Fun ction Reference — SCXI_Scale NI-DAQ FRM f or PC Compatibles 2-352 © Natio nal In strume nts Corp oratio n SCXI_Scale Format status = SCX I_Scale (SCXIch assisID, mo dul eSlot, chann e l, SCXIg ain, TBgain , D AQboard, D A Qchannel, DA Qgain, numPoints, binArray , scaledArray) Purpose Scales an array o f binary data acquire d from a[...]

  • Страница 386

    Chapter 2 Func tion Reference — SCXI_Scale © National In strum ents Corp oration 2-353 N I-DA Q FRM fo r PC Compatibles Para meter Discussion channel is the number of th e channel on the SCXI modu le. Range: 0 to n –1, wher e n is the number of chan nels available on the modu le. –1: Scale data acquired from the temperature sensor on the ter[...]

  • Страница 387

    Chapter 2 Fun ction Reference — SCXI_Scale NI-DAQ FRM f or PC Compatibles 2-354 © Natio nal In strume nts Corp oratio n binArray is th e array of bi na ry data for the given channel. binArray should contain numPoints data samples from the SCXI channel . If you acqui red data fr om more than on e SCXI channel, yo u need to demultiple x the binary[...]

  • Страница 388

    Chapter 2 Function Reference — SCXI_SCAN_Setup © National In strum ents Corp oration 2-355 N I-DA Q FRM fo r PC Compatibles SCXI_SCAN_Setup Format status = SCXI_SCAN_Setup (SCXIch assisID, numModu les, moduleList, nu mChans, startChans, DA QdeviceNum ber , mo deFla g) Purpose Sets up the SCXI chassis for a multiplexed scanning d ata acquisition [...]

  • Страница 389

    Chapter 2 Fun ction Reference — SCXI_SCAN_Setup NI-DAQ FRM f or PC Compatibles 2-356 © Natio nal In strume nts Corp oratio n Any v alue in the modu leList array that is greater than the numb er of slots av ailable in the chassis (such as a v alue of 15 or 16) can act as a dummy entry in the module scan list. Dummy entries are very useful in mult[...]

  • Страница 390

    Chapter 2 Function Reference — SCXI_Set_Config © National In strum ents Corp oration 2-357 N I-DA Q FRM fo r PC Compatibles SCXI_Set_C onfig Format status = SCXI_Set_Confi g (SCXIchassisID, chass isT ype, chassisA ddress, commMode, comm Pat h, nu mSlot s, modul esP res ent, opera ting Modes, connectionMap) Purpose Changes the softw are configur [...]

  • Страница 391

    Chapter 2 Fun ction Reference — SCXI_Set_Config NI-DAQ FRM f or PC Compatibles 2-358 © Natio nal In strume nts Corp oratio n 3: VXI-SC-1000 carrier module. 4: PXI-1010 ch assis. chassisAdd ress is the hardware jump ered address of an SCXI chassis. Range: 0 to 31. comm Mode is the communication m ode that will be used wh en the dri ver communicat[...]

  • Страница 392

    Chapter 2 Function Reference — SCXI_Set_Config © National In strum ents Corp oration 2-359 N I-DA Q FRM fo r PC Compatibles 24: SCXI-1 162HV. 28: SCXI-1 163R. 30: SCXI-1 102. 32: SCXI-1 141. 42: VXI-S C-1102. 44: VXI-S C-1150. 68: SCXI-1 120D. Any o ther v alue for an element of the modulesPresent array indicates th at a module that is unfamilia[...]

  • Страница 393

    Chapter 2 Fun ction Reference — SCXI_Set_Gain NI-DAQ FRM f or PC Compatibles 2-360 © Natio nal In strume nts Corp oratio n SCXI_Set_Gai n Format statu s = SCXI_ Set_G ain (S C X Icha ssisID , mod uleSl ot , chan nel, g ain ) Purpose Sets the specified channel to the given gain or range settin g o n any SCXI module that suppor ts programmable gai[...]

  • Страница 394

    Chapter 2 Function Reference — SCXI_Set_Input_Mode © National In strum ents Corp oration 2-361 N I-DA Q FRM fo r PC Compatibles SCXI_Set_Inp ut_Mode Format status = SCX I_Set_Inpu t_Mode (SC XIchassisI D, moduleSlo t, inp utMode) Purpose Conf igures the SCXI-11 22 channe ls for tw o-wire mode or fou r- wire mode. Para meters Input Para meter Dis[...]

  • Страница 395

    Chapter 2 Fun ction Reference — SCXI_Set_State NI-DAQ FRM f or PC Compatibles 2-362 © Natio nal In strume nts Corp oratio n SCXI_Set_St ate Format status = SCX I_Set_Stat e (SCXIChas sisID, modu le, port, cha nnel, data) Purpose Sets th e state of a singl e channel or an entir e port on a digital output o r relay mod ule. Para meters Input Para [...]

  • Страница 396

    Chapter 2 Function Reference — SCXI_Set_State © National In strum ents Corp oration 2-363 N I-DA Q FRM fo r PC Compatibles When channel = n, the LSB (b it 0) o f data contains the state of chan nel n on the specif ied port . For relay modules, a 0 bit indicates that th e relay is clos ed or in the n ormally closed p osition, and a 1 indicates th[...]

  • Страница 397

    Chapter 2 Fun ction Reference — SCXI_Set_Threshold NI-DAQ FRM f or PC Compatibles 2-364 © Natio nal In strume nts Corp oratio n SCXI_Set_Thre shold Format status = SCX I_Set_Threshold (SCX IChas sisI D, moduleSlo t, channel, level, hysteresis) Purpose Sets th e high and lo w thresh old v alues for the SC XI-1126 frequ ency-t o-v oltage mo dule. [...]

  • Страница 398

    Chapter 2 Function Reference — SCXI_Set_Th reshold © National In strum ents Corp oration 2-365 N I-DA Q FRM fo r PC Compatibles triggers lo w . The SCXI-1126 module us es the squa re wa ve t o produce a correspond ing voltage that is proportional to the frequency of the original input signal. The thresho ld v alues determine s which part of th e[...]

  • Страница 399

    Chapter 2 Fun ction Reference — SCXI_Single_Chan_Setup NI-DAQ FRM f or PC Compatibles 2-366 © Natio nal In strume nts Corp oratio n SCXI_Single_ Chan_Setup Format status = SCX I_Single_Cha n_Setup (SC X Icha ssisID, mo duleSlot, mo duleChan, D AQde v iceNumber) Purpose Sets up a multiple xed module for a single channel analog inp ut operation to[...]

  • Страница 400

    Chapter 2 Function Reference — SCXI_T rack_Hold_Co ntrol © National In strum ents Corp oration 2-367 N I-DA Q FRM fo r PC Compatibles SCXI_T ra ck_Hol d_Control Format status = SCXI_T rack_Hold_Control (SCXIchassisID, moduleSlot, state, D A QdeviceNumber) Purpose Contr ols the t rack/hold s tate of an SCXI- 1140 module th at you ha ve set up for[...]

  • Страница 401

    Chapter 2 Fun ction Reference — SCXI_T ra ck_Hold_Setup NI-DAQ FRM f or PC Compatibles 2-368 © Natio nal In strume nts Corp oratio n SCXI_T ra ck_Hol d_Setup Format status = SCX I_T ra ck_ Hold_Setup (S CXIchassis ID, moduleSlo t, in putMode, source, send, holdCount, DA QdeviceNumber) Purpose Establi shes the t rack/hold behavior of an SCXI-1140[...]

  • Страница 402

    Chapter 2 Function Reference — SCXI_T rack_Hold_Setup © National In strum ents Corp oration 2-369 N I-DA Q FRM fo r PC Compatibles source indicates what signal contr o ls the track/hold state of the mo dule. If the inputMod e is 0 , NI-D A Q ign ores this param eter . 0: A counter of the DAQ device that is cab led to the module will be the so u [...]

  • Страница 403

    Chapter 2 Fun ction Reference — SCXI_T ra ck_Hold_Setup NI-DAQ FRM f or PC Compatibles 2-370 © Natio nal In strume nts Corp oratio n DAQdeviceNumber is the de vice number of the D A Q device in the PC that will be used to acquire the data. I f the DAQdeviceNum ber specified is a Lab and 12 00 Series de vices , D A QCard-700, or LPM d e vice, inp[...]

  • Страница 404

    Chapter 2 Function Reference — SCXI_T rack_Hold_Setup © National In strum ents Corp oration 2-371 N I-DA Q FRM fo r PC Compatibles recei ve the source signal from the SCXIb us and dri ve the scan interval timer of the D A Q de vice, if you w ant; or the module can use the D A Q de vice counter outpu t and send the si gnal on the SCX I bus, even [...]

  • Страница 405

    Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-372 © Natio nal In strume nts Corp oratio n Select_Sig nal Format status = Select_Signal (deviceNumber , signal, source, sour ceSpec) Purpose Chooses the source and polarity of a signal that the de vice uses (E Series and D A QArb 5411 de vices only). Para meters Inp[...]

  • Страница 406

    Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-373 N I-DA Q FRM fo r PC Compatibles • ND_RTSI_CLOCK • ND_RTSI_0 thro ugh ND_RTSI_6 • ND_PLL_REF_SOURCE Not e The ND_OUT_START_TRIGGER , ND_OUT_UPDA TE , and ND_UPDATE_CLOCK_TIMEBASE values do not apply to the AI E Series devices. Not e The fo llow in[...]

  • Страница 407

    Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-374 © Natio nal In strume nts Corp oratio n Tabl e 2-3 5. Poss ible V alues for si gnal Gro up signal Description T imi ng an d Contr ol Signa ls Used Internally by t he Onbo ar d DAQ- S TC ND_IN_START_TRIGGER Start trigger for the DAQ and SCAN functions ND_IN_STOP_T[...]

  • Страница 408

    Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-375 N I-DA Q FRM fo r PC Compatibles Legal v alues for sour ce and sourceSpec depend on the signal and are sho wn in the fo llowing tables. signal = ND_IN_START_TRIGGER Use ND_IN_START_TRIGGER to initiate a data acq uisition sequ ence. Y ou can u se an exte[...]

  • Страница 409

    Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-376 © Natio nal In strume nts Corp oratio n signal = ND_IN_STOP_TRIGGER Use ND_IN_STOP_TRIGGER for d ata acquisition in the pretriggered mode. The selected transition on th e signal line indicates to the de vice that it should acquire a specif ied number of scans aft[...]

  • Страница 410

    Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-377 N I-DA Q FRM fo r PC Compatibles Use this signal for scan timing. Y ou can u se a D AQ- S TC timer for timing the scans, or y ou can use an e xternal signal. Y ou can also use the output of the general-purpose co unter 0 for scan timing. This can be use[...]

  • Страница 411

    Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-378 © Natio nal In strume nts Corp oratio n signal = ND_IN_SCAN_CLOCK_TIMEBASE Use ND_IN_SCAN_CLOCK_TIMEBASE as an inp ut into the D A Q-STC scan timer . The scan timer ge nera tes ti ming by count ing the sign al at its inpu t, and pro ducing an IN_START_SCAN signal[...]

  • Страница 412

    Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-379 N I-DA Q FRM fo r PC Compatibles Use ND_OUT_START_TRIGGER to initiate a wa vefor m generation sequence. Y ou can use an external sign al or the signal used as the ND_IN_START_TRIGGER , or NI-D A Q can generate it. Setting source to ND_IN_START_TRIGGER i[...]

  • Страница 413

    Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-380 © Natio nal In strume nts Corp oratio n Use this signal for gatin g the wa veform generation. For example, if you call this functi on with signal = ND_OUT_EXTE RNAL_GATE , source = ND_PFI_9 , and sourceSpec = ND_PAUSE_ON_HIGH , the wa veform generation will be pa[...]

  • Страница 414

    Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-381 N I-DA Q FRM fo r PC Compatibles Use ND_NONE to disable o utput on the pin. signal = ND_GPCTR0_OUTPUT Use ND_NONE to disable outp ut on th e pin. When you di sable out put on this pin, yo u can use the pin as an input pin, and you can attach an ex terna[...]

  • Страница 415

    Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-382 © Natio nal In strume nts Corp oratio n I/O connector b ecause the pin is used for device-to-SCXI com munication. Currently , there are no SCXI modules that require this. signal = ND_FREQ_OUT Use ND_NONE to disable the outpu t on the pin; in oth er words, to plac[...]

  • Страница 416

    Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-383 N I-DA Q FRM fo r PC Compatibles Not e Disabling the output on the PFI7 line (by calling S elect_S ignal with signal = ND_P FI_7 and so urce = ND_N ONE ) and then calli ng Select_ Signal with signal = ND_RTS I_i and source = ND_IN _SCAN_ START will resu[...]

  • Страница 417

    Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-384 © Natio nal In strume nts Corp oratio n Use source = ND_NONE to stop the de vice from dr iving the R TSI clock line. When source = ND_BOARD_CLOCK , this dev ice driv es the signal on the R TSI clock line. Fo r D A QA rb 5411 de vices, the board clock is a 20 MHz [...]

  • Страница 418

    Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-385 N I-DA Q FRM fo r PC Compatibles Parameter Discussion for the 6602 Devices Le gal range s for th e sign al , sour ce , and sourceSpec param e ters ar e given in term s of constants that are def ined in a head er file. • B ASIC programmers— NIDAQCNS.[...]

  • Страница 419

    Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-386 © Natio nal In strume nts Corp oratio n Example statu s = Select_Signal (1, ND_START_TRIGGER, ND_RTS I_5, ND_LOW_TO_HIGH) ; This e xample would route R TSI lines to be the start tri gger for the counter s on the TIO board. When R TSI lines hav e a rising edge, al[...]

  • Страница 420

    Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-387 N I-DA Q FRM fo r PC Compatibles Signal Name Equivalencies Fo r a v ariety of reasons, some timing signals are gi ven dif ferent names in the hardware documentation and the software and its documen tatio n . The following table lists the equiv alenci es[...]

  • Страница 421

    Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-388 © Natio nal In strume nts Corp oratio n Not e Unpredictable behavior might result if other VXIbus devices simultaneously use the same VXIbus trigger line that the VX I-MI O devices are using to synchron ize their opera tio ns. ND_RTSI_4 VXIb us TTL T rigger 4 (TT[...]

  • Страница 422

    Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-389 N I-DA Q FRM fo r PC Compatibles Set_DAQ_Device_Info Format status = Set_D A Q_Device_Inf o (deviceNumb er , infoT ype, inf oV a lu e) Purpose This function can be used to chang e the data transfer mode (interr upts and DMA) for certain classes of[...]

  • Страница 423

    Chapter 2 Function R eferenc e — Set_DAQ _Device _Info NI-DAQ FRM f or PC Compatibles 2-390 © Natio nal In strume nts Corp oratio n infoT ype can be one of the foll owing : infoT ype Description ND_ACK_REQ_EXCHANGE_GR1 ND_ACK_REQ_EXCHANGE_GR2 Used to e xchange the A CK and REQ pins on the DIO 6533 (DI O-32HS) conn ector ND_AI_FIFO_INTERRUPTS Use[...]

  • Страница 424

    Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-391 N I-DA Q FRM fo r PC Compatibles infoV alue can be one of the following : ND_DATA_XFER_MODE_GPCTR7 Method NI-D A Q uses for data transfers for buf fered GPCTR operations with the general- pur pose counter 7 ND_DATA_XFER_MODE_DIO_GR1 ND_DATA_XFER_M[...]

  • Страница 425

    Chapter 2 Function R eferenc e — Set_DAQ _Device _Info NI-DAQ FRM f or PC Compatibles 2-392 © Natio nal In strume nts Corp oratio n When NI-D A Q uses DMA channels for data transfers, it must hav e an interrupt le vel av ailable for the de vice performing the transfers. In this case, NI-D A Q uses interrupts for DMA controll er repr ogramming an[...]

  • Страница 426

    Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-393 N I-DA Q FRM fo r PC Compatibles All possible data transfer m ethods for the de vices supported b y NI-D A Q are listed below . If your de vice is not listed, non e of the data transfer mo des are applicable. The table also sho ws default values f[...]

  • Страница 427

    Chapter 2 Function R eferenc e — Set_DAQ _Device _Info NI-DAQ FRM f or PC Compatibles 2-394 © Natio nal In strume nts Corp oratio n DAQ C a r d - 6 5 3 3 ND_DATA_XFER_MO DE_DIO_GR1 ND_INTERRUPTS* ND_DATA_XFER_MODE_DIO_GR2 ND_INTERRUPTS* ND_ACK_REQ_EXCHANGE_GR1 ND_ON ND_OFF* ND_ACK_REQ_EXCHANGE_GR2 ND_ON ND_OFF* ND_CLOCK_REVERSE_MODE_GR1 ND_ON ND[...]

  • Страница 428

    Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-395 N I-DA Q FRM fo r PC Compatibles A T-MIO -16 E-2 NEC-MIO-16E-4 A T-MIO-64E-3 ND_DATA_XFER_MODE_AI ND_INTERRUPTS ND_UP_TO_1_DMA_CHANNEL* ND_DATA_XFER_MODE_AO_GR1 ND_INTERRUPTS ND_UP_TO_1_DMA_CHANNEL* ND_DATA_XFER_MODE_GPCTR0 ND_INTERRUPTS ND_UP_TO_[...]

  • Страница 429

    Chapter 2 Function R eferenc e — Set_DAQ _Device _Info NI-DAQ FRM f or PC Compatibles 2-396 © Natio nal In strume nts Corp oratio n A T -A I-1 6XE- 10 NEC-AI-16E-4 NEC-AI-16XE-50 ND_DATA_XFER_MODE_AI ND_INTERRUPTS ND_UP_TO_1_DMA_CHANNEL* ND_DATA_XFER_MODE_GPCTR0 ND_INTERRUPTS ND_UP_TO_1_DMA_CHANNEL ND_UP_TO_2_DMA_CHANNELS* ND_DATA_XFER_MODE_GPCT[...]

  • Страница 430

    Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-397 N I-DA Q FRM fo r PC Compatibles D A QPad-MI O-16XE-50 ND_DATA_XFER_MODE_AI ND_INTERRUPTS* ND_DATA_XFER_MODE_AO_GR1 ND_INTERRUPTS* ND_DATA_XFER_MODE_GPCTR0 ND_INTERRUPTS* ND_DATA_XFER_MODE_GPCTR1 ND_INTERRUPTS* ND_AI_FIFO_INTERRUPTS ND_INTERRUPT_E[...]

  • Страница 431

    Chapter 2 Function R eferenc e — Set_DAQ _Device _Info NI-DAQ FRM f or PC Compatibles 2-398 © Natio nal In strume nts Corp oratio n NI-D A Q uses interrupts and DMA channels for data tran sfers. The DMA data transfers are typically faster , so you might want to take advan tage of them. Remember that the data transfer modes ND_UP_TO_1_DMA_CHANNEL[...]

  • Страница 432

    Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-399 N I-DA Q FRM fo r PC Compatibles (A T-MIO-16F -5, A T-MIO-16X, A T-MIO-64F-5 only) If you want to use separa te DMA channels for each of the analog output ch annels, you ha ve to set ND_DATA_XFER_MODE_AO to ND_UP_TO_2_DMA_CHANNELS and ND_DAT A_XFE[...]

  • Страница 433

    Chapter 2 Function R eference — Timeout_ Config NI-DAQ FRM f or PC Compatibles 2-400 © Natio nal In strume nts Corp oratio n Timeout_ Config Format status = Timeou t_Config (deviceNumber , t imeo ut) Purpose Establishes a timeou t lim it th at is used by the synchronous fun c tio ns to ensure that these function s e ventu ally retur n control to[...]

  • Страница 434

    Chapter 2 Functio n Refere nce — Timeou t_Config © National In strum ents Corp oration 2-401 N I-DA Q FRM fo r PC Compatibles Lab_ISCAN_to_Disk WFM_from_Disk DAQ_to_Disk SCAN_Op WFM_Op SCAN_to_Disk[...]

  • Страница 435

    Chapter 2 Function R eference — WFM _Chan_ Control NI-DAQ FRM f or PC Compatibles 2-402 © Natio nal In strume nts Corp oratio n WFM_Chan_Con trol Format status = WFM_Chan _Contr ol (de viceNumber , chan, operat ion) Purpose T emporarily halts or restarts w avefo rm genera tion for a s ingle anal og output channel. Para meters Input Para meter Di[...]

  • Страница 436

    Chap ter 2 F unctio n Refere nce — WFM_ Chan_Co ntrol © National In strum ents Corp oration 2-403 N I-DA Q FRM fo r PC Compatibles A T- A O-6/10, A T-MIO-1 6X, and A T-MIO-64 F-5 only–Y o u can use the P A USE and RESUME oper ations on group 1 output ch annels o nly if at least one of the fo llo wing conditions is true: • Group 1 consist s o[...]

  • Страница 437

    Chapter 2 Function R eference — WFM _Check NI-DAQ FRM f or PC Compatibles 2-404 © Natio nal In strume nts Corp oratio n WFM_Check Format status = WFM_Check (deviceNumber , chan, wfmStopped, itersDone, points Done ) Purpose Returns s tatus info rmation concer ning a wa veform generat ion operat ion. Para meters Input Output Para meter Discussion [...]

  • Страница 438

    Chap ter 2 Functio n Refe renc e — W FM_ Check © National In strum ents Corp oration 2-405 N I-DA Q FRM fo r PC Compatibles pointsDone retu rns th e number of point s written to the anal og output channels sp ecified in chan for the current b uffe r iteration. For de vices that hav e analog output FIFOs, pointsDone returns the number of points w[...]

  • Страница 439

    Chapter 2 Function R eference — WFM _ClockRa te NI-DAQ FRM f or PC Compatibles 2-406 © Natio nal In strume nts Corp oratio n WFM_ClockRat e Format statu s = WFM_C lock Rate ( devic e Numbe r , grou p, whic hcloc k , tim ebase , interval, m ode) Purpose Sets an u pdate rate and a del ay rate for a group of analog output channels. Para meters Inpu[...]

  • Страница 440

    Chapter 2 Function R eference — WFM _ClockRa te © National In strum ents Corp oration 2-407 N I-DA Q FRM fo r PC Compatibles 0: If whichclock is equal to 0, the ex ternal clock is connected to OUT2 on the MIO-16 and AT-MIO-1 6D; to EXTDACUPDATE* on the AT-MIO-16F-5 , AT-MIO-64F-5, and AT-MIO-16X; to EXTUPD ATE on the AT-AO-6/10 an d Lab and 1200[...]

  • Страница 441

    Chapter 2 Function R eference — WFM _ClockRa te NI-DAQ FRM f or PC Compatibles 2-408 © Natio nal In strume nts Corp oratio n The only intern al timebases av ailable on the E Series de vices are 20 MHz and 100 kHz. If you use a timebase other than – 3 or 2 for these devices, NI- DA Q performs the appropriate translation, if poss ible. Not e If [...]

  • Страница 442

    Chapter 2 Function R eference — WFM _ClockRa te © National In strum ents Corp oration 2-409 N I-DA Q FRM fo r PC Compatibles (if it is not b usy in a dat a acqui sition or a count ing operat ion) to produce a clo ck of 100 kHz, which is used b y the count er produci ng the update interv al. Also supp ose that interval equals 25. This value indi [...]

  • Страница 443

    Chapter 2 Function R eference — WFM _ClockRa te NI-DAQ FRM f or PC Compatibles 2-410 © Natio nal In strume nts Corp oratio n • Delay interv al prescalar 2 corresponds to the interv al argume nt you use in this functio n when whichclock = 3. If you do not call th is functio n with whichclo ck = 3, this interv al is 2. When whichclock = 2, NI-D [...]

  • Страница 444

    Chap ter 2 Funct ion Ref ere nce — WFM_ DB_Con fig © National In strum ents Corp oration 2-411 N I-DA Q FRM fo r PC Compatibles WFM_ DB_C onfi g Format status = WFM _D B_Config (deviceNumber , numChans , chanV ect , dbMode, oldDataSto p partialT ransferSto p) Purpose Enables and disa bles the do uble-buf fered mode of w avefo rm generatio n. Par[...]

  • Страница 445

    Chapter 2 Function R eference — WFM _DB_Co nfig NI-DAQ FRM f or PC Compatibles 2-412 © Natio nal In strume nts Corp oratio n oldDat aStop is a flag whose v alue enables or disables the mechanism whereby NI-D A Q stops the wa vef orm generation when NI-D A Q it is about to generat e old data (data that has already been generat ed) a second time. [...]

  • Страница 446

    Chap ter 2 Funct ion Refer enc e — WFM_DB_ HalfRe ady © National In strum ents Corp oration 2-413 N I-DA Q FRM fo r PC Compatibles WFM_DB_HalfRea dy Format status = WFM_DB_HalfReady ( deviceNumber , numChans, chanV ect, halfReady) Purpose Checks if the ne xt half b uffer fo r one or mor e channels is a vail able for ne w data during a doubl e-b [...]

  • Страница 447

    Chapter 2 Function R eference — WFM _DB_Half Ready NI-DAQ FRM f or PC Compatibles 2-414 © Natio nal In strume nts Corp oratio n Using This Function Double-b uffered w avefo rm generatio n functions c yclically outp ut data from the wav eform bu ffer (specif ied in WFM_Load ). The wa veform b uffer is di vided into two equal halves so that NI-D A[...]

  • Страница 448

    Chap ter 2 Funct ion Ref ere nce — WFM_ DB_T ransf er © National In strum ents Corp oration 2-415 N I-DA Q FRM fo r PC Compatibles WFM_DB_T ransfer Format status = WFM_DB_T ransfer (deviceNumber , numChans, chanV ect, buffer , count) Purpose T ransfers new data into one o r more wa veform b u f f ers (selected in WFM_Load ) as wa veform generati[...]

  • Страница 449

    Chapter 2 Function R eferenc e — WFM_D B_T ran sfer NI-DAQ FRM f or PC Compatibles 2-416 © Natio nal In strume nts Corp oratio n buffer is the array of ne w d ata that is to be transferred into th e wa veform buff er(s). WFM_DB_Transfer can tran sf er ne w data to more than one w aveform b uffer , except on PCI E Series de vices. For example, if[...]

  • Страница 450

    Chapter 2 Functio n Refere nce — WFM _from_D isk © National In strum ents Corp oration 2-417 N I-DA Q FRM fo r PC Compatibles WFM_fr om_Dis k Format statu s = WFM_f rom_D isk ( device N umber , num Chan s , chan V ec t , fileName , start Pt, end Pt, iterations, rate) Purpose Assigns a disk file to on e or m ore analog o utpu t chann els, selects[...]

  • Страница 451

    Chapter 2 Function R eference — WFM _from_D isk NI-DAQ FRM f or PC Compatibles 2-418 © Natio nal In strume nts Corp oratio n fil eNa me is the name of the data f ile containing the w a veform data. F or MIO de vices (ex cept A T-MIO-16X , PCI-MIO-16XE-10 , and VXI-MIO-64XE- 10), A T- A O-6/10, and Lab and 1200 S eries analog ou tp ut de vices, t[...]

  • Страница 452

    Chapter 2 Functio n Refere nce — WFM _from_D isk © National In strum ents Corp oration 2-419 N I-DA Q FRM fo r PC Compatibles If you h av e changed the an alog output conf iguration fro m the defaults by changi ng the jumpers on the de vice, you must call AO_Configure to set the so ftware copies o f the settings prior to calling WFM_from_Disk . [...]

  • Страница 453

    Chapter 2 Function R eferenc e — WFM_G roup_Con trol NI-DAQ FRM f or PC Compatibles 2-420 © Natio nal In strume nts Corp oratio n WFM_Group_Co ntrol Format sta tus = W FM_Gr oup_Cont ro l (de viceNum ber , gr oup, oper ation) Purpose Control s wa veform generation f or a group of analog o utput channel s. Para meters Input Para meter Discussion [...]

  • Страница 454

    Chapter 2 Function Refer ence — WFM _Group_Co ntrol © National In strum ents Corp oration 2-421 N I-DA Q FRM fo r PC Compatibles Not e If you in vok e thi s function to clea r continuou s waveform generation tha t was stopped previously because of an underflow error , WFM_Group_Contro l does n ot report the occurrence of the underflo w error . I[...]

  • Страница 455

    Chapter 2 Function R eferenc e — WFM_G roup_Con trol NI-DAQ FRM f or PC Compatibles 2-422 © Natio nal In strume nts Corp oratio n generated after NI-D AQ e xecutes RESU ME. RESUME restarts wav eform generation if NI-D A Q has completed the number of iterations specified in WFM_Load . operation = 5 (STEP): This operation initiates a wa veform gen[...]

  • Страница 456

    Chap ter 2 Function Re ference — WFM_G roup_Setu p © National In strum ents Corp oration 2-423 N I-DA Q FRM fo r PC Compatibles WFM_Group_Se tup Format status = WFM _G roup_ Setup (deviceNumber , num Cha ns, chanV ect, group) Purpose Assigns one or more an alog outpu t channels to a wa veform generation group. A cal l to WFM_Group_Setup is only [...]

  • Страница 457

    Chapter 2 Function R eference — WFM _Group_Se tup NI-DAQ FRM f or PC Compatibles 2-424 © Natio nal In strume nts Corp oratio n Using This Function Fo r the A T- A O-6/10, you can assign analog outpu t channels to one of tw o wav eform generati on group s. Each grou p has a separ ate updat e clock source. Y ou can assign dif ferent update rates t[...]

  • Страница 458

    Chapte r 2 Functio n Refer enc e — WFM_Load © National In strum ents Corp oration 2-425 N I-DA Q FRM fo r PC Compatibles WFM_Load Format status = WFM_Load (deviceNumber , numCh ans, chanV ect, buffer , count, iterations, mode) Purpose Assigns a wa vefo rm bu ffer to one or mor e analog output chan nels and indicates the number of wa veform c ycl[...]

  • Страница 459

    Chapter 2 Function R eferenc e — WFM_Lo ad NI-DAQ FRM f or PC Compatibles 2-426 © Natio nal In strume nts Corp oratio n buffer is an array of inte ger values that ar e con verted to v oltages by D A Cs. If your de vice has 12-bit D A Cs, the dat a ranges fro m 0 to 4, 095 in uni polar mode and from –2 ,048 to 2,04 7 in bipolar mode. If your de[...]

  • Страница 460

    Chapte r 2 Functio n Refer enc e — WFM_Load © National In strum ents Corp oration 2-427 N I-DA Q FRM fo r PC Compatibles Not e The follo wing informat ion ap p lies to DA QAr b 5411 devices on ly: iterations is th e number of ti mes the wa veform gener ation st eps through buffer . A valu e o f 0 means that wa veform generation proceed s indefin[...]

  • Страница 461

    Chapter 2 Function R eferenc e — WFM_Lo ad NI-DAQ FRM f or PC Compatibles 2-428 © Natio nal In strume nts Corp oratio n and th e patter n of wavefor m foll o wed by del ay fo llowed by waveform an d so on, w hic h goes on indef initely (f or de vices other than D A QArb 5411 de vices). Not e The follo wing informat ion ap p lies to DA QAr b 5411[...]

  • Страница 462

    Chapte r 2 Functio n Refer enc e — WFM_Load © National In strum ents Corp oration 2-429 N I-DA Q FRM fo r PC Compatibles When mode is 0, NI-DA Q does not use F IFO mode w av eform generation. When mode is 1 and all of the follo wing conditio ns are satisf ied, NI-D A Q uses FIFO mode w a veform gener ation: • The wav eform b u ff er is small e[...]

  • Страница 463

    Chapter 2 Function R eferenc e — WFM_Lo ad NI-DAQ FRM f or PC Compatibles 2-430 © Natio nal In strume nts Corp oratio n DAQ Hardware Overview Guide . Y ou must u se the entire 16,384 points o f b uffer to define one cy cle of your w av eform. F or example, to generate d if ferent frequencies of a sinusoidal wa veform, you must load on ly one c y[...]

  • Страница 464

    Chapte r 2 Functio n Refer enc e — WFM_Load © National In strum ents Corp oration 2-431 N I-DA Q FRM fo r PC Compatibles Assume the following conditi on s: Update rate of the wavef orm is = U Hz , Accumulator size is = n bits, Desired frequ ency is = f Hz Then, the DDS F requenc y wor d [63:0] is= ( f * 2 n ) / U. Not e F or the D A QArb 54 11, [...]

  • Страница 465

    Chapter 2 Function R eferenc e — WFM_Lo ad NI-DAQ FRM f or PC Compatibles 2-432 © Natio nal In strume nts Corp oratio n Fo r each stage, Buf fer ID [31:0] specif ies the b uf fer number to be generated. Th is buf fer ID should correspon d to one of the buf fers that was loaded into the m emory earlier by calling WFM_Load with mode = 3. If this i[...]

  • Страница 466

    Chapte r 2 Functio n Refer enc e — WFM_Load © National In strum ents Corp oration 2-433 N I-DA Q FRM fo r PC Compatibles changing the jumper s on the device, you must c all AO_Configure to set the software co pies of the settings prior to calli ng WFM_Group_Control ( operation = ST AR T). Y ou can make repeated calls to WFM_Load to change the sh[...]

  • Страница 467

    Chapter 2 Function R eferenc e — WFM_O p NI-DAQ FRM f or PC Compatibles 2-434 © Natio nal In strume nts Corp oratio n WFM_Op Format status = WFM_Op (de viceNumber , numChans, chanV ect, buff er , count, iterations, rate) Purpose Assigns a wa vefo rm bu ffer to one or mor e analog output cha nnels, selects the rate and the number of times the dat[...]

  • Страница 468

    Chap ter 2 Function Re ferenc e — WFM_ Op © National In strum ents Corp oration 2-435 N I-DA Q FRM fo r PC Compatibles The DSA devices ha ve 18-bit D AC s and operate in bipolar mode only . Data will range from –131,07 2 to +131,0 71. F or DSA de vices each b uf f er element is 3 2 bits wide. Each d ata point goes in the upper 18 bits of its b[...]

  • Страница 469

    Chapter 2 Function R eferenc e — WFM_O p NI-DAQ FRM f or PC Compatibles 2-436 © Natio nal In strume nts Corp oratio n If you h av e changed the an alog output conf iguration fro m the defaults by changi ng the jumpers on the de vice, you must call AO_Configure t o set the so ftware copies of the se ttings prior to calling WFM_Op . NI-D A Q ignor[...]

  • Страница 470

    Chap ter 2 Funct ion Ref ere nce — WFM_ Rate © National In strum ents Corp oration 2-437 N I-DA Q FRM fo r PC Compatibles WFM_Rate Format status = WFM_ Rate (rate, units, tim ebase, updateInter val) Purpose Con verts a waveform generation update rate into the ti mebase and update-interval v alues needed to pr oduce the rate you w ant. Para meter[...]

  • Страница 471

    Chapter 2 Function R eferenc e — WFM_R ate NI-DAQ FRM f or PC Compatibles 2-438 © Natio nal In strume nts Corp oratio n 2: 100 kHz clock used as timebase (10 µs resolution ). 3: 10 kHz clock u sed as timebase ( 100 µ s resol ution) (Am951 3-based MIO devices only). 4: 1 kHz clock used as timebase (1 ms resol ution) (Am9513 -based MIO devices o[...]

  • Страница 472

    Chapte r 2 Functio n Refe rence — WFM_Scal e © National In strum ents Corp oration 2-439 N I-DA Q FRM fo r PC Compatibles WFM_Scale Format status = WFM_Scale (de viceNumber , chan, count, gain, voltArray , binArray) Purpose T ranslates an array of floating-poin t v alues that represent v oltages into an array of binary v alues that p rodu ce tho[...]

  • Страница 473

    Chapter 2 Function R eference — WFM _Scale NI-DAQ FRM f or PC Compatibles 2-440 © Natio nal In strume nts Corp oratio n range, NI-D A Q s ets the voltage to the maximu m or minimum v alue and returns an error . NI-D A Q still completes the trans lation, howe ver . Range: Any real num ber that pro duces a voltage wi thin the analo g output r ange[...]

  • Страница 474

    Chapter 2 Function R eference — WFM _Set_C lock © National In strum ents Corp oration 2-441 N I-DA Q FRM fo r PC Compatibles WFM_Set_ Clock Format WFM_Set_Clock ( deviceNumb er , group, whichClock , desiredRate, units, actualRa t e ) Purpose Sets th e update rate for a group of ch annels (DS A de vices onl y). Para meters Input Output Para meter[...]

  • Страница 475

    Chapter 2 Function R eference — WFM _Set_ Clock NI-DAQ FRM f or PC Compatibles 2-442 © Natio nal In strume nts Corp oratio n actualRate i s the rate at which data points are sent to the D A Cs. The capabilities of your device will determine ho w closely actualRate matches desiredRate . The DSA dev ices use the same base clock for both DAQ/SCAN a[...]

  • Страница 476

    © Natio nal In strume nts Corp oration A-1 NI- DAQ FR M for PC C omp atibl es Appendix A Status Codes This appendix lis ts the status codes returned by NI-D A Q, includin g the name a n d desc r iptio n. Each NI-D A Q function returns a status code that indicates whether the function was performed successfully . When an NI-D A Q function returns a[...]

  • Страница 477

    Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-2 © Natio nal In strume nts Corp oratio n –10007 badChanError A channel is out of range fo r the board type or input con fig uration; or th e combination of chann els is not all o wed; or the scan ord er must be re versed (0 last ). –10008 badGroupError The group i s in va lid. –10009 b[...]

  • Страница 478

    Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-3 NI- DAQ FR M for PC C omp atibl es –10022 badWriteCountError Y our data array cont ains an incomplete upda te , or you a re tryi ng to wr ite past the end of the intern al b uff er , or your output operation is co ntinuo us and the length of your array is n ot a multiple of one [...]

  • Страница 479

    Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-4 © Natio nal In strume nts Corp oratio n –10031 badChassis IDError The specified SCXI chassis does not correspond to a conf igured SCXI chassis. –10032 badModuleSlo tError The SCXI modu le slot that was specified is in v alid or corresponds to an empty s lot. –10033 invalidWinHa ndleEr[...]

  • Страница 480

    Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-5 NI- DAQ FR M for PC C omp atibl es –10089 badTotalCoun tError The total count is in consisten t with the bu ffer size and pretrigger scan co unt or with the board type. –10090 badRPGError The individual range, polarity , and gain settings are valid but the combinatio n is not [...]

  • Страница 481

    Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-6 © Natio nal In strume nts Corp oratio n –10124 gpctrBadEntityIDError Inva l i d entityID used. –10125 gpctrBadActionError Inva l i d action used. –10200 EEPROMreadError Un able to read data fro m EEPR O M. –10201 EEPROMwriteError Unable to write data to EEPR OM. –10202 EEPROMWrite[...]

  • Страница 482

    Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-7 NI- DAQ FR M for PC C omp atibl es –10247 cmosConfigError Th e CMOS conf iguratio n-memory fo r the device is empty or in valid, or the conf iguration s pecif ied does no t agree with the current configuration of the de vice, or the EISA system configuration is in valid. –1024[...]

  • Страница 483

    Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-8 © Natio nal In strume nts Corp oratio n –10256 comPortOpenError Th ere was an error in opening the specifi ed COM port. –10257 baseAddressError Bad base address specif ied in the configuration utility . –10258 dmaChannel1E rror Bad DMA channel 1 specif ied in the configuration util it[...]

  • Страница 484

    Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-9 NI- DAQ FR M for PC C omp atibl es –10345 chassisMemAllocError The required amount o f memory cannot be allocated on the remote SCXI unit for the specif ied operation. –10346 badPacketError The packet recei ved b y the remote SCXI unit is in vali d. Ch eck your ser ial port ca[...]

  • Страница 485

    Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-10 © Natio nal In strume nts Corp oratio n –10402 deviceNotFoundError No de vice is located in the specified slot or at the specif ied address. –10403 deviceSupportError The specified d evice do es not support the requested action ( the dri ver recognizes the de vice, but the action is in[...]

  • Страница 486

    Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-11 NI-DA Q FRM for PC C omp atibles –10440 sysOwnedRsrcError The specif ied resource is owned b y the driv er and cannot be accessed or modif ied b y the user . –10441 memCon figError No memo ry is conf i gured to sup port the current data- transfer mode, or the conf igured memo[...]

  • Страница 487

    Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-12 © Natio nal In strume nts Corp oratio n –10448 stackMemError The driv er is unable to continue pars ing a string input due to stack limitatio ns. –10449 cacheMemError A cache-related error occurred, or caching is no t supported in the cu rrent mode. –10450 physicalMemError A hardw ar[...]

  • Страница 488

    Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-13 NI-DA Q FRM for PC C omp atibles –10460 interfaceInteractionError Y o u hav e mixed VIs fr om the D A Q library and the _DA Q compatibili ty library ( LabVIEW 2.2 s tyle VIs). Y o u may switch between the two lib raries only b y running the D A Q VI Device Reset be fore c allin[...]

  • Страница 489

    Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-14 © Natio nal In strume nts Corp oratio n –10600 noSetupError No setup op erati on has been perf ormed for the specif i ed resources. Or , some resou rce s requ ire a speci fic ord ering of calls for proper setup. –10601 multSetupError The specified resources ha ve already been conf igur[...]

  • Страница 490

    Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-15 NI-DA Q FRM for PC C omp atibles –10611 badDirOnSomeL inesError Some of the lines in the sp ecified channel are no t config ured for the transfer direction specif ied. For a write transfer , some lines are conf igured for input. F or a read transfer , some lines are configured [...]

  • Страница 491

    Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-16 © Natio nal In strume nts Corp oratio n –10624 delayTrigError The delayed trigger mode is not support ed o r is no t av ailab le in the current conf iguration, or no delay source has been assigned. –10625 masterTrigError The trigger conf iguration for the trigg er master is in valid. ?[...]

  • Страница 492

    Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-17 NI-DA Q FRM for PC C omp atibles –10634 noContTransferInProgressError No conti nuous ( double-b uffered ) transfer is in prog ress for the specif ied resource. –10635 invalidSCXI OpModeError Either the SCXI op erating mode specified i n a conf iguration call is in valid, or a[...]

  • Страница 493

    Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-18 © Natio nal In strume nts Corp oratio n –10688 noTr igEn abledE rror The number of total scans and pretri gger scans implies th at a triggered start is intended, but triggerin g is not enabled. –10689 digitalTrigBError Digital trigger B is illegal for the number of total scans and pret[...]

  • Страница 494

    Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-19 NI-DA Q FRM for PC C omp atibles –10698 timebaseConflictError Y o u cannot use this combination of scan and sample clock tim ebases for this boar d. –10699 polarityConflictError Y o u cannot use this combination of scan and sample clock so urce polarities for this op eratio n[...]

  • Страница 495

    Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-20 © Natio nal In strume nts Corp oratio n –10783 calConstPolarityConflictError Calibration co n stants in the load area hav e a differ ent polarity fro m the current con f iguration. Therefore, if y ou recei ve this error , you should load constants from f actory . If you recei ve status +[...]

  • Страница 496

    Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-21 NI-DA Q FRM for PC C omp atibles –10809 gateSign alEr ror Attemp ted to start a pulse w idt h measurement with th e pulse in the phase to be measured (for e xample, high phase for hig h -level gating). –10840 internalDriverError An une xpected error occurred inside the driv e[...]

  • Страница 497

    Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-22 © Natio nal In strume nts Corp oratio n –10848 noDMACountAvailError The dr iv er could not obtai n a v alid reading fro m the tr ansfer -count register in the DMA controller . –10849 OpenFileError The con f iguratio n fi le could no t be opened. –10850 closeFileError Unable to close [...]

  • Страница 498

    Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-23 NI-DA Q FRM for PC C omp atibles –10883 wfmPoll DataLossError Ne w data could not be transferr ed to the wa veform b uff er of the remote SCXI unit to keep up with the wavef orm update r ate. T ry using a slo w er wa veform update rate if possible. –10884 pretrigReorderError [...]

  • Страница 499

    © Natio nal In strume nts Corp oration B-1 NI- DAQ FR M for PC C omp atibl es Appendix B Analog Input Channel, Gain Settings, and V oltage Calculation This appendix lis ts the valid channel and gain settings for DA Q bo ards, describes ho w NI-D A Q calculates voltage, and describes the measurem ent of of fset and gain adjustment. DAQ Device Analo[...]

  • Страница 500

    Appendix B Analog Input Channel, Gain Se ttings, and Voltage C alculatio n NI-DAQ FRM for PC Compatibles B-2 © Natio nal In strume nts Corp oratio n V alid Internal Analog Input Channels T able B-2 lists the v alid internal chann els for analog input de vices. D A QPad-MIO-1 6XE-50 0–15 and ND_CJ_TEMP † 0–7 and ND_CJ_TEMP † PCI-6110 E PCI-[...]

  • Страница 501

    Appendix B Ana log Input Channel, Ga in Settings, an d Voltage Calculatio n © Natio nal In strume nts Corp oration B-3 NI- DAQ FR M for PC C omp atibl es PCI-MIO-16XE- 10 PCI-MIO-16XE- 50 PXI-6030E PXI-6011E PCI-6031 E CPCI-603 0E CPCI-601 1E VXI-MIO-64XE-10 ND_INT_AI_GND ND_INT_REF_5V ND_INT_AO_GND_VS_AI_GND ND_INT_AO_CH_0 ND_INT_AO_CH_0_VS_REF_5[...]

  • Страница 502

    Appendix B Analog Input Channel, Gain Se ttings, and Voltage C alculatio n NI-DAQ FRM for PC Compatibles B-4 © Natio nal In strume nts Corp oratio n Internal Channel constants are defined in the following header f iles: • C progra mmers— NIDAQCNS.H ( DATAACQ.H for L abW indo w s/CVI) • B ASIC programmers — NIDAQCNS.INC ( V isual Basic for [...]

  • Страница 503

    Appendix B Ana log Input Channel, Ga in Settings, an d Voltage Calculatio n © Natio nal In strume nts Corp oration B-5 NI- DAQ FR M for PC C omp atibl es DAQ Devi ce Gain Setti ngs T able B-4 lists the valid gain settings for D A Q devices. V oltage Calculation AI_VScale and DAQ_VScale calcu late voltage from reading as follo ws: where: • maxRea[...]

  • Страница 504

    Appendix B Analog Input Channel, Gain Se ttings, and Voltage C alculatio n NI-DAQ FRM for PC Compatibles B-6 © Natio nal In strume nts Corp oratio n T able B-5 lists the values of maxReadi ng and maxVolt for different boar ds. Fo r the PC-LPM-16 and D A QCard-1200, ga in is ignored, and the foll owing form ula is us ed: Tabl e B-5. The Values of m[...]

  • Страница 505

    Appendix B Ana log Input Channel, Ga in Settings, an d Voltage Calculatio n © Natio nal In strume nts Corp oration B-7 NI- DAQ FR M for PC C omp atibl es Offset and Gain Adjustment Measuremen t of Offset T o determine th e offset parameter used in the AI_VScale and DAQ_VScale functions, follow this procedure: 1. Ground analog input channel i , whe[...]

  • Страница 506

    © Natio nal In strume nts Corp oration C-1 NI- DAQ FR M for PC C omp atibl es Appendix C NI-DAQ Function Support This appendix contains tables that show wh ich D A Q hardware each NI-D A Q function call supp orts. The NI-D A Q functions are listed in alphabetical order . A check mark indicates the hardware that the function supports. If yo u attem[...]

  • Страница 507

    Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-2 © Natio nal In strume nts Corp oratio n AI_VRead ✓✓✓✓ AI_VRead_Scan ✓✓✓ AI_VScale ✓✓✓✓ Align_DMA_Buffer AO_Change_Parameter ✓ ✓ AO_Configure ✓ ✓ ✓ AO_Update ✓ ✓ ✓ AO_VScale ✓ ✓ ✓ AO_VWrite ✓ ✓ ✓ AO_Write ✓ ✓ ✓ Calibrate_E_Se[...]

  • Страница 508

    Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-3 NI- DAQ FR M for PC C omp atibl es CTR_State ✓ CTR_Stop ✓ DAQ_Check ✓✓✓✓ DAQ_Clear ✓✓✓✓ DAQ_Config ✓✓✓✓ DAQ_DB_Config ✓✓✓✓ DAQ_DB_HalfReady ✓✓✓✓ DAQ_DB_Transfer ✓✓✓✓ DAQ_Monitor ✓✓✓✓ DAQ_Op ✓✓✓✓ DAQ_Rat[...]

  • Страница 509

    Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-4 © Natio nal In strume nts Corp oratio n DIG_SCAN_Setup * Get_DAQ_Device_Info ✓✓✓✓ Get_NI_DAQ_Version ✓✓✓✓ GPCTR_Change_Parameter ✓✓✓ GPCTR_Config_Buffer ✓✓✓ GPCTR_Control ✓✓✓ GPCTR_Set_Application ✓✓✓ GPCTR_Watch ✓✓✓ Init_DA_Brds ✓?[...]

  • Страница 510

    Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-5 NI- DAQ FR M for PC C omp atibl es Timeout_Config ✓✓✓✓ WFM_Chan_Control ✓ WFM_Check ✓ ✓ ✓ WFM_ClockRate ✓ ✓ ✓ WFM_DB_Config ✓ ✓ ✓ WFM_DB_HalfReady ✓ ✓ ✓ WFM_DB_Transfer ✓ ✓ ✓ WFM_from_Disk ✓ ✓ ✓ WFM_Group_Control ✓ ✓ ✓[...]

  • Страница 511

    Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-6 © Natio nal In strume nts Corp oratio n Table C-2. Lab/516/DA QCard-500/ 700 Fu nction s Fun cti on De vice 516 and LPM Devices DA QCa rd-500/700 Lab- PC+ 1200 Seri es AI_Check ✓✓✓✓ AI_Clear ✓✓✓✓ AI_Configure ✓✓✓✓ AI_Read ✓✓✓✓ AI_Setup ✓✓✓✓[...]

  • Страница 512

    Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-7 NI- DAQ FR M for PC C omp atibl es DAQ_to_Disk ✓✓✓✓ DAQ_VScale ✓✓✓✓ DIG_Block_Check ✓ ✓ DIG_Block_Clear ✓ ✓ DIG_Block_In ✓ ✓ DIG_Block_Out ✓ ✓ DIG_In_Line ✓✓✓✓ DIG_In_Port ✓✓✓✓ DIG_Out_Line ✓✓✓✓ DIG_Out_Port ✓✓[...]

  • Страница 513

    Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-8 © Natio nal In strume nts Corp oratio n Timeout_Config ✓✓✓✓ WFM_Chan_Control ✓ †† WFM_Check ✓ †† WFM_ClockRate ✓ †† WFM_DB_Config ✓ †† WFM_DB_HalfReady ✓ †† WFM_DB_Transfer ✓ †† WFM_from_Disk ✓ †† WFM_Group_Control ✓ †† WFM_[...]

  • Страница 514

    Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-9 NI- DAQ FR M for PC C omp atibl es Table C-3. DSA Device Functions Fun cti on De vice PCI-4451 PCI-4551 PCI-4452 PCI-4552 AI_Change_Parameter ✓✓✓✓ AO_Change_Parameter ✓ ✓ AO_Configure ✓ ✓ Config_HW_Analog_Trigger ✓✓✓✓ DAQ_Check ✓✓✓✓ DAQ_C[...]

  • Страница 515

    Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-10 © Natio nal In strume nts Corp oratio n GPCTR_Watch ✓✓✓✓ Init_DA_Brds ✓✓✓✓ SCAN_Demux ✓✓✓✓ SCAN_Op ✓✓✓✓ SCAN_Setup ✓✓✓✓ SCAN_Start ✓✓✓✓ SCAN_to_Disk ✓✓✓✓ Select_Signal ✓✓✓✓ Set_DAQ_Device_Info ✓✓✓✓ Timeout_C[...]

  • Страница 516

    Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-11 NI-DA Q FRM for PC C omp atibles Table C -4. Analo g Output Fa mily Func tions Fun cti on De vice DA QAr b 5411 Devices A O - 2DC Series A T -AO-6/10 VXI-AO-48XDC AO_Calibrate ✓ AO_Change_Parameter ✓ ✓ ✓ AO_Configure ✓✓✓✓ AO_Update ✓ ✓ AO_VScale ✓[...]

  • Страница 517

    Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-12 © Natio nal In strume nts Corp oratio n WFM_DB_Config ✓ WFM_DB_HalfReady ✓ WFM_DB_Transfer ✓ WFM_from_Disk ✓ WFM_Group_Control ✓ ✓ WFM_Group_Setup ✓ ✓ WFM_Load ✓ ✓ WFM_Op ✓ WFM_Rate ✓ WFM_Scale ✓ Table C -5. Digital I /O Family F unctio ns Fun cti on De[...]

  • Страница 518

    Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-13 NI-DA Q FRM for PC C omp atibles DIG_Block_PG_Config ✓ ✓ DIG_DB_Config ✓ ✓ DIG_DB_HalfReady ✓ ✓ DIG_DB_Tansfer ✓ ✓ DIG_GRP_Config ✓ ✓ DIG_GRP_Mode ✓ ✓ DIG_GRP_Status ✓ ✓ DIG_In_Grp ✓ ✓ DIG_In_Line ✓✓✓✓✓ DIG_In_Port ✓✓✓✓[...]

  • Страница 519

    Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-14 © Natio nal In strume nts Corp oratio n RTSI_DisConn ✓ ✓ Set_DAQ_Device_Info ✓ ✓ ✓ Timeout_Config ✓ ✓ Tabl e C-6. Timing D evice F unct ions Fun cti on De vice PC-TIO- 10 6602 device s Config_DAQ_Event_Message ✓ CTR_Config ✓ CTR_EvCount ✓ CTR_EvRead ✓ CTR_F[...]

  • Страница 520

    Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-15 NI-DA Q FRM for PC C omp atibles DIG_Line_Config ✓ DIG_Out_Line ✓ DIG_Out_Port ✓ DIG_Prt_Config ✓ Get_DAQ_Device_Info ✓ Get_NI_DAQ_Version ✓ GPCTR_Change_Parameter ✓ GPCTR_Config_Buffer ✓ GPCTR_Control ✓ GPCTR_Read_Buffer ✓ GPCTR_Set_Application ✓[...]

  • Страница 521

    Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-16 © Natio nal In strume nts Corp oratio n Table C -7. SCXI Func tions Function Module Devi ce SCXI-1100 1102 Seri es SCXI-1120, SCXI-1120 D SCXI-1121 SCXI-1122 SCXI-1124 SCXI-1140 SCXI-1141 SCXI-1160 SCXI-1161 SCXI-1162/1162HV SCXI-1163/1163R VXI-SC-1150 SCXI-1200 A O-2DC DA QCard[...]

  • Страница 522

    Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-17 NI-DA Q FRM for PC C omp atibles SCXI_Single_Chan_Setup ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ SCXI_Track_Hold_Control ✓ ✓ ✓ ✓ ✓ ✓ SCXI_Track_Hold_Setup ✓ ✓ ✓ ✓ ✓ ✓ Tabl e C-7. SCXI Func tions (Continu ed) Function Module Devi ce SCXI-1[...]

  • Страница 523

    © Natio nal In strume nts Corp oration D-1 NI-DA Q FRM for PC Com pat ibles Appendix D Customer Communication Fo r your con venience, this app endix contains form s to help you gath er the infor mation necessary to help us solve your technical problems and a f orm you can use to comment on the p roduct document ation. When you contact us , we need[...]

  • Страница 524

    NI-DAQ FRM for PC Compatibles D-2 © Natio nal In strume nts Corp oratio n Fax-on-Demand Support Fax -on-Demand is a 24- hour informat ion retrie v al system cont aining a librar y of documents on a wide range of tech nical information. Y ou can access F ax-on-Demand from a touch -tone telephone at 512 418 1111. E-Mail Support (Currently USA Only) [...]

  • Страница 525

    T echnical Suppor t Form Photocopy this form and u pdate it each time you mak e changes to yo ur software or hardw are, and u se the completed cop y of this form as a reference f o r your current conf iguration. Completing this form accurately befor e contacting National Instruments for techni cal support helps our applications engineers answer you[...]

  • Страница 526

    NI-DAQ for PC Compatibles Hardware and Software Configuration Form Record the settings and re visions of your hard ware and softw are on the line to the right of each item. Complete a ne w copy of this form each tim e yo u re vise your softw are or har dware conf iguration, and use this form as a reference for yo ur current con figuration . Complet[...]

  • Страница 527

    Documentation Comment Form Natio n a l Inst ru m ent s enco u rages y o u t o comme n t o n the d o cume n tati o n s u p plied with o ur p ro d ucts . This informat i on he l ps us pr o v ide quality p r od ucts to meet yo ur n eeds. T i t l e : NI-DAQ ™ Function Reference Man ual fo r PC C ompatibles E diti o n Date: A p ri l 19 9 8 Part Number[...]

  • Страница 528

    © Natio nal In strume nts Corp oration G-1 NI-DA Q FRM for PC Com pat ibles Glossary Pref ix M eanings V alue p- pico 10 –1 2 n- nano- 10 –9 µ- micr o- 10 –6 m- m illi- 10 –3 k- kilo- 10 3 M- mega - 10 6 G- giga- 10 9 t- t era- 10 12 Number s/Symb ols °d e g r e e < less than or e qual to –m i n u s % perce nt +p l u s ±p l u s o r[...]

  • Страница 529

    NI-DAQ FRM for PC Compatibles) G-2 © Natio nal In strume nts Corp oratio n Gloss ar y A/D analog-to-digital ADC A/D conve rter ADC resolu tion the resolution of the ADC , which is measured in bits. An ADC wi th 16 bits has a hi gher re s olution, and thu s a h igher degree of accu rac y , than a 12- bit ADC. address ch aracter code that identif i [...]

  • Страница 530

    © Natio nal In strum ents C orpora tion G-3 NI-DAQ FRM for PC Co mpa tible s) Glossary bu ffer temporary storage for acquired or gen erated data (software) burst-mode a high-speed da ta transfer in which the address of the data is sen t followed by back-to -back data words while a physical signal is asserted bu s the g roup of conducto rs that int[...]

  • Страница 531

    NI-DAQ FRM for PC Compatibles) G-4 © Natio nal In strume nts Corp oratio n Gloss ar y DA Q data acquisition—(1) collecting and measuring electri cal signals from sensors, t ransducer s, and test pro b es or fixt ures and inp utting them t o a computer for processing; (2) collecting and measuring the same kinds of electrical signals with A/D and/[...]

  • Страница 532

    © Natio nal In strum ents C orpora tion G-5 NI-DAQ FRM for PC Co mpa tible s) Glossary dri vers software that controls a specific hardware de vice such as a D A Q board or a GPIB interf ace board DSP digital signal processing E EEPROM electro nically er asable progr ammable read- only mem ory EISA Extend ed I ndus tr y Sta nd ard A rch ite ctu re [...]

  • Страница 533

    NI-DAQ FRM for PC Compatibles) G-6 © Natio nal In strume nts Corp oratio n Gloss ar y handle pointer to a point er to a block of memory; h andles refer ence arrays and strings . An ar r ay of s trings is a han dle to a blo c k of m e mory co ntai ni ng handles to string s. handshak ed digital I/O a type of digital acquisition/gener ation where a d[...]

  • Страница 534

    © Natio nal In strum ents C orpora tion G-7 NI-DAQ FRM for PC Co mpa tible s) Glossary K k kilo—the st andard metr ic pref ix for 1,000, or 10 3 , used with units of measure such as v olts, hertz, and meters K kilo —the pref ix for 1,024, or 2 10 , used with B in qu antifying data o r computer memo ry kbytes/s a un it f or data transfe r that [...]

  • Страница 535

    NI-DAQ FRM for PC Compatibles) G-8 © Natio nal In strume nts Corp oratio n Gloss ar y Mbytes/s a unit for data tr ansfer that means 1 million or 10 6 by te s /s MC Micro Chan ne l memo ry buffer S ee buf fer . min minu tes MIO multifunct ion I/O MITE MXI Interfaces to Ever ything —a custom ASIC designed by National Instruments that implements th[...]

  • Страница 536

    © Natio nal In strum ents C orpora tion G-9 NI-DAQ FRM for PC Co mpa tible s) Glossary nonreferen ced signal sources signal sources with v oltage signals that are not con nected to an absolute referenc e or system g round. Als o called floating signal s ources. So me common e xample of nonref erenced signal sources are batteries, transf ormers, or[...]

  • Страница 537

    NI-DAQ FRM for PC Compatibles) G-10 © Natio nal In strume nts Corp oratio n Gloss ar y PCMCIA an exp ansion bus architecture that has fou nd widespread acceptance as a de facto standard in notebook-size computers. I t originated as a specif ication for add-on memory cards written b y the Personal Computer Memory Card International Asso ciation. PF[...]

  • Страница 538

    © National In strume nts Corpora tion G-11 NI-DAQ FR M for PC Compatib les) Glossary S s secon ds S samples sample counter the clock th at counts th e output of the channel clo ck, in other words, th e number of samples take n. On boards with sim ultaneous sampling, t his counter counts the output of the scan clock and hence the number of scans. s[...]

  • Страница 539

    NI-DAQ FRM for PC Compatibles) G-12 © Natio nal In strume nts Corp oratio n Gloss ar y SS simultaneous sampling—a property of a system in which each inpu t or output channel is di gitized or updated at the same instant S/s sample s p er se co nd STC system timing con troller switchless de vice de vices that do not require d ip switches or jumper[...]

  • Страница 540

    © National In strume nts Corpora tion G-13 NI-DAQ FR M for PC Compatib les) Glossary V V volts W wa veform m ulti ple voltage readings taken at a specific sampling rate WF waveform wire data path between no des word the standard number of bits that a processor or m emory manipulates at one time. Microprocess ors typically use 8-b it, 16-bit , or 3[...]

  • Страница 541

    © Natio nal In strume nts Corp oration I-1 NI -DAQ FR M fo r PC Comp atib les Index Numbers 8253 cou nter (ICTR) f unctions. See counter/ timer function s. A AI and MIO dev ice func tio n support (t abl e), C - 1t oC - 5 AI_Change_P arameter function, 2-1 to 2-2 AI_Che ck f un ction, 2 -3 to 2-4 AI_C lear fu nct ion, 2-5 AI_Conf igure function, 2-[...]

  • Страница 542

    Index NI-DAQ FRM for PC Compatibles I-2 © Natio nal In strume nts Corp oratio n SCAN_Sequence_Demux, 2-300 to 2-3 02 SCAN_Sequence_Retriev e, 2-303 SCAN_Sequence_ Setup, 2-30 4 to 2-306 SCAN_S etup, 2- 307 to 2-3 08 SCAN_Start , 2-3 09 to 2-314 Select_Si gnal, 2-3 72 to 2-388 analog o utput calib ration, SCXI modules , 2-328 to 2-3 29 analog outpu[...]

  • Страница 543

    Inde x © Natio nal In strume nts Corp oration I-3 NI -DAQ FR M fo r PC Comp atib les semi-period measurement application, 2-239 to 2-2 40 signals on separate gates ap p lication, 2-242 to 2-2 44 bu l leti n boar d supp ort, D-1 bu rst trigger mode, for D A QA rb 5411 de vices, 2-34 C Calibrate_1 200 funct ion, 2-49 to 2-54 Calibrate_DS A functi on[...]

  • Страница 544

    Index NI-DAQ FRM for PC Compatibles I-4 © Natio nal In strume nts Corp oratio n DIG_T rigger_Conf ig, 2-192 to 2-194 GPCTR_Conf ig_Buf fer , 2-20 9 to 2-210 ICTR_S etu p, 2-2 51 to 2-254 LabW indo ws function panel tree, 1- 6 MIO_Co nfi g, 2-284 to 2-285 SC_2040_ Config fu nction, 2-292 to 2-2 93 SCXI_Conf igure_Filter , 2-333 to 2-335 SCXI_Get_Ch[...]

  • Страница 545

    Inde x © Natio nal In strume nts Corp oration I-5 NI -DAQ FR M fo r PC Comp atib les counting and time measurem ent applications. See also bu f fered counting and t ime measurement. ev ent counting application, 2-217 to 2-2 18 signals on two s eparate gates , 2-225 to 2-2 27 single period measurem ent, 2-218 to 2-2 20 single pulse widt h measureme[...]

  • Страница 546

    Index NI-DAQ FRM for PC Compatibles I-6 © Natio nal In strume nts Corp oratio n DIG_Block_Clear , 2-148 DIG_Block _In, 2-149 to 2-151 DIG_Block_Out, 2-15 2 to 2-153 DIG_Block _PG_Conf ig, 2-154 to 2-1 57 DIG_DB_Conf ig, 2-158 to 2-15 9 DIG_DB_HalfReady , 2-160 to 2-161 DIG_DB_T ransfer , 2-162 to 2-163 DIG_SCAN_Setup, 2-18 8 to 2-191 definition , [...]

  • Страница 547

    Inde x © Natio nal In strume nts Corp oration I-7 NI -DAQ FR M fo r PC Comp atib les definition , 1-1 4 LabW indows function panel tree, 1-12 F fax and telepho ne support, D-2 Fax -on-Demand su pport, D-2 FIFO tran sfer cond ition , 2-29 to 2-30 FIFO tr ansfer cou nt, 2-30 to 2-31 freq ue ncy shif t keying , 2-23 4 to 2-235 FTP supp ort, D-1 G gai[...]

  • Страница 548

    Index NI-DAQ FRM for PC Compatibles I-8 © Natio nal In strume nts Corp oratio n ND_SIMPLE_EVENT_CNT application, 2-217 to 2-2 18 ND_SINGLE_PERIOD_MSR applicat io n, 2-21 8 to 2-220 ND_SINGLE_PULSE_GNR application, 2-227 to 2-2 29 ND_SINGLE_PULSE_WIDTH_MSR applicat io n, 2-22 0 to 2-223 ND_SINGLE_TRIG_PULSE_GRN applicat io n, 2-22 9 to 2-231 ND_TRI[...]

  • Страница 549

    Inde x © Natio nal In strume nts Corp oration I-9 NI -DAQ FR M fo r PC Comp atib les conf iguration and calibr ation functions, 1-6 counter /timer fun ctions, 1- 11 to 1-12 D A Q-STC counter s (GPCTR), 1- 11 digi t al in put/output funct i o ns, 1-9 e vent m essaging functi ons, 1-12 group mo de digit al I/O fun ctions, 1- 10 initialization /u til[...]

  • Страница 550

    Index NI-DAQ FRM for PC Compatibles I-10 © Natio nal In strume nts Corp oratio n N NI-D A Q constants include fil e, Micros oft V isual Basic for W indo ws, 1-5 O offset an d gai n a djus tme nt gain adjustment measur ement, B-7 of fset measurement, B-7 output at tenuatio n, 2 -33 output enable setting, 2 -32 outpu t impedan ce, 2- 32 over f low d[...]

  • Страница 551

    Inde x © Natio nal In strume nts Corp oration I-11 NI-DA Q FRM for PC Com pat ibles SCAN_Sequence_Setup function, 2-304 to 2-3 06 SCAN_Setup fu nction, 2-307 to 2-308 SCAN_Start function , 2-309 to 2-31 4 SCAN_to _Disk funct ion, 2-3 15 t o 2-318 SCXI chassis IDs, 1-2 SCXI fu nction s definition , 1-1 3 LabW indows function pan el tree, 1-10 to 1-[...]

  • Страница 552

    Index NI-DAQ FRM for PC Compatibles I-12 © Natio nal In strume nts Corp oratio n ND_IN_SCAN_ST AR T signal definition (table) , 2-3 74 purpos e and use, 2- 376 to 2-377 ND_IN_ST AR T_TRIGGER signal definition (table) , 2-3 74 purpos e and use, 2- 375 ND_IN_STOP_TRIGGER signal definition (table) , 2-3 74 purpos e and use, 2- 376 ND_OUT_EXTERN AL_GA[...]

  • Страница 553

    Inde x © Natio nal In strume nts Corp oration I-13 NI-DA Q FRM for PC Com pat ibles square wa ve generation timing con siderations, 2-112 status codes, 1-1 t o 1-2 for mat , 1- 1 status values (table), 1 -1 summary of co des, A-1 t o A-23 steppe d trigger mo de, for D A QArb 5411 de vices, 2-34 SYNC du ty cycle, 2- 35 to 2-36 T technical support, [...]

  • Страница 554

    Index NI-DAQ FRM for PC Compatibles I-14 © Natio nal In strume nts Corp oratio n ARB mode, 2-431 to 2-432 data ranges for b uf fer parameter , D A QArb 5411 de vices (ta ble), 2-42 6 DDS m ode, 2-430 to 2-431 mode v alues for D A QArb 5411 de vices count parameter (table), 2-427 iteratio ns paramet er (table) , 2-428 using th e function, 2-432 to [...]