01-13-2017 02:35 PM
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.
01-13-2017 02:39 PM
@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.
01-13-2017 02:51 PM
@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.
01-13-2017 02:52 PM
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 🙂
01-13-2017 03:04 PM - edited 01-13-2017 03:05 PM
@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?
01-13-2017 03:11 PM
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.
01-13-2017 03:23 PM
@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.
01-13-2017 03:23 PM
@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.
01-13-2017 03:35 PM
01-14-2017 06:50 PM
@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