NI InsightCM™ SDK 3.3 Help
»View Product Info
Parent Topic: Device Software Fundamentals
A device type definition is a collection of properties that define different components and behaviors of a type of device. Users of NI InsightCM Server ensure that device software operates correctly and as desired by setting properties in the NI InsightCM web application. The user interface elements that users configure to perform specific tasks are defined in the device type definition. Consider the following tasks users perform in the InsightCM web application:
- Select the models of device controller and data acquisition modules that the device chassis contains. Users reflect the physical hardware components in a device whenever they add a new device.
- Set channel property values that define how the device software operates.
In the previous example tasks, the available hardware models for a particular device type are defined in one component of its device type definition, and the name and default value of the Scale Slope property is defined in another component. Therefore, to customize the InsightCM web application to present users with new property fields or values, including new types of hardware, you must create or edit components of the device type definition.
Role of Device Type Definitions in NI InsightCM Server
The following workflow explains the role of a device type definition within an NI InsightCM Server system.
This illustration uses the example of sample rate as a property field you can customize through a device type definition. However, you can customize many other features in the InsightCM web application. For a list of the features you can customize in the InsightCM web application, refer to Customizable Features of the InsightCM Web Application.
Relationship between Devices and Device Type Definitions
Typically, you do not need to create a new device type definition to support a different arrangement of I/O modules for a device type. For example, the CMS-9068 device type definition supports module arrangements that include only dynamic I/O modules, only static I/O modules, and mixtures of both module types.
Components of a Device Type Definition
Several different definitions, each with its own set of properties, combine to form a complete device type definition. The following illustration shows the relationships between these individual definitions.
Descriptions of Device Definition Components
A device type definition is the master definition that calls or defines several other types of definitions. Device type definitions in JSON contain the following components:
- DeviceType—Specifies the name in the New Device dialog box that users select when adding a new device.
- Hardware definitions—Specify the hardware modules, which include the controller and data acquisition modules, that users can select in the New Device dialog box and Devices page»Hardware tab. For each module type that a hardware definition supports, you must define a corresponding module type definition.
A device type definition can call multiple hardware definitions to support different arrangements of I/O modules. If you call multiple hardware definitions, the New Device dialog box displays the modules from each definition until the user makes a selection that invalidates a definition. For example, consider a hardware definition that supports Module A in all four slots of a chassis and a hardware definition that supports Module A in slot 1 and Module B in slots 2-4. If a user selects Module A for slot 2, the dialog box no longer lists Module B as an option for slots 3 or 4.
- Socket type definitions—Define a property field in the New Device dialog box where users specify the hardware in a chassis slot.
- Module type definitions—Define properties of the hardware modules supported by a hardware definition, including the types users can assign to channels on data acquisition modules. For each channel type a module definition supports, you must define a corresponding channel type definition.
- Channel group definitions—Define shared properties for a set of channels, such as a set of channels that reside on a hardware module.
- Configuration files for device software—Set global properties that control how the device software operates. These properties affect behaviors that you do not need users to customize on a per-device basis. For example, an NI-developed configuration defines how often the File Manager process evaluates its free disk space to ensure a minimum amount remains free.
- Validation rules—Instruct the InsightCM web application to provide feedback when users configure properties with invalid values.
- UX rules—Instruct the InsightCM web application to hide or disable property fields in the user interface when they are not relevant.
Customizing a Device Type Definition