Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-845x I2C Run Script.vi continue on error, how?

I am investigating how my device would behave under faults on I2C bus.  Right now NI-845x I2C Run Script.vi stops on the first error, but I need it to be a fault generator...

 

What do I need to do so that NI-845x I2C Run Script.vi essentially continues on error (no slave ACK, arb loss, etc.) and just blithely does what I tell it to do?  I want 8451 to fully execute S - DUT_W - byte0 - byte1 - P sequences even if there is no ACK by the slave.  This is to test my slave's ability to handle faults on the bus (yes, normally the master should stop on NACK, but I need to test what if the master doesn't).

 

I'm using General I2C Read Script.vi example as the building block.

 

0 Kudos
Message 1 of 4
(3,515 Views)

Unfortunately, it appears that the I2C driver is composed primarily of .dll calls. If the .dll is constructed in such a way that if it encounters any faults/errors it causes it to exit its current operation and return that error, you will not be able to alter that. Instead of using a script can you break out the individual calls? With LabVIEW you can clear errors in the error wire, but you can’t override a .dlls default behavior.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,497 Views)

Hi Matt,

 

I was afraid of that...

 

How do I break out the individual calls?  I'm following the examples and they require the whole I2C transaction sequence to be composed into a script before calling Script Run to execute.  The alternative seems to be to create single action scripts, but being new to Labview, I don't know if that's badform / nightmare or just the normal way to do things

 

0 Kudos
Message 3 of 4
(3,495 Views)

I don’t think you need to create single actions scripts. Take a look at some of the other examples that don’t use scripts. You can specify individual write or read command onto the bus. Hope this helps!

Matt
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,480 Views)