LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write and Read I2C

How can I combine the write and read examples for the I2C-Interface (USB8451)? I should include a 65ms delay between the writing and reading, too. In the attached VI I just put an write example and a read example together. Often the Error 301742 occured. 
0 Kudos
Message 1 of 2
(3,014 Views)

Hi Wastl,

I just looked into your VI and I think the main problem here is, that you are not using data flow programming. You just put two examples into one VI and that's all you did. The Problem is that you did not create a dataflow dependency between these two VIs. To avoid this problem i suggest you wire the error-cluster through all the VIs and not use the "simple error handler.vi" between the examples. I suppose that this could solve your problem.

Also you could, put the script creation in parallel and then execute the "run script" and read commands in a sequence structure, in the first you could then put the 65ms wait function in addition to the write command. After the sequence then put the two close reference VIs, merge the error handlers and then use the simple error handler.

I hope this can help you with your application development.

Best Regards,

 Andreas Pistek

Message Edited by Andi P on 07-04-2006 01:58 PM

~~~ Logic is a systematic method of coming to the wrong conclusion with confidence ~~~
0 Kudos
Message 2 of 2
(2,980 Views)