LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to tell which commands will run in parallel?

Back to the original question.

 

The LabVIEW compiler is described here.

 

You are (apparently) saying that there is a significant difference between the two code alternatives. Sorry, I have no experience with .net at all, but does the upper code only have a single .net reference that you are branching? Just wondering if that would make a difference.

0 Kudos
Message 11 of 22
(1,355 Views)

@fsTAS wrote:

 

On the value property nodes I have no idea what overuse would be.  If you can take a look at my real code and let me know if there is any, I would appreciate it. 


All your value property nodes can be replaced by local variables, which are orders of magnitude more efficient. Value property nodes are synchronous and typically require a thread switch.

0 Kudos
Message 12 of 22
(1,353 Views)

@altenbach wrote:

  does the upper code only have a single .net reference that you are branching? Just wondering if that would make a difference.


Both cases use one .Net reference. Ocean optics' driver, what they call the wrapper object, can only be opened once even when using multiple devices.  I have no idea how this affects the .Net call. 

0 Kudos
Message 13 of 22
(1,347 Views)

 

All your value property nodes can be replaced by local variables, which are orders of magnitude more efficient. Value property nodes are synchronous and typically require a thread switch.


I had no idea. Thanks for the tip 🙂

0 Kudos
Message 14 of 22
(1,346 Views)

@fsTAS wrote:

Both cases use one .Net reference. Ocean optics' driver, what they call the wrapper object, can only be opened once even when using multiple devices.  I have no idea how this affects the .Net call. 

Sorry, but why is index array resized to two outputs of you are only branching from the upper terminal?

 

 

0 Kudos
Message 15 of 22
(1,340 Views)

Ocean Optics also has a certified LabVIEW driver which you might want to take a look at, though it provides slightly different functionality than the omnidriver.

0 Kudos
Message 16 of 22
(1,333 Views)

@altenbach wrote:

@fsTAS wrote:

Both cases use one .Net reference. Ocean optics' driver, what they call the wrapper object, can only be opened once even when using multiple devices.  I have no idea how this affects the .Net call. 

Sorry, but why is index array resized to two outputs of you are only branching from the upper terminal?

 

 


The array is built from the same .net refferences.  The person who write that part did not realize they use the same reffernece and I haven't changed it yet.

0 Kudos
Message 17 of 22
(1,326 Views)

@Gregory wrote:

Ocean Optics also has a certified LabVIEW driver which you might want to take a look at, though it provides slightly different functionality than the omnidriver.


Intersting... I'll have to ask them about that.

0 Kudos
Message 18 of 22
(1,325 Views)

 


@altenbach wrote:

Can you show us the entire code of the upper picture without the truncation on the left and right


Ok Got it.  I've included the two peices of code that illustrate the issue I was having the best, along with screenshots of the oscilloscopes.  I don't have a four channel oscilloscope and had to use two two channels instead.  In these pitures I read two spectrums from both spectrometers and send ten hardware triggers to the spectrometers.  In the twoWhile set they both read at the same time.  The third feedback is due to the spectrometer reading one more spectrum because its output buffer is empty.  In the oneWhile set you can see that each read happens on different hardware triggers.  Again extra feedback pulses are seen due to the spectrometers reading an extra spectrum because their output buffers are empty

0 Kudos
Message 20 of 22
(1,284 Views)