U3 and U6 running in parallel? | LabJack
 

U3 and U6 running in parallel?

2 posts / 0 new
Last post
User79
marc.legree's picture
U3 and U6 running in parallel?

Hello,

I am using Labview with one U3 and one U6 module.

U6 is used with your "U6 Four 32-bit Frequency Measurements"U6 example. And it works fine on its own just like that.

U3 is used to communicate with a SHT75 Sensirion temperature sensor using I2C communication. And it works fine on its own just like that.

When I get the 2 loops runing in parallel in the same program, the U6 loop doesn't refresh the values as quickly as when it's on its own, and I get perdiodically wrong values (that I don't have when running on its own).

 

I have attached the program in Labview 2011. And a screent shot.

 

Is there a way to have those 2 meaurements running correctely at the same time in the same program? 

Thanks for your help.

Regards,

User79

LabJack Support
LabJack Support's picture
Make sure FirstFound is False

Make sure FirstFound is False for all your open calls.  I would go ahead and hardwire a False constant to all your open calls.

Since you have parallel code, I recommend not using AddS-Go-Get.vi.  Use eAddGoGet instead.

Multiple U3 Efunction Loop Example.vi is an example we provide that talks to 2 different devices at the same time.

 

As for your timing issue, the calls are by default set to run in the UI thread, so all your calls are in the same thread even though you have drawn them in parallel.  You could try changing them to reentrant (might have a different name in newer versions of LabVIEW) instead.  For every sub-VI you use that makes a call to the UD library you need to do 2 things:

1.  Double-click on the Call Library node on the wiring diagram and change from "Run in UI Thread" to "Reentrant". 

2.  Go to File => VI Properties => Execution and check "Reentrant execution".

This last one you would actually do for every sub-vi, whether it makes a call to the UD library or not.

I suggest you first make copies of these sub-VIs and add reentrant to their name.  Modify those, rather than the originals provide by us.  That way if you get a new LabVIEW archive from us you will not lose these changes.