How Do I Add and Configure Custom Plug-Ins in FlexLogger Software?
You can build plug-ins using LabVIEW 2019 64-bit to communicate with third-party instrumentation and custom sensors via interfaces such as GPIB, serial, Ethernet, and USB. You can build plug-ins that:
- Produce data for FlexLogger software, such as acquiring data from an RS232 pH sensor
- Consume setpoint data from FlexLogger software to control a third-party instrument such as a programmable power supply
After the plug-in is deployed, you can add, configure, and delete plug-ins from the Channel Specifications tab in the FlexLogger software. It automatically generates the dialog-box user interface to configure plug-in and channel parameters defined in your code. For plug-ins that generate data and send it to the FlexLogger environment, the dialog also provides a live value graph to visualize the channel waveforms.
Figure 2. Plug-In Configuration
How Do Plug-Ins Work?
The architecture of a plug-in uses a state model to interact with FlexLogger software. The plug-in state model consists of five states: Initialize, Configure Session, Process, Cleanup Session, and Finalize. The FlexLogger data engine manages the transitions between these states.
Figure 3. Plug-In State Model
||Runs once when the plug-in is added to the channel specification. Defines plug-in parameters, channels, and channel parameters.
||Reads plug-in and channel parameters set in FlexLogger software to configure hardware sessions.
||Continuously acquires from third-party hardware to write channel data to FlexLogger software or reads channel setpoint data from FlexLogger software to control third-party hardware.
||Cleans up hardware sessions and resources initialized during the Configure Session state.
||Runs when plug-in is being shut down, either during FlexLogger software project close or when the plug-in is removed. Cleans up resources initialized during the Initialize state.
Tools for Developing and Distributing Plug-Ins
The PDK includes a LabVIEW project template and wizard that provide a high-level starting point for plug-in developers to get started quickly. It creates a new LabVIEW project with necessary source files; dependencies; a new LabVIEW class; a corresponding XML file; and a Packed Library build specification.
Figure 4. Accelerate plug-in development with PDK Project templates.
By combining the PDK with hundreds of LabVIEW Plug and Play instrument drivers and well-documented examples, you can see how to map functionality from a functional stand-alone LabVIEW VI to the FlexLogger software plug-in class. The PDK also installs a FlexLogger software palette in LabVIEW and a Plugin Environment Simulator to simplify development and debugging.
Figure 5. Simplify debugging with the PDK Plugin Environment Simulator.