Mixed use of PS6000.dll and PS6000Wrap.dll in exampels?

Post your LabVIEW discussions here
Post Reply
jcoeandersen
Newbie
Posts: 0
Joined: Mon May 14, 2018 12:39 pm

Mixed use of PS6000.dll and PS6000Wrap.dll in exampels?

Post by jcoeandersen » Tue May 15, 2018 7:05 am

Hi.
I have looked at the example VI's for the PS 6000 series for some time now, and I am a bit confused as to why you are mixing the use of the PS6000.dll and PS6000Wrap.dll.

As I read section "3.58 Wrapper functions" of the Programmers Guide you should always use PS6000Wrap.dll for LabVIEW. So why does the examples use PS6000.dll in the majority of the VI'?

I hope for a quick answer, thanks.

Best regards
Jens Christian Andersen
/Jens Christian Andersen
CLA

Martyn
Site Admin
Site Admin
Posts: 3371
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Mixed use of PS6000.dll and PS6000Wrap.dll in exampels?

Post by Martyn » Tue May 15, 2018 8:33 am

The majority of the functions in the ps6000.dll can be used within LabVIEW, which is why you will see them used in the examples.

The specific functions provided by the wrapper DLLs are functions where the driver needs to callback in to the application, for example to indicate that there is data available for processing. LabVIEW does not support this callback process so the wrapper handles this for you, and LabVIEW can poll the wrapper for the current status of this process.
Martyn
Technical Support Manager

jcoeandersen
Newbie
Posts: 0
Joined: Mon May 14, 2018 12:39 pm

Re: Mixed use of PS6000.dll and PS6000Wrap.dll in exampels?

Post by jcoeandersen » Tue May 15, 2018 8:44 am

Hi

Sorry I may now have posted the almost the same post twice, since I missed the part of it having to be approved by a moderator.

But the second post contains an extra question which I hope you can also answer:
I would like to know why the "Call library function" node is set to "Run in UI thread" where you call the PS6000.dll but it is set to "Run in any thread" when the PS6000Wrap.dll is called.
I do not like to have the first setting in my code since it forces the execution system to switch to the UI thread every time it encounters a node like that. This is generally bad practice because the thread switching introduces jitter in the executions and the executions of instrument drivers should be kept separate from UI interaction.
Last edited by jcoeandersen on Tue May 15, 2018 9:18 am, edited 1 time in total.
/Jens Christian Andersen
CLA

Martyn
Site Admin
Site Admin
Posts: 3371
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Mixed use of PS6000.dll and PS6000Wrap.dll in exampels?

Post by Martyn » Tue May 15, 2018 9:11 am

The LabVIEW examples have evolved over time, through different versions of LabVIEW, and through the additions of different scope ranges, so I am not surprised there are some inconsistencies.

As they are just examples to get people going they may not get the attention of our full blown applications, so feel free to make changes so they suit your particular requirements.
Martyn
Technical Support Manager

Post Reply