Thread-safe version of VDT2 XOP

With the help of byte-physics (www.byte-physics.de), we have created a thread-safe version of VDT2 - an XOP used for serial communications with scientific instruments. This version allows you to call VDT2 operations from a pre-emptive thread.

We need some real-world testing, even if you do not use the thread-safety feature, to make sure we didn't break something.

This version requires Igor Pro 8.00 because of support for long names.

If you are a user of VDT2 with Igor Pro 8, and if it is convenient, please try this new version and let us know how it works.

You can download VDT2 version 3.00 using these links:

https://www.wavemetrics.net/Downloads/Customers/VDT2-300-Mac.zip

https://www.wavemetrics.net/Downloads/Customers/VDT2-300-Windows.zip

Please send feedback to WaveMetrics support by choosing Help->Contact Support in Igor.

 

In the threadsafe version, does VDTOperationsPort2 set the port for the thread, so that each thread can operate on its own port?

That should be a great improvement.

Quote:
In the threadsafe version, does VDTOperationsPort2 set the port for the thread, so that each thread can operate on its own port?

No and you have a good point.

The main goal of making VDT2 threadsafe was so that you could do data acquisition in a thread. We did not give much (OK, any:) thought to multiple threads doing independent data acquistion. I suspect that this multiple thread scenario is rare. You can do data acquisition using multiple ports using one background thread though.

To support multiple threads doing independent data acquistion would require something that I have had in the back of my mind for a couple of decades - to add a /PORT flag to each VDT2 operation (VDTRead2, VDTReadBinary2, VDTReadWave2, VDTReadBinaryWave2, ...) so you can specify the port for that operation without using VDTOperationsPort2.

That would be a fair amount of work for, I suspect, a very small audience, but I am interested to know your thoughts.

You could use the VISA XOP for the multiple independent background thread application. The downside to the VISA XOP is that it requires the end user to install the VISA library.