LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use the hardware compare feature of the 6551 card to trigger scripts

I can dynamically and seamlessly generate different waveforms by triggering different scriptTriggers that drive one or more of the 4 PFI lines. However, I need to evaluate a channel at a specific location or locations set by a script marker in real-time and generate a different waveform stored in on-board memory based on the result of the evaluation. I have attempted to use the hardware compare feature without any success. I am trying to dynamically respond to an I2C device based on the ACKs or NACK response of the device under test. Can the 6551 card accomplish this? Has anyone successfully tested an I2C or SMBus communication stream with 6551 card?
0 Kudos
Message 1 of 3
(2,617 Views)
 

Hello,

I can understand why hardware compare did not work out for you application.  Hardware compare uses a signal that was generated to make a digital pattern and then waits a few clock cycles before acquiring the signal that needs to be compared to the digital pattern. 

I would look into using a script trigger to evaluate the channel value, where the script structure controls when it is evaluated.  Please note that script triggers will need to be cleared after they are detected for reasserting.  Some script syntax actually clear the script trigger and then use a wait until script trigger structure.  Please refer to the HS DIO Help for documentation on Common Scripting Use Cases. 

Please provide us with further details about your application.  The more information, the better!  I was not too clear on what you where wanting to evaluate and where is it coming from. 

I would also like to mention that National Instruments has a NI USB 8451 which is capable of I2C communication.

NI USB 8451

Samantha
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(2,594 Views)
Hi JCRDLT,
 
Based on your description, it seems like you are looking for a way to select a waveform based on a trigger.  Scripting has an if/else instruction.  This allows you to select what the board does based on an event.  For example, the script below will generate wfm1 if we see script trigger0.  If the script trigger does not occur then the board generates wfm2.
 
script myScript1
  if scriptTrigger0
   Generate wfm1    
  else
   Generate wfm2    
  end if
end script
 
More detailed information on the if/else and other scripting instructions can be found in the NI Digital Waveform Generator/Analyzer Help file.  If you have any questions, please let me know.
 
Thanks,

Ryan
0 Kudos
Message 3 of 3
(2,570 Views)