Skip to content
Documentation · Position Sensor Simulation FS

Position Sensor Simulation FS

PosSim FS can be used to generate synchronous SINE and COSINE signals as they are provided by position sensors applied in electrical motors. There are several expansion stages of the simulation. One group provides 5 analog outputs. Different numbers of outputs can be realized by combining several groups. The PosSim FS system can be controlled via Ethernet or CAN-FD.

The hardware platform is based on National Instruments sbRIO-9608.

Document overview

This document contains 3 sections.

  • The first section includes an introduction to this manual.
  • The second section includes description of the hardware.
  • The third section includes accessing the system from the software point of view.

Purpose of this document

Purpose of this document is to describe how to integrate the PosSim FS system in a test system and how to access it from the software point of view. Limits of application are shown in the technical data section. This document is addressed to system integrators and the users, who are applying the PosSim FS system.

Definitions and abbreviations

AbbreviationDefinition
RPSRotor Position Sensor
AOAnalog Output
NINational Instruments
CAN FDController Area Network Flexible Data-Rate
DUTDevice Under Test
PosSim FSPosition sensor simulation with fault simulation
APIApplication Programming Interface
sbRIOSingle Board RIO
DBCdata base CAN

Table 1: Definitions and abbreviations

Chapter 1

Hardware

1.1Block diagram of PosSim FS

Block diagram of PosSim FS
Figure 1: PosSim FS HW Overview

General setup:

  • PosSim FS needs 24 V 2A power supply on PWR/GND
  • Ethernet connection to the higher-level system. Control and configuration is possible entirely via Ethernet.
  • CAN FD connection to the higher-level system. Control is fully possible. Ethernet communication is also required for configuration and update.
  • Every group is isolated against each other, against system power supply and against housing.
  • PosSim FS is available as either 10 channel , 20 channel or 30 channel version. Each channel group has 5 channels. If two groups are used together (Dual Mode), the respective gnds of the two groups must be connected.

1.2Connector pinning

InterfaceSignalPinRecommended wire
Module PowerPWRA1, B1, C10,5 mm²
Module PowerGNDA2, B2, C20,5 mm²
Fault SimulationFBus1C120,5 mm²
Fault SimulationFBus2C100,5 mm²
CAN FDCAN LB40,14 mm² … 0,5 mm²
CAN FDGNDB110,14 mm² … 0,5 mm²
CAN FDCAN HA40,14 mm² … 0,5 mm²
InterfaceRemarks
Module PowerConnect at least 1 pin (without fault simulation), connect all 3 pins (with fault simulation)
Fault SimulationFuse 1 A (Short to Battery/GND)
CAN FDTwisted pair cable required, no terminating resistor

Analog Output — recommended wire: 0,14 mm² … 0,5 mm². Twisted and/or shielded cable can be used (for longer distances or EMC problematic environments).

SignalPin
Sig0-Gr0 (SinP1)C16
Sig1-Gr0 (SinN1)B16
Sig2-Gr0 (CosP1)A16
Sig3-Gr0 (CosN1)C17
Sig4-Gr0 (VDiag1)B17
GND-Gr0 (Gnd1)A17
Sig0-Gr1 (SinP2)C19
Sig1-Gr1 (SinN2)B19
Sig2-Gr1 (CosP2)A19
Sig3-Gr1 (CosN2)C20
Sig4-Gr1 (VDiag2)B20
GND-Gr1 (Gnd2)A20
Sig0-Gr2 (SinP3)C22
Sig1-Gr2 (SinN3)B22
Sig2-Gr2 (CosP3)A22
Sig3-Gr2 (CosN3)C23
Sig4-Gr2 (VDiag3)B23
GND-Gr2 (Gnd3)A23
Sig0-Gr3 (SinP4)C25
Sig1-Gr3 (SinN4)B25
Sig2-Gr3 (CosP4)A25
Sig3-Gr3 (CosN4)C26
Sig4-Gr3 (VDiag4)B26
GND-Gr3 (Gnd4)A26
Sig0-Gr4 (SinP5)C28
Sig1-Gr4 (SinN5)B28
Sig2-Gr4 (CosP5)A28
Sig3-Gr4 (CosN5)C29
Sig4-Gr4 (VDiag5)B29
GND-Gr4 (Gnd5)A29
Sig0-Gr5 (SinP6)C31
Sig1-Gr5 (SinN6)B31
Sig2-Gr5 (CosP6)A31
Sig3-Gr5 (CosN6)C32
Sig4-Gr5 (VDiag6)B32
GND-Gr5 (Gnd6)A32

Table 2: Electrical pinning

Note: For DUTs that require 8 signals, group 1 and 2 or group 3 and 4 or group 5 and 6 can be connected to each other via software. Any combination is possible. The assignment of the signals is fixed and cannot be changed.

1.2.1Connector assignment

Following figure shows the alignment of the connectors from rear view:

PosSim FS rear view with connector rows C, B, A and pins 1 to 32
Figure 2: PosSim FS rear view
Connector assignment of P2A, P2B and P2C
Figure 3: Connector assignment

1.2.2Ethernet connector

Ethernet connection for communication with the higher-level system is performed via ethernet. Use at least CAT5 patch-cables with RJ45-connector. 1000 Base-T can be handled, but for typical applications 100 Base-T will suffice.

1.2.3CAN connector

The PosSim FS system is equipped with a d-sub connector on the front and a VG96 connector on the rear for CAN communication. The d-sub assignment corresponds to the standard. GND line mandatory.

  • Pin2: Can-L
  • Pin3: GND
  • Pin7: Can-H
PosSim FS CAN-FD d-sub connector
Figure 4: PosSim FS CAN-FD connector

1.2.4Mating system connector

The following components may be used for the mating connector on the test system. Different versions for crimping or soldering from two manufacturers can be found in the following table.

ItemOrder NumberManufacturer
Connector housing for crimp09 03 096 3214Harting
Connector Crimp09 02 000 8484Harting
Connector housing for soldering214836ERNI
Connector housing for crimp024069-EERNI
Connector Crimp464772-EERNI

Table 3: Connector order numbers

1.2.5Integration in subracks

The PosSim FS is integrated in a cassette with the dimensions 6 U x 14 HP x 227 mm. A subrack is required for installation in a 19 inch rack. For example, EuropacPRO from nvent Schroff can be used here. A 6U rack is required for the PosSim FS. Type H-LD module rails are required on the front (top and bottom) so that the handles can snap into place. At the rear (top and bottom), module rails type H-MZ with Z-rails are required. The Z-rails allow the mating connector to be attached directly to the rails. You also need guide rails with end pieces.

If a ready-made subrack is required, IRS can provide a quotation for this.

1.2.6Desktop housing

The PosSim FS can also be integrated into a desktop housing for laboratory use. This is equipped with a 230 V mains connection and an active fan.

Example desktop housing for PosSim FS
Figure 5: Example desktop housing for PosSim FS

1.3Dimensions

PosSim FS is designed on a 220mm (B) x 230mm (H) (6HU) card. The following figure shows the board dimensions in the cassette.

PosSim FS front view (266,7 mm x 71,12 mm) and side view (245 mm x 230 mm)
Figure 7: PosSim FS front view (left) · Figure 6: PosSim FS side view (right)

1.4Technical data

1.4.1General

The following environmental parameters must not be exceeded when operating PosSimFS.

ItemMinTypMaxUnitsRemarks
Ambient Temperature02250°Cnon condensing
Supply Voltage232425VPWR to GND
Supply DC Current @ 24V5005201000mA
Supply Inrush Current56AInrush current for approx.2ms

Table 4: Technical data for operation

1.4.2Output 1...30

The following data holds for all output channels.

ItemMinTypMaxUnitsRemarks
Sample Rate1MS/s
DAC resolution16Bit
Output voltage range0,015VAnalog Out xx to GND Out xx
max. output current015mAat full output voltage swing
short circuit output current80mA
DC accuracy0,10,2%
Output resistance1010Ohm
Rise/Fall time0,61µsStep 0V to +5V

Table 5: Technical data for output

1.5Signal curves

C1Y: SinP ; C2M: SinN ; C3C: CosP ; C4G: CosN

Oscilloscope capture at 0 RPM
Figure 8: Signal curve – 0 RPM
Oscilloscope capture at 0 RPM, 90°
Figure 9: Signal curve - 0 RPM 90°
Oscilloscope capture with V Stativ 5 V
Figure 10: Signal curve - V Stativ 5 V
Oscilloscope capture at 1000 RPM
Figure 11: Signal curve - 1000 RPM
Oscilloscope capture at 60000 RPM
Figure 12: Signal curve - 60000 RPM
Oscilloscope capture at 120000 RPM
Figure 13: Signal curve - 120000 RPM
Chapter 2

Functional Description

The following section describes the functionality of the module, starting with basic software functionality. The software package is provided by IRS for download.

2.1Basic software description

On request individual adaptations are possible. To use PosSim FS, some software packages as LabVIEW-Libraries or C# DLL are needed. These software packages must be stored in a common storage location.

  • IRS.PosSim.cSharpAPI (Function library for integration in Testsystems which supports C#)
  • IRS.PosSim.DBC (data base CAN file for cRIO and control system)
  • IRS.PosSim.DeviceFirmware (firmware for cRIO)
  • IRS.PosSim.RioUpdateTool (Tool for updating firmware and DBC)
  • IRS.PosSim.Testpanel (Tool for configure and control the simulation; NI LabVIEW Runtime 2022 is required)
  • NI.PosSim.PackageManager (Required NI Packages)
  • IRS.PosSim.API.llb (Function library for integration in NI LabVIEW 2022 or NI Teststand)
  • IRS.PosSim.Dep.llb (Additional required Vis)

The device works via TCP/IP and uses the JSON format for data exchange. This makes it possible to write your own function library in any programming language that supports the JSON format. The schema can be published on request. The system can also be controlled via the optional CAN-FD interface.

2.1.1Software layers

Software layers: PC with HMI, network, LabVIEW Real-Time System with real-time processor and FPGA
Figure 14: Embedded System Components

2.1.2LabVIEW PC-API

The API contains the command set required to control the simulation. There are commands for connecting and disconnecting the TCP connection, for parameterization and for control. The input values are converted into JSON format in the API.

2.1.3LabVIEW Real-Time Processor

The incoming data is unpacked and checked for plausibility on the device. If the parameters are outside the permissible range, an error message is generated and sent back to the API. If the parameters are valid, they are converted into a format valid for the FPGA and forwarded to it.

2.1.4LabVIEW FPGA

The FPGA controls the DACs and ensures that the samples are output on all channels synchronously. The output values are calculated directly on the FPGA. This has the advantage that a very high resolution can be achieved over the entire output range. In addition, the timing is always guaranteed.

2.2NI.PosSim.PackageManager

Different packages are required for the use of NI-based software, depending on the application. First, the NI package manager "NIPackageManager24.3.0_online.exe" must be installed. This package manager can then be used to install all the required packages. The document "Required Packages.txt" contains a small overview.

The following package is required for IRS.PosSim.Testpanel.exe

NI Package Manager showing LabVIEW Runtime 2022 Q3
Figure 15: LabVIEW Runtime 2022 Q3 32 Bit

The following package is required for RioUpdateTool.exe

  • LabVIEW Runtime 2022 Q3 32 Bit and
NI Package Manager showing NI-XNET 2022 Q3
Figure 16: NI-XNET 2022 Q3

The following package is required for NI Measurement & Automation Explorer 2022 Q3 (change IP address).

  • LabVIEW Runtime 2022 Q3 32 Bit and NI-XNET 2022 Q3 and
NI Package Manager showing NI CompactRIO and Drivers 2022 Q3
Figure 17: NI CompactRIO and Drivers 2022 Q3

2.3NI Measurement & Automation Explorer 2022 Q3

NI Measurement & Automation Explorer with network settings, numbered 1 to 4
Figure 18: NI Measurement & Automation Explorer

1_Remote Systems: Select the device to be configured.

2_Network Settings: Switch to the network settings tab.

3_IPv4 Address: Enter the new IP address here.

4_Save: After the new IP address has been entered, it is transferred to the device using the save button.

2.4IRS.PosSim.Testpanel

IRS.PosSim.Testpanel front panel with controls numbered 1 to 64
Figure 19: PosSim_PC_TOP.vi

The "IRS.PosSim.Testpanel.exe" is an executable .exe. The "IRS.PosSim.API.llb" is used in the background.

1_Host_Name: The "Host_Name" consists of the product "PosSimFS" and the serial number "XXXXXXXX".

2_PC_Version: The "PC_Version" shows the version number of the "IRS.PosSim.API.llb" function library.

3_RT_Version: The "RT_Version" shows the version number of the device firmware "PosSim_RT_Top_StartUp.rtexe".

4_FPGA_Version: The "FPGA_Version" shows the version number of the FPGA bitfile "PosSim_Common_FPGA_Bitfile.lvbitx ". The bitfile does not need to be copied separately, it is already included in the firmware.

5_HW_Version: The "HW_Version" shows the version number of the PCB.

6_Target IP: The IP address of the device must be specified for connection in the "Target IP" control.

7_SaveSettingsToDefault: With the "SaveSettingsToDefault" function, the parameters from the "Speed settings", "Amplitude settings" and "Position settings" fields can be saved directly on the device. These parameters are loaded after a restart.

8_SaveDualModeToDefault: The "SaveDualModeToDefault" function can be used to save the parameters from the "Dual Mode settings" field directly on the device. These parameters are loaded after a restart.

9_SaveCanSettingsToDefault: The "SaveCanSettingsToDefault" function can be used to save the parameters from the "Can settings" field directly on the device. These parameters are loaded after a restart.

10_APIControl: The test panel can also be used as a live display for CAN communication. If the "APIControl" function is deactivated, the parameters written via the CAN interface are displayed in real time.

11_Selection: Use the "Selection" menu to select the group to be controlled. If a group is selected that is not active, the user receives an error message. The groups can be changed at will. It is not necessary to reconnect.

12_Connect: The "Connect" function is used to establish a TCP connection to the device. The device supports parallel connections. The test panel can therefore be used in parallel with other connections, e.g. via the automation software.

13_Disconnect: The TCP connection is closed again using the "Disconnect" function. Important: All statuses are retained when the connection is closed.

14_Exit: When the connection to the device has been closed, the test panel can be closed.

15_RotateEnable: A distinction is made between two operating modes in the simulation. If "RotateEnable" is set to true, you are in rotation simulation. If false, you are in position simulation.

16_RotateLeft: The "RotateLeft" parameter can be used to configure the direction of rotation.

17_Speed [RPM]: The mechanical speed can be set using the "Speed [RPM]" parameter. The permissible range is between 0 ... 120000 RPM with a pole pair number of 1.

18_Gradient [RPM/s]: A ramp can be configured with the "Gradient [RPM/s] " parameter. With a gradient of 100 RPM/s and a speed of 1000 RPM, it takes 10 seconds until the speed is reached. If 0 is set, the simulation jumps directly to the set speed. The permissible range is between 0 ... 120000 RPM/s with a pole pair number of 1.

19_PolePairs: The ratio of electrical to mechanical speed can be set via the "PolePairs" parameter. If the number of pole pairs is three, the simulation outputs three times the electrical frequency. A maximum of 2 kHz (120000 RPM) is possible at the output. This can be adjusted after consultation with IRS. With a number of pole pairs of three, a maximum speed of 40000 RPM is still possible. The permissible range is between 1-32.

20_VDiag: The "VDiag" parameter can be used to set a fixed voltage on channel VDiagX. The permissible range is between 0-5 V.

21_Amplitude: The "Amplitude" parameter can be used to set the maximum deflection from the position of the arithmetic mean value. The permissible range is between 0-5 V.

22_Offset: The "Offset" parameter can be used to set the offset of the zero point. The permissible range is between 0-5 V.

23_SetSettings: The "SetSettings" function is used to send the parameters 15-22 and 26 to the device.

24_SetSpeedGradient: The "SetSpeedGradient" function is used to send parameters 17 and 18 to the device.

25_SetSpeedGradientAll: The "SetSpeedGradientAll" function sends the parameters 17 and 18 to all channels of the device.

26_Position [°]: The "Position [°]" parameter can be used to set a specific rotor angle in the position simulation. If the simulation is in rotation simulation, this angle is not used when stopping. The permissible range is between -180 … 180 °.

27_BaudRate: The "BaudRate" parameter is used to configure the standard data rate of the CAN FD bus. The permissible data rates are 500000 bits/s and 1000000 bits/s.

28_FDBaudRate: The "FDBaudRate" parameter is used to configure the data rate of the CAN FD bus. The permissible data rates are 500000 bits/s, 1000000 bits/s, 2000000 bits/s, 2500000 bits/s, 4000000 bits/s and 5000000 bits/s.

29_IOMode: The "IOMode" parameter is used to activate the FDBaudRate of the CAN FD bus. The possible configurations are CANFD or CANFD+BRS.

30_SetCanSettings: The "SetCanSettings" function is used to send parameters 27 - 29 to the device.

31_DualMode: The "DualMode" parameter is used to combine two groups. This synchronizes the outputs of both groups. Mixed operation is also permitted. e.g. Group1 and Group2 run separately and Group3 and Group4 run synchronously (Group34)

32_DualConfig: The "DualConfig" parameter is used to activate additional operating modes. Currently possible 0 off, 1 double output frequency for the second dual mode group.

33_SetDualMode: The "SetDualMode" function is used to send parameters 31 and 32 to the device. The function can only be executed if a dual group is selected under "Selection".

34_PositionActual [°]: The current position of the rotor is displayed with the return value "PositionActual [°]".

35_SpeedActual [RPM]: The current speed is displayed with the return value "SpeedActual [RPM] ".

36_DirectionAtStopRotate: The current direction of rotation after stopping is displayed with the return value "DirectionAtStopRotate".

37_SpeedAchieved: The return value "SpeedAchieved" provides feedback when the set speed has been reached.

38_ParameterCheck: With the return value "ParameterCheck" you get the feedback if the sent parameters are valid.

39_FaultSimActive: The return value "FaultSimActive" provides feedback when the fault simulation is active.

40_DualMode: With the return value "DualMode" you get the feedback if the dual mode is active.

41_DualConfig: The return value "DualConfig" provides feedback on the current dual mode configuration.

42_SetElectricalFault: The "SetElectricalFault" function is used to send parameters 43 and 44 to the device.

43_Channel: The "Channel" parameter is used to select the corresponding channel for the electrical fault simulation.

44_FaultSetting: The "FaultSetting" parameter is used to select the corresponding fault. With the FB1 and FB2, an external electrical signal (e.g. 12V (short to battery) and GND (short to ground)) is switched to the corresponding channel. The interrupt interrupts the line of the selected channel.

45_SetPhaseFault: The "SetPhaseFault" function is used to send parameters 46 and 47 to the device. Error simulation is deactivated again with the "SetSettings" function.

46_Phase1: The "Phase1" parameter is used to set a phase shift between SIN and COS (error simulation). The permissible range is between -180 … 180 °.

47_Phase2 (Dual): The "Phase2" parameter is used to set a phase shift between SIN and COS of the second group in dual mode (error simulation). The permissible range is between -180 … 180 °.

48_SetVoltageFault: The "SetVoltageFault" function is used to send the parameters 49 - 64 to the device. Error simulation is deactivated again with the "SetSettings" function.

49-52_Amplitude_XxxXxx1: The "Amplitude_XxxXxx1" parameters are used to set a separate amplitude for each individual signal (error simulation). The permissible range is between 1-5 V.

53-56_Offset_XxxXxx1: The "Offset_XxxXxx1" parameters are used to set a separate offset for each individual signal (error simulation). The permissible range is between 1-5 V.

57-60_Amplitude_XxxXxx2 (Dual): The "Amplitude_XxxXxx2" parameters are used to set a separate amplitude for each individual signal of the second group in dual mode (error simulation). The permissible range is between 1-5 V.

61-64_Offset_XxxXxx2 (Dual): The "Offset_XxxXxx1" parameters are used to set a separate offset for each individual signal of the second group in dual mode (error simulation). The permissible range is between 1-5 V.

2.5IRS.PosSim.RioUpdateTool

RioUpdateTool front panel with controls numbered 1 to 12
Figure 20: RioUpdateTool_Top.vi

1_IPAddress: The IP address of the device must be specified for connection in the "Target IP" control. The information is automatically loaded from the "IRS.PosSim.RioUpdateTool\data\RioUpdateToolConfig.ini" file and can also be modified.

2_Version: The "Version" shows the version number of the RioUpdateTool.

3_Device: The "Device" consist of the product "PosSim". The information is automatically loaded from the "RioUpdateToolConfig.ini" file.

4_Exit: Use the "Exit" button to close the application.

5_Update Startup: After the new firmware has been selected, start the update process with the "Update Startup" function.

6_Path To Startup (*.rtexe): Use the "Path To Startup (*.rtexe)" selection menu to select the new firmware "IRS.PosSim.DeviceFirmware\ PosSim_RT_Top_StartUp.rtexe".

7_UpdateSuccessful: If the update has been carried out successfully, the "UpdateSuccessful" indicator lights up. If the firmware on the device is already up to date, the indicator lights off.

8_UpdateRunning: As long as the update is in progress, the "UpdateRunning" indicator lights up. Do not use or close the test panel during the update period.

9_Time: As long as the update is in progress, the "Time" indicator is running.

10_Update DBC: After the new DBC file has been selected, start the update process with the "Update DBC" function.

11_Path to Startup (*.dbc): Use the "Path To Startup (*.dbc)" selection menu to select the new DBC "IRS.PosSim.DBC\Device\PosSimDevice.dbc". Depending on the system configuration, there are several DBC files that must be assigned to the correct device.

12_UpdateSuccessful: If the update has been carried out successfully, the "UpdateSuccessful" indicator lights up.

2.6IRS.PosSim.DBC

Depending on the device configuration, there are several and/or different DBC files for the devices and for users.

PosSim.dbc opened in Vector CANdb++ Editor
Figure 21: PosSim.dbc with Vector CANdb++ Editor

The DBC file can be opened and edited with the free editor tool from Vector CANdb++ Editor, for example. The individual parameters and functions are described in more detail under IRS.PosSim.Testpanel.

PosSim.dbc loaded in PCAN-Explorer
Figure 22: PosSim.dbc with PCAN-Explorer

With the help of the DBC file, the PCAN Explorer, for example, assembles the parameters into a CAN frame and sends it to the device. In addition, the received frames can be interpreted and the data displayed correctly.

Documents and downloads

Further documents and files for your IRS product are available on myIRS.

Go to downloads