DAQ ECHO Help

What Are DAQ ECHO Controls?

When Should I Use DAQ Controls?

To Quickly Acquire Data Without Writing a Program

For Rapid Prototyping

As Components

How Do I Operate DAQ ECHO Controls?

The DAQ Numeric

The DAQ Sheet

The General Sheet

The Save/Recall Sheet

The DAQ Chart

The DAQ Sheet

The Alarms Sheet

The General Sheet

The Data Logging Sheet

The Save/Recall Sheet

How Do I Make a DAQ ECHO Control?

How Do I Program DAQ ECHO Controls?

DAQ Numeric Specifics

DAQ Chart Specifics

How are DAQ ECHO Controls Implemented?


What Are DAQ ECHO Controls?

DAQ ECHO controls are CVI User Interface controls that have been extended to have DAQ capabilities.  Currently, there are two types of DAQ ECHO controls available: DAQ Numerics and DAQ Charts.

A DAQ Numeric is simply a user interface numeric such as a tank, thermometer, or knob that is automatically tied to an analog channel.  You can set a DAQ Numeric to any input or output channel, including SCXI channels.

A DAQ Chart is a strip chart that can be tied to one or more analog input channels, and it features display, alarm, and data logging capabilities.

The following sample programs are provided with LabWindows/CVI:

    <cvidir>\samples\toolslib\custctrl\daq_num\daqndemo.prj

    <cvidir>\samples\toolslib\custctrl\daqchart\chartdem.prj

You should read the section How Do I Operate DAQ ECHO Controls? before running these example programs.


To Quickly Acquire Data Without Writing a Program

You can use DAQ Controls without writing a single line of code.   Each DAQ Control Instrument Driver contains a XXX_EditPopup function, where XXX is the name of the DAQ Control type.  This function can be run with default parameters from its function panel to create a temporary DAQ Control.  The function displays  the DAQ Control edit dialog, which allows you to test and save different configurations.  The configurations can later be recalled in an actual program.  While the edit dialog is displayed, the DAQ Control is fully functional and can be used to monitor, record, and control signals.


For Rapid Prototyping and For Dynamically Configurable Applications

Existing controls on your user interface panels can be converted to DAQ Controls with a single function call.  Once converted, these controls respond to right clicks by displaying the edit dialog for the control.  The edit dialog can be used to configure all aspects of the DAQ Controls operation while the program is running.  This runtime flexibility promotes the rapid creation of applications that you can adapt to the situation at hand.


As Components

If your application needs complete control over the operation of a DAQ Control,  you can disable or replace  the run-time edit dialog.  DAQ Controls can even be hidden from the operator and used purely as a configurable DAQ engine.  All aspects of DAQ control operation can be controlled programmatically by the functions in the instrument driver provided for each DAQ Control type.


How Do I Operate DAQ ECHO Controls?

You can view and modify the attributes of a DAQ ECHO control in a dialog box at run-time by right-clicking on the control.  The attributes are organized in tabbed dialog sheets for convenience.  You can save and recall different attribute settings in a configuration file.


The DAQ Sheet
The DAQ Numeric DAQ Sheet

You can use the DAQ Sheet to interactively configure your DAQ hardware settings.

Voltage - the voltage that is currently being read or driven.

Device - the device number that you assigned in WDAQCONF.EXE.

Channel String - the hardware channel to be read or driven.  You can use on-board channels and SCXI channels. DAQ Numeric Channel String Help

High Limit (Volts) - when the control is in Input mode, this is the highest voltage you expect to read.

Low Limit (Volts) - when the control is in Input mode, this is the lowest voltage you expect to read.

Requested Scan Frequency (Hz) - when the DAQ Numeric is in Input mode, this control specifies the requested frequency at which to scan the analog channel.

Actual Scan Frequency (Hz) - when the DAQ Numeric is in Input mode, this control displays  the actual frequency at which the analog channel is scanned.  The actual scan frequency may be less than the requested scan frequency because the scans are timed by software and subject to operating system latencies.

Input/Output Direction - when the control is in Input mode, the DAQ Numeric reads voltages.  When in Output mode, the DAQ Numeric drives voltages.

Enabled - when enabled, the control functions as a DAQ control.  When disabled, the control functions as a standard user interface control.


The General Sheet
The DAQ Numeric General Sheet

You can interactively configure the non-DAQ aspects of the DAQ Numeric using the General Sheet.

Dialog Title - the title that appears on the dialog box for the DAQ control.

Edit Dialog Pops Up Modually - if the dialog box is modal, you cannot move the input focus to any other panel in the application until you select OK or Cancel.  If the dialog box is not modal, it behaves like a top-level window.

Allow Right Click Editing - if enabled, the dialog box for the DAQ control appears when you right-click the mouse on the control.  If disabled, the dialog box for the DAQ control does not appear when you right-click the mouse on the control.

Control Is Visible - if enabled, the DAQ control is visible.  If disabled, the DAQ control is hidden.

Help... - invokes this help file.


The Save/Recall Sheet
The DAQ Numeric Save/Recall Sheet

You can interactively save and recall different configurations of the DAQ control using the Save/Recall Sheet.  The information is saved in a Windows style .ini file. This configuration file is always named custctrl.ini and is always saved and recalled in the same directory that holds your CVI project file or your standalone application executable file.

Configuration File - the file in which the configuration is saved.  You can save multiple configurations from multiple DAQ Controls in the same file.

Configuration Name - the name of the current configuration.

Save, Recall, and Delete - command buttons for saving, recalling and deleting configurations.


The DAQ Sheet2
The DAQ Chart DAQ Sheet

You can use the DAQ Sheet to interactively configure your DAQ hardware settings.

Device - the device number that you assigned in WDAQCONF.EXE.

Channel String - the hardware channel(s) to read.  You can use on-board channels and SCXI channels.  DAQ Chart Channel String Help

High Limit (Volts) -  the highest voltage you expect to read.

Low Limit (Volts) -  the lowest voltage you expect to read.

Requested Scan Frequency (Hz) - the frequency at which to scan the analog channel(s).

Actual Scan Frequency (Hz) - the frequency at which the analog channel(s) are actually scanned.  If the Actual Scan Frequency is too low or unstable, you may want to select Use Hardware Timing.

Scan Backlog - the number of scans that have been acquired into memory, but have not yet been plotted to the DAQ Chart.  If the Scan Backlog continues to grow, you will eventually get an overflow error.  If this is the case, you may want to decrease the  Requested Scan Frequency.

Use Hardware Timing - toggles between software timing (which uses a timer callback function) and hardware timing (which uses the Asynchronous Acquisition functions in the Easy I/O for DAQ instrument driver).  Software timing is useful for scan rates on the order of 10 Hz, but it is not highly accurate due to operating system latencies.  Hardware timing is accurate and may be necessary for scan rates in the range from 10 Hz to 300 Hz.  The maximum sustained scan rate you can achieve depends on the speed of your computer and the number of channels being sampled.  The disadvantage with hardware timing is that a hardware-timed acquisition blocks all other analog input on the DAQ device.

Enabled - when enabled, the control functions as a DAQ control.  When disabled, the control functions as a standard user interface control.


The Alarms Sheet
The DAQ Chart Alarms Sheet

You can interactively create alarms using the Alarms Sheet of the DAQ Chart.  You can set alarms to occur when data rises above or falls below a particular limit, or when data enters or leaves a particular range.  Alarms are passed to your program as events.  If you have a callback function for your DAQ Chart, alarm events are passed to the callback as EVENT_DAQ_CHART_ALARM_ON and EVENT_DAQ_CHART_ALARM_OFF.  See DAQ Chart Specifics in the How Do I Program DAQ ECHO Controls? section for details.  Alarms can also be configured to control data logging using the Advanced Logging Options dialog invoked by the Advanced... command button on the Data Logging Sheet.

Alarm List - A list of the names of the current alarms.

New Alarm... - invokes the Create New Alarm dialog box with the following controls:

-	Alarm Name - the name of the alarm.

-	Channel String - the channel monitored for alarm conditions.

-	Limit (Volts) - If the Alarm Mode is set to Trigger In Range, Trigger Out Of Range, or Trigger Above Limit, this control is the Upper Limit for the range alarm. If the Alarm Mode is set to Trigger Below Limit, this control is the Lower Limit for the alarm,

-	Lower Limit (Volts) - This control is used only when the Alarm Mode is set to Trigger In Range or Trigger Out Of Range.  It represents the lower limit of the range.

-	Alarm Mode - the type of condition under which the alarm occurs.  You can select on of the following modes:   Trigger Above Limit, Trigger Below Limit,  Trigger In Range, or Trigger Out Of Range.

-	Dead Band Width (Volts) - A hysteresis window used to prevent the repetitive triggering of alarms due to noise.   After an alarm has been triggered ON, it is not turned OFF until the signal returns across the alarm limit and passes all the way through the dead band.  Specifying a dead band width of zero disables the hysteresis window.

If the alarm mode is Trigger Above Limit, the alarm triggers ON when  the alarm is OFF and the signal rises above the alarm limit.  The alarm turns OFF when the alarm is ON and the signal falls below the alarm limit minus the dead band width.

If the alarm mode is Trigger Below Limit, the alarm triggers ON when the alarm is OFF and the signal falls below the alarm limit.  The alarm turns OFF when  the alarm is ON and the signal rises above the alarm limit plus the dead band width.

If the alarm mode is Trigger In Range, the alarm triggers ON when the alarm is OFF and the signal enters the range between the upper and lower limits.  The alarm turns OFF when the alarm is ON and the data leaves the range between the upper limit plus the dead band width and the lower limit minus the deadband width.

If the alarm mode is Trigger Out Of  Range, the alarm triggers ON when  the alarm is OFF and the data leaves the range between the upper and lower limits.  The alarm turns OFF when the alarm is ON and the data enters the range between the upper limit minus the dead band width and the lower limit plus the deadband width..

-	Trace Color - the color of the alarm trace.

-	Plot Alarm - if enabled, the alarm is plotted on the strip chart.  If disabled, the alarm is not be plotted on the strip chart.

Edit Alarm... - invokes the Edit Alarm dialog box, which is identical to the Create New Alarm dialog box.

Delete Alarm - deletes the currently highlighted alarm in the Alarm List.


The General Sheet2
The DAQ Chart General Sheet

You can interactively configure the non-DAQ aspects of the DAQ Chart using the General Sheet.

Dialog Title - the title that appears on the dialog box for the DAQ control.

Chart Refresh Frequency - the frequency at which the strip chart is refreshed.  As you lower the refresh frequency, the strip chart plots more points per update and therefore appears jerky.  On the other hand, if Use Hardware Timing is enabled, lowering the refresh frequency may allow you to achieve a higher scan frequency without an overflow error.

History Size (in scans) - the size of the history buffer that is maintained for the DAQ Chart.  The history buffer retains the most recent scans, up to the specified buffer size.  The DAQ Chart instrument driver contains a class of functions for retrieving and plotting data in the history buffer.

Edit Dialog Pops Up Modually - if the dialog box is modal, you cannot move the input focus to any other panel in the application until you select OK or Cancel.  If the dialog box is not modal, it behaves like a top-level window.

Allow Right Click Editing - if enabled, the dialog box for the DAQ control appears when you right-click the mouse on the control.  If disabled, the dialog box for the DAQ control does not appear when you right-click the mouse on the control.

Control Is Visible - if enabled, the DAQ control is visible.  If disabled, the DAQ control is hidden.

Edit Trace Colors... - invokes a trace color editor for changing the colors of the current traces and alarms.

Help... - invokes this help file.


The Data Logging Sheet
The DAQ Chart Data Logging Sheet

You can log data to disk using the Data Logging Sheet.  From this sheet you can select the log file, file format, and conditions for writing data to disk.

Name Log File - command button for selecting the data log file.  If you choose to log data in binary format, the log file has a .dat extension.  Otherwise, it has a .txt extension.  If you choose to log events, an event file is created with the same name as the log file, but with a .evt extension.

Data Log File - displays the name of the data log file.

Event Log File - displays the name of the event log file.

Log Overruns, Alarm Events, and Errors - while this check box is enabled, DAQ overruns, alarm events, and errors are written to the event log file.  DAQ overruns can occur when Use Hardware Timing is enabled and the scan rate is too fast to allow the DAQ Chart to display the acquired scans before the data in the internal circular buffer is overwritten.

File Format - ring control for selecting the log file format.  The options are:

-	Tab Delimited Text

-	Comma Delimited Text

-	Constant Field Width Text

-	Binary

If you want to import the log file into another application, you should select the appropriate file format.  Tab Delimited and  Comma Delimited text files can easily be imported into spreadsheet programs.  Constant Field Width text files are easy to read when viewed in a text editor. The binary file format results in a smaller data file that is faster to write but is not human readable.  If you log data in binary format, you can convert it to ASCII at a later time using the Convert Binary Log File command button.

File Layout... - this command button invokes a dialog box in which you can specify the field width for Constant Field Width Text and edit the column headings and comment field of the file header.

-	Field Width - the column width in characters for the Constant Field Width Text file format.

-	Write Header - specifies whether to write header information to the log file when using a text file format.  The header information is always written when using the binary file format.

-	Column Headings -specifies the headings for each column in the log file.  Each column heading should be separated by a comma.  You may leave some headings blank.

Note:	The first column in the log file is the time of each scan.

-	Comment -specifies a comment to add to the log file.

Start Logging Now - this command button starts the data logging process.  Whether data is actually logged is dependent on the states of the Pause Now command button and the Control Logging With Alarms check box.  (The Control Logging With Alarms check box is in the Advanced Logging Options dialog box,  which is invoked by the Advanced command button.)  The Start Logging Now button toggles to Terminate Logging when pressed.

Pause Now - this command button pauses the data logging process.  The Pause Now button toggles to Continue when pressed.

Logging State - displays the state of the data logging process.

Start Logging When Configuration is Loaded - specifies whether to start logging data immediately when the configuration is loaded.  Whether data is actually logged is dependent on the states of the Pause Now command button and the Control Logging With Alarms check box. (The Control Logging With Alarms check box is in the Advanced Logging Options dialog box,  which is invoked by the Advanced command button).

Advanced... - this command button invokes the Advanced Logging Options dialog, in which you specify the following advanced data logging features:

-	Log Mode - a ring control for selecting one of the following log modes:

Log Indefinitely - log data until the logging process is stopped manually or programmatically.  Using this mode causes the size of the log file to grow with each new logged scan.

Stop When All Scans Are Acquired - log data until the logging process is stopped manually, programmatically, or when the number of scans specified by Number Of Scans To Log/Keep have been written to the log file.

Log Indefinitely, Overwriting Oldest - log data until the logging process is stopped manually or programmatically.  However, when the number of scans specified by Number Of Scans To Log/Keep have been written to the log file,  the oldest scans are overwritten.  This mode allows you to log data indefinitely and still use a fixed amount of disk space. When this mode is selected., the maximum attainable scan frequency is reduced by a small amount when logging in binary format, and reduced by a significant amount when logging in text format.  Furthermore, once the log file has reached its maximum size and older scans are being overwritten, the most recent scan is not necessarily at the end of the log file.  When the log file is in text format, a blank line separates the newest scan from the oldest scan.  As always, each scan  begins with a time stamp.  The DAQ_Chart_SortLogFile() function can be called from its function panel or from a program to reorder the scans in a log file from oldest to newest.

-	Number Of Scans To Log/Keep - the maximum number of scans to retain in the log file.  This number is not used when the log mode is Log Indefinitely.

-	Log Time In Seconds - displays the approximate number of seconds it will take to log the specified number of scans at the current scan rate excluding any periods during which logging is paused.  This is valid only when the log mode is Stop When All Scans Are Acquired.

-	Control Logging With Alarms - if enabled, data logging is paused and resumed based on the state of alarms.

-	Only Log While Any Of The Checked Alarm Conditions Are True - a list of the alarm conditions which you can use to pause and resume data logging.   Logging is paused when none of the selected alarm conditions are true.

-	Prompt Before Overwriting Log Files - if enabled, you are prompted before an existing log file is overwritten.

Convert Binary Log File - if you created a log file with a binary  format, you can convert it to an ASCII file using this command button.  Before the conversion takes place, a dialog box appears for you to specify the Text Format, the field width for Constant Field Width Text, and the column headings and comment field of the file header.


The Save/Recall Sheet2
The DAQ Chart Save/Recall Sheet

You can interactively save and recall different configurations of the DAQ control using the Save/Recall Sheet.  The information is saved in a Windows style .ini file.  This configuration file is always named custctrl.ini and is always saved or recalled in the same directory that holds your CVI project file or your standalone application executable file.

Configuration File - the file in which the configuration is saved.  You can save multiple configurations from multiple DAQ Controls in the same file.

Configuration Name - the name of the current configuration.

Save, Recall, and Delete - command buttons for saving, recalling and deleting configurations.


How Do I Make a DAQ ECHO Control?

You can convert a standard numeric or strip chart control into a DAQ ECHO control by passing the control ID to DAQ_Numeric_ConvertFromNumeric() or DAQ_Chart_ConvertFromStripChart() in your program.    The original numeric or strip chart control may have been created programmatically or in the User Interface Editor.

You can also create a DAQ ECHO control from scratch by calling DAQ_Numeric_Create() or DAQ_Chart_Create().


How Do I Program DAQ ECHO Controls?

For a simple application, DAQ ECHO controls require no programming other than,

    daqCtrl = DAQ_Numeric_ConvertFromNumeric(panelHandle, CONTROL_ID, 0);

    RunUserInterface();

However, every aspect of a DAQ ECHO Control can be under programmatic control.  The APIs for the DAQ Numeric and DAQ Chart controls are provided as instrument drivers:

    <cvidir>\toolslib\custctrl\daq_num.fp

    <cvidir>\toolslib\custctrl\daqchart.fp

These instrument drivers are dependent on the Easy I/O for DAQ instrument driver.  See easyio.doc in the LabWindows/CVI program group for details.

Of the functions in the LabWindows/CVI User Interface Library, only DiscardCtrl() is guaranteed to work on ECHO controls.   However, you are free to experiment with the other functions in the User Interface Library since many of them will operate on DAQ ECHO controls successfully.  For example, you can use

SetCtrlAttribute(panel, daqChart, ATTR_WIDTH, width);

to set the width of a DAQ Chart control).


DAQ Numeric Specifics
DAQ Numeric Programming Specifics

A DAQ numeric control can be in input mode or output mode. When the control is in output mode, the value of the control is sent to the analog channel with which it is associated.  When the control is in input mode, the value of the control is continuously updated by reading the voltage at its associated analog input channel.

If a DAQ numeric has a callback function and is in input mode, an EVENT_DAQ_NUMERIC_UPDATE event is sent to the callback each time the analog input channel is read.   (double *)eventData1 is a pointer to a double which holds the value of the voltage read.   eventData2 is the result code of the Easy I/O for DAQ operation.  It is negative if an error occurred, positive if a warning occurred, and zero otherwise.  The callback function can scale or modify the voltage pointed to by eventData1 before the control is updated.


DAQ Chart Specifics
DAQ Chart Programming Specifics

A DAQ Chart control is a strip chart which automatically reads and plots data from its associated input channels.  DAQ Charts maintain a history buffer containing the acquired data and can be configured to watch for alarm conditions.  The input channels, data acquisition rate, history buffer size, alarm conditions, and many other parameters can be configured programmatically or interactively.

If a DAQ Chart control has a callback function, the callback receives the following events that are specific to DAQ Chart controls:

EVENT_DAQ_CHART_SCAN_READY - this event is sent each time the DAQ Chart has sampled its set of input channels.  (double *)eventData1 is a pointer to the acquired scan voltages.  eventData2 is the result code of the Easy I/O for DAQ operation.  It is negative if an error occurred, positive if a warning occurred, and zero otherwise.  The callback function can scale or modify the scan voltages pointed to by eventData1 before the control is updated..

EVENT_DAQ_CHART_HW_TIMED_SCAN_RESTARTED - the event is sent if the DAQ Chart is using hardware timing and the continuous acquisition process has been interrupted.  This event is sent as a warning that not all of the scans will be evenly spaced with respect to time, although the time stamp of each scan will still be correct.  The reason for the interruption is passed in eventData1.  eventData1 is VAL_DAQ_CHART_HW_TIMED_SCAN_BUF_OVERRUN if the DAQ Chart could not process all of the data at the current scan rate and had to discard some of the scans.  It is possible that a hardware timed transfer may be aborted if an attempt to do a synchronous read is performed during the transfer.  This might occur when directly calling an NI-DAQ analog input function during a transfer.. eventData1 is VAL_DAQ_CHART_HW_TIMED_TRANSFER_ABORTED if this situation occurs.

EVENT_DAQ_CHART_ALARM_ON - this event is sent when a channel voltage has violated an alarm limit.  The name of the alarm is passed in eventData1 as (char *)eventData1.  A pointer to  the value of the voltage which triggered the alarm is passed in eventData2 as (double *)eventData2.

EVENT_DAQ_CHART_ALARM_OFF - this event is sent when a channel voltage has is no longer violating an alarm limit.  The name of the alarm is passed in eventData1 as (char *)eventData1.  A pointer to the value of the voltage monitored by the alarm is passed in eventData2  as (double *)eventData2.


How are DAQ ECHO Controls Implemented?

DAQ Controls Are Instrument Drivers

DAQ Controls are implemented as instrument drivers in LabWindows/CVI source code.  This means that each DAQ Control function has an interactive function panel with on-line help.  In addition, a compiled object module is provided for each DAQ Control instrument driver for faster loading and execution.

Instrument Driver Dependencies

The DAQ Control instrument drivers take advantage of the instrument driver dependency feature of LabWindows/CVI.  This feature allows instrument drivers to depend on other instrument drivers.  When a DAQ Control instrument driver is loaded, all of the instrument drivers that it depends on are also loaded.  Through the use of instrument driver dependency, the implementation of DAQ Controls is structured as a hierarchy of re-usable software instrument driver components.  (Note:  Instrument driver dependencies are specified using the .FP Auto-Load List command in the Edit Menu in the Function Tree Editor.)

Callback Function Chaining

To extend the functionality of existing CVI user interface controls, DAQ Controls make use of the ability to dynamically replace or chain a controls callback function.  The callback chaining functions in the Programmers Toolbox instrument driver are used to easily override a controls existing callback function.

Timer Controls

Timer controls are used to automate the data acquisition and display processes for each DAQ Control.

Easy I/O for DAQ

DAQ Control instrument drivers depends on the Easy I/O for DAQ instrument driver to provide a device independent data acquisition API.

Support Disclaimer

Source code is provided for informational purposes only.   If you modify this source code, National Instruments cannot provide technical support for the modified code.


DAQ Chart Channel String Help

Refer to the chapter specific to your DAQ device in the DAQ Hardware Overview Guide to determine what channels are valid for your hardware. The document is an Adobe Acrobat file, daqhwov.pdf, that you can view on screen and also print. daqhwov.pdf is part of a set of .pdf files that come with every DAQ device sold by National Instruments.

You can also insert commands into the channel string to specify per-channel limits and an interchannel sample rate.  See the Command Strings section for details.

If you are using an MIO board, NEC-AI-16E-4, or NEC-AI-16XE-50

List the channels in the order in which they are to be read.  For example:

    "0,2,5"   	reads channels 0, 2, and 5 in that order

    "0:3"     	reads channels 0 through 3 inclusive

If you are using AMUX-64T boards

You can address AMUX-64T channels when you attach one, two, or four AMUX-64T boards to a plug-in data acquisition board.   The onboard channel to which each block of four, eight, or 16 AMUX-64T channels are multiplexed and the scanning order of the AMUX-64T channels are fixed.  To specify a range of AMUX-64T channels, therefore, you must enter in the channel list the onboard channel into which the range is multiplexed.  For example:

 "0"   	reads channels 0 through 3 on each AMUX-64T board in that order

To sample a single AMUX-64T channel, you must also specify the number of the AMUX-64T board. For example:

"AM1!3"  	samples channel 3 on AMUX-64T board 1

"AM4!8"  	samples channel 8 on AMUX-64T board 4

If you are using a Lab-PC+, DAQCard-500/700/1200,  DAQPad-1200, PC-LPM-16

These devices can sample input channels only in descending order, and you must end with channel 0 ("3:0").  If you are using a Lab-PC+ or 1200 product in differential mode, you must use even-numbered channels ("6,4,2,0").

If you are using a DAQPad-MIO-16XE-50

You can read the value of the cold junction compensation temperature sensor by specifying:

 "cjtemp"  	as the channel.

If you are using SCXI

You can address SCXI channels when you attach one or more SCXI chassis to a plug-in data acquisition board.  If you operate a module in parallel mode, you can specify an SCXI channel either by specifying the corresponding onboard channels or by using the SCXI channel syntax described below.   If you operate the modules in multiplexed mode, you must use the SCXI channel syntax.  The SCXI channel syntax is as follows:

"OB1!SCx!MDy!a"    	channel a on the module in slot y of the chassis with ID x is multiplexed into onboard channel 1

"OB0!SCx!MDy!a:b"  	channels a through b inclusive on the module in slot y of the chassis with ID x is multiplexed into onboard channel 0.

SCXI channel ranges cannot cross module boundaries.  SCXI channel ranges must always be specified using a lower number, followed by a colon, followed by a higher number.

The following examples of the SCXI channel syntax introduce the special SCXI channels:

"OB0!SCx!MDy!MTEMP"    	The temperature sensor configured in MTEMP mode on the terminal block connected to the multiplexed module in slot y of the chassis with ID x.

"OB1!SCx!MDy!DTEMP"    	The temperature sensor configured in DTEMP mode on the terminal block connected to the parallel module in slot y of the chassis with ID x.

"OB1!SCx!MDy!CJTEMP"    	(SCXI-1102 only) The temperature sensor on the terminal block connected to the module in slot y of the chassis with ID x.

"OB0!SCx!MDy!CALGND"   	(SCXI-1100 and SCXI-1122 only) The grounded amplifier of the module in slot y of the chassis with ID x.

"OB0!SCx!MDy!SHUNT0"   	 (SCXI-1121, SCXI-1122 and SCXI-1321 only) Channel 0 of the module in slot y of the chassis with ID x, with the shunt resistor applied.

"OB0!SCx!MDy!SHUNT0:3"	 (SCXI-1121, SCXI-1122 and SCXI-1321 only) Channel 0 through 3 of the module in slot y of the chassis with ID x, with the shunt resistors applied at each channel.

Command Strings

You can use command strings within the Channel String to specify per-channel limits and an interchannel sample rate.

For example,

    "cmd hi 10.0 low -10.0; 7:4; cmd hi 5.0 low -5.0; 3:0"

specifies that channels 7 through 4 should be scanned with limits of +/- 10.0 volts and channels 3 through 0 should be scanned with limits of +/- 5.0 volts.  As you view the Channel String from left to right, when a high/low limit command is encountered, those limits are assigned to the following channels until the next high/low limit command is encountered.

The High Limit and Low Limit parameters to AISampleChannels are the initial high/low limits.  These parameters can be thought of as the left-most high/low limit command.

The following Channel String,

    "cmd interChannelRate 1000.0; 0:3"

specifies that channels 0 through 3 should be sampled at 1000.0 Hz, in other words, there should be 1/1000.0 = 1ms of delay between each channel.  If you do not specify an interchannel sample rate, the channels are sampled as fast as possible for your hardware to achieve psuedo-simultaneous scanning.

The syntax for the command string can be described using the following guide:

•	items enclosed in [] are optional

•	<number> is an integer or real number

•	<LF> is a line-feed character

•	;|<LF> means you may use either ; or <LF> to separate command strings from channel strings

•	! may be used as an optional command separator

•	spaces are optional

The syntax for the initial command string that appears before any channels are specified is:

    "cmd [interChannelRate <number>[!]] [hi <number> [!]low <number>[!]];|<LF>"

The syntax for command strings that appear after any channels are specified is:

    ";|<LF> cmd hi <number>[!] low <number>[!] ;|<LF>"


DAQ Numeric Channel String Help

Refer to the chapter specific to your DAQ device in the DAQ Hardware Overview Guide to determine what channels are valid for your hardware. The document is an Adobe Acrobat file, daqhwov.pdf, that you can view on screen and also print. daqhwov.pdf is part of a set of .pdf files that come with every DAQ device sold by National Instruments.

If you are using a DAQ device without SCXI

List the channel to be read.  For example:

"0"	reads channel 0

"3"   	reads channel 3

If you ARE using AMUX-64T boards

To sample a single AMUX-64T channel, you must also specify the number of the AMUX-64T board. For example:

"AM1!3"  	samples channel 3 on AMUX-64T board 1

"AM4!8"  	samples channel 8 on AMUX-64T board 4

If you are using a DAQPad-MIO-16XE-50

You can read the value of the cold junction compensation temperature sensor by specifying:

"cjtemp"	as the channel.

If you are using SCXI

You can address SCXI channels when you attach one or more SCXI chassis to a plug-in data acquisition board.  If you operate a module in parallel mode, you can specify an SCXI channel either by specifying the corresponding onboard channels or by using the SCXI channel syntax described below.  If you operate the modules in multiplexed mode, you must use the SCXI channel syntax.

The SCXI channel syntax is as follows:

"OB1!SCx!MDy!a"    	channel a on the module in slot y of  the chassis with ID x is multiplexed into onboard channel 1

The following examples of the SCXI channel syntax introduce the special SCXI channels:

"OB0!SCx!MDy!MTEMP"    	The temperature sensor configured in MTEMP mode on the terminal block connected to the multiplexed module in slot y of the chassis with ID x.

"OB1!SCx!MDy!DTEMP"    	The temperature sensor configured in DTEMP mode on the terminal block connected to the parallel module in slot y of the chassis with ID x.

"OB1!SCx!MDy!CJTEMP"    	(SCXI-1102 only) The temperature sensor on the terminal block connected to the module in slot y of the chassis with ID x.

"OB0!SCx!MDy!CALGND"   	 (SCXI-1100 and SCXI-1122 only) The grounded amplifier of the module in slot y of the chassis with ID x.

"OB0!SCx!MDy!SHUNT0"   	(SCXI-1121, SCXI-1122 and SCXI-1321 only) Channel 0 of the module in slot y of the chassis with ID x, with the shunt resistor applied.


Copyright

©  Copyright 1996 National Instruments Corporation.  All rights reserved. July 1996 edition.

Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.

NI-DAQ(r), NI-488.2(tm), and NI-488.2M(tm), and NI-VXI(tm) are trademarks of National Instruments Corporation.

Product and company names listed are trademarks or trade names of their respective companies.

Limited Warranty

Warning Regarding Medical and Clinical Use

Limited Warranty

The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation.  National Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instruments receives notice of such defects during the warranty period.  National Instruments does not warrant that the operation of the software shall be uninterrupted or error free.

A Return Material Authorization (RMA) number must be obtained from the factory and clearly marked on the outside of the package before any equipment will be accepted for warranty work.  National Instruments will pay the shipping costs of returning to the owner parts which are covered by warranty.

National Instruments believes that the information in this manual is accurate.  The document has been carefully reviewed for technical accuracy.  In the event that technical or typographical errors exist, National Instruments reserves the right to make changes to subsequent editions of this document without prior notice to holders of this edition.  The reader should consult National Instruments if errors are suspected.  In no event shall National Instruments be liable for any damages arising out of or related to this document or the information contained in it.

EXCEPT AS SPECIFIED HEREIN, NATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  CUSTOMER'S RIGHT TO RECOVER DAMAGES CAUSED BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE CUSTOMER.  NATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF PRODUCTS, OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.  This limitation of the liability of National Instruments will apply regardless of the form of action, whether in contract or tort, including negligence.  Any action against National Instruments must be brought within one year after the cause of action accrues.  National Instruments shall not be liable for any delay in performance due to causes beyond its reasonable control.  The warranty provided herein does not cover damages, defects, malfunctions, or service failures caused by owner's failure to follow the National Instruments installation, operation, or maintenance instructions; owner's modification of the product; owner's abuse, misuse, or negligent acts; and power failure or surges, fire, flood, accident, actions of third parties, or other events outside reasonable control.

Warning Regarding Medical and Clinical Use
of National Instruments Products

National Instruments products are not designed with components and testing intended to ensure a level of reliability suitable for use in treatment and diagnosis of humans.  Applications of National Instruments products involving medical or clinical treatment can create a potential for accidental injury caused by product failure, or by errors on the part of the user or application designer.  Any use or application of National Instruments products for or involving medical or clinical treatment must be performed by properly trained and qualified medical personnel, and all traditional medical safeguards, equipment, and procedures that are appropriate in the particular situation to prevent serious injury or death should always continue to be used when National Instruments products are being used.  National Instruments products are NOT intended to be a substitute for any form of established process, procedure, or equipment used to monitor or safeguard human health and safety in medical or clinical treatment.