Using MPuLib Dll in Several Threads at the Same Time

Updated Mar 25, 2020

Reported In


  • Micropross Accessories


SW: MPuLib dll
HW: MP500

Issue Details

Could MPuLib dll be used by several threads at the same time?
I have several MP500 and I want to control them at the same time.


You can create several parallel tasks using the MPOS_OpenResource function.

Pay attention to the following parameters:

  • ResID: Resource identifier (246 for the MP500 TCL3)
  • CplNum: Coupler number. The coupler number is equal to 0 for the MP500 TCL3.

If you create a task for one MP500 with MPOS_OpenResource, you can create another task for another hardware with the same function using different values for those input parameters.

Additional Information

The TCL3 API reference the MP500 hosting a multi-task operating system, it is mandatory to reserve and lock a resource before using it. The TCL3 module is one of these resources. So, to access any of the PCD functions, you must use MPOS_OpenResource, and you must free this resource when no longer needed with MPOS_CloseResource.

For more information please refer to the
MP500 API Reference