The NI ELVISmx Digital Writer allows for digital data to be written to the NI myDAQ digital lines.
2. Display Window
The Digital Writer display shows the line states of digital outputs being produced from the NI myDAQ. Each of the eight line state led indicators turns on (bright blue) if the line being written is high (3.3V), or turns off (dark blue) if the line is low (0V). The display also gives the numeric value of the digital port being written.
Note that the Numeric value is given in hexadecimal representation, and that one hexadecimal digit will represent lines 4-7 and a second digit will represent lines 0-3. If only four lines of the digital port are being written to, then the Numeric Value will be a single hexadecimal character calculated from only the 4 digital lines being used.
3. Configuration Settings
The configuration settings for the ELVISmx Digital Writer include inputs for selecting which digital lines to write to, what type of pattern to output, and what manual pattern to use. When using a manual pattern the configuration settings also provide push buttons for toggling, rotating or shifting the bits in the pattern.
The lines to write selection allows the user to select which lines to write to in the digital port on the side of the NI myDAQ unit. The available options are: 0-3, 4-7, and 0-7. Note that any digital lines that are being written to using the ELVISmx Digital Writer will be reserved while the digital writer is running, and will not be available to the ELVISmx Digital Reader, or any other program. To use the ELVISmx Digital Writer and Digital Reader at the same time, use lines 0-3 for one of the instruments, and lines 4-7 for the other.
The pattern drop down box allows for the use of a manual, ramping (0-255), Alternation 1/0’s, and Walking 1’s patterns.
The manual pattern option will output the pattern given in the Maul Pattern section, wich can be configured either by clicking the switches to toggle each bit individually, or by typing a hexadecimal value into the pattern number numeric control. While in the manual pattern mode, the Toggle button can be used to toggle of the bits being written by the digital writer. The rotate and shift buttons can also be used to effect the manual pattern, and will rotate the bits in the chosen direction, or shift the bits in the chosen direction while filling in with 0 values from the opposite end.
The ramp (0-255) pattern will continually change the digital outputs by counting up from 0. If all 8 bits are used, the pattern will count to 255. If only 4 bits are used, the pattern will count to 16 before starting at 0 again.
The Alternating 1/0’s pattern will alternate 1’s and 0’s through the bits of the output and then toggle the bits once. This results in the bits outputting the hexadecimal value A, followed by the value 5 on each of the 4-bits of the digital port. If the Digital Writer is being run continuously, the bits will continue to alternate between the hexadecimal outputs of A and 5.
The walking 1’s pattern will start with all of the digital lines being equal to zero, except the least significant digit. The Digital Writer will then move the single true value from the least significant digit toward the most significant digit one line at a time.
4. Instruments Control
The Instrument Control settings section of the Digital Writer allows the user to select which device they are outputting digital values from and if they’d like to generate one sample or generate continuously. This section also holds the run and stop buttons for the Digital Writer and a link to the help section for the Digital Writer in the NI ELVISmx help.
The device drop down selection box allows a user to select any myDAQ or ELVIS unit that is connected to the system. The device list, which includes the device numbers, is pulled from the devices and interfaces that can be seen in Measurement & Automation Explorer (MAX). To test or rename each device, see the Configuring and Testing your myDAQ in Measurement & Automation Explorer page.
The generation mode drop down selection box gives two options: run continuously, and run once. When run continuously is selected, the Digital Writer will start running as soon as the Run button is pressed, and will continue to output values until the Stop button is pressed. When run once is selected from the Generation Mode list, the Digital Writer will generate a single output when the Run button is pressed, and will then stop executing automatically.
Note that regardless of the Generation Mode, the output of the NI ELVISmx Digital Writer will stay latched on the NI myDAQ until another pattern is generated, the digital lines are configured for read, or the power is cycled on the NI myDAQ.
5. Related Links