01-19-2006 08:51 PM
01-19-2006 10:20 PM
Are you using traditional DAQ or DAQmx??
Anyhow, just browze LabVIEW examples and you will find sufficient examples for controlling/reading DIO's for both device drivers
Regards
Dev
01-20-2006 02:25 AM
01-20-2006 09:12 AM
01-20-2006 12:24 PM
Sounds like traditional NI-DAQ, right?
Both 'line mask' and 'pattern' are integers that are bit-mapped to the digital port. You can choose to display both numeric values in binary to help illustrate the behavior. So bit 0 is the 1's position, bit 1 is the 2's, bit 2 is the 4's, ..., bit n is the (2**n)'s position.
The behavior is that when you are writing to the port, the value of the particular bit in both 'line mask' and 'pattern' work together to determine what actually comes out of the board. Specifically, when the 'line mask' bit is set to 1, the 'pattern' bit will be written. When the 'line mask' bit is set to 0, the 'pattern bit' will be ignored and the output will remain at its present state.
01-20-2006 12:36 PM - edited 01-20-2006 12:36 PM
Line mask and pattern are "ANDed" together to determine which bits will be sent out. Here is an example:
Lets say you have a certain pattern that you want to send, 4 bits at a time. The pattern is 0101 0101. In your first write, set the line mask to 0000 1111. When the line mask and pattern run through the AND gate that is internal to the function, the output will be xxxx 0101, where xxxx is the previous state. In the second write, set the mask to 1111 0000. The output will be 0101 xxxx. Since the previous output was xxxx 0101, the final output will be 0101 0101.
This is useful if you have a set pattern to send out, and you want to just send certain bits at a time. You don't have to manipulate the pattern and stand a chance of changing it unintentionally. Just change the line mask, and the pattern remains unchanged.
Message Edited by tbob on 01-20-2006 11:40 AM
01-20-2006 01:01 PM
03-07-2006 01:54 PM - edited 03-07-2006 01:54 PM
Message Edited by GHernandez on 03-07-2006 01:58 PM
03-07-2006 03:39 PM