It sounds like you want to do DAQ Event Messaging. With this mechanism, the driver actively notifies the user of a specific DAQ Event by either posting a message on a message queue or calling a callback function.
There are several documents that describe how you can do this with Visual Basic. You can find some KnowledgeBase entries, and a really useful tutorial called "Using DAQ Event Messaging in Windows under Windows NT/95/3.1". You can find these by searching the http://www.ni.com/support pages for "daq event message", and then go on to choose Visual Basic, and Learning to use product features and functions.
The feature that you are looking for is pattern matching, which is DAQ Event type 8 ? Digital Pattern Matched. When the document refers to the
Config_DAQ_Event_Message, you can see the details of this function in the NI-DAQ Help file (Start menu >> Programs >> National Instruments >> NI-DAQ). As you will see in the tutorial, you use a different but analogous method. While you won't be using this particular function for Visual Basic, the description of those events may be helpful.
Regards,
Geneva L.
Applications Engineer
National Instruments
http://www.ni.com/ask