Breadcrumbs

IntervalZero RTX64 Kingstar

Library Download

For details about the releases, see here.

PMLib Version

Compatible with PMC Version

Download

Changelog

6.03.048.00

117.22.47 or higher

RTX64 V06.03.048.00.zip

pmlib 2025.11v7.22.55 (6.03.048.00)

6.03.047.00

117.22.04 or higher

RTX64 V06.03.047.00.zip

pmlib 2025.09v7.22.07 (6.03.047.00)

6.03.046.00

117.20.49 or higher

RTX64 V06.03.046.00.zip

pmlib 2025.08v7.20.49 (6.03.046.00)

6.03.044.01

117.20.40 or higher

RTX64 V06.03.044.01.zip

pmlib 2025.07v7.20.40 (6.03.044.01)

6.03.039.00

117.17.43 or higher

RTX64 V06.03.039.00.zip

pmlib 2025.03v7.17.43 (6.03.039.00)

6.03.037.00

117.17.12 or higher

RTX64 V06.03.037.00.zip

pmlib 2025.01v7.17.12 (6.03.037.00)

Library Setup

Creating a new project

Step 1: In Visual Studio click File->New->Project 

rtx_setup1.png

Step 2: Select C++ -> RTX64 then choose RTX64 Application, then click Next

rtx_setup2.png

Step 3: In the Configure your new project window choose the project name and location, then click Create

rtx_setup3.png

Step 4: In the Create a RTX64 RTSS Application window leave the options on the defaults and click Finish

rtx_setup4.png

Step 5: If this error occurs, then follow steps 6 and 7. Otherwise, skip to 8.

rtx_setup5.png

Step 6: Right click on the project in Solution Explorer and click Properties

rtx_setup6.png

Step 7: In the Project Property Pages, make sure the selected Configuration is either RtssDebug or RtssRelease (whichever one the user is planning on using). In the Configuration Properties, select General, then change the Windows SDK Version to 10.0 (latest installed version).

rtx_setup7.png

Step 8: If you encounter a C1052 error when performing a partial build follow step 9. Otherwise, the project setup is finished.

rtx_setup8.png

Step 9: Open the Project Property Pages and select C/C++->Output Files in the Configuration Properties, then change the Program Database File Name from the default to a new one, eg. “test.pdb”

rtx_setup9.png

Setup Fieldbus

Step 1: Open the KINGSTAR Control Panel

rtx_fb1.png

Step 2: In the KINGSTAR Control Panel open the ESI Import tool

rtx_fb2.png

Step 3: In the KINGSTAR ESI Import Tool click File->Load Data File.

rtx_fb3.png

Step 4: Browse to the KINGSTAR directory (Program Files->IntervalZero->KINGSTAR->bin) and select ExtraDevices.data and click Open. If you have imported other ESI files before, then another window will appear asking which of the already imported devices you would like to load. Load all of them

rtx_fb4.png

Step 5: Click File->Add from ESI

rtx_fb5.png

Step 6: Browse to the location of the included PMC ESI file, select it, and then click Open

rtx_fb6.png

Step 7: In the next window select the Planar Motor Incorporated device in the Available Devices and move the device to the import list

rtx_fb7.png

Step 8: Click Add

rtx_fb8.png

Step 9: The Planar Motor Incorporated device Conmmunication Protocol A will then appear in the device list

rtx_fb9.png

Step 10: Then click File->Save

rtx_fb10.png

Step 11: Steps 11-14 are for testing the connection with the PMC. In the KINGSTAR Control Panel, open the Configuration Tool 

rtx_fb11.png

Step 12: In the KINGSTAR Configuration Tool select New project

rtx_fb12.png

Step 13: In the Connection Settings click Connect

rtx_fb13.png

Step 14: KINGSTAR should then automatically detect and connect to the PMC. If it does not detect the PMC verify that the PMC’s EtherCAT port is connected to the correct port on the Network Interface Card that RTX64 is using

rtx_fb14.png

Import and use library

Step 1: Navigate to the location of the three header files in the library (PMC_Enums.h, PMC_RTX64_Cpp_API.h, PMC_Structs.h)

rtx_lib1.png

Step 2: Copy the three header files into the project directory.

rtx_lib2.png

Step 3: #include PMC_RTX64_Cpp_API.h in the project and make sure that build configuration (RtssDebug or RtssRelease) matches the one selected in "Creating a new project" step 7

rtx_lib3.png

Step 4: Build the project by clicking Build->Build Solution

rtx_lib4.png

Step 5: Take the PMC_RTX64_Cpp_API.lib and PMC_RTX64_Cpp_API.rtdll files.

rtx_lib5.png

Step 6: And put them in the output directory of the project

rtx_lib6.png

Step 7: Right click on the project in the Solution Explorer and click Properties.

rtx_lib7.png

Step 8: Make sure that the selected configuration is the one that you are building with. In the Configuration Properties select Linker->General. Add $(OutDir) to the Additional Library Directories.

rtx_lib8.png

Step 9: Then select Linker->Input. Add ksapi_rtss.lib and PMC_RTX64_Cpp_API.lib to Additional Dependencies and click OK.

rtx_lib9.png

Step 10: It is advised to add “using namespace PMC;” to the project to avoid having to add “PMC::” in front of all PMC function calls and variable declarations.

rtx_lib10.png

Step 11: When using the PMC library, several Kingstar and PMC functions need to be called before and after the library functions. The functions Create (to start the KingStar subsystem), SetCycleTime (to set the EtherCAT cycle time), EnableServerLog (to disable server logging), EnableHotConnect (to disable hot connect), Start (to start EtherCAT), and ConnectToPMC (to set the cycle time of PMC communications and start PMC communications) must be called prior to using the library. DisconnectFromPMC must be called after the application has finished using the PMC library.

Note that PMC communications has a minimum cycle time of 1 millisecond or 1000 microseconds.

rtx_lib11.png

Upgrading the Library

Step 1: To upgrade to a new version replace the library header files (PMC_Enums.h, PMC_RTX64_Cpp_API.h, and PMC_Structs.h) and the library files (PMC_RTX64_Cpp_API.lib, PMC_RTX64_Cpp_API.rtdll) with the newer versions

rtx_update1.png

Step 2: Also replace the files in the output directory

rtx_update2.png