Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I do input pattern matching with the 6534?

I am configuring the 6534 to have one 8 bit input port and one 8-bit output port. Both input and output are in continuous mode. The input port is scanning for a specific pattern, but doesn't need to save the data. When this specific pattern is received, the VB program must be notified so that it can perform some action. This will occur every 2 seconds, i.e. the input pattern will match every two seconds. How do I perform this continuous pattern match and how can I throw away the input data without overflowing the input buffer?
0 Kudos
Message 1 of 2
(3,174 Views)
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
0 Kudos
Message 2 of 2
(3,174 Views)