You can scale the value of a shared variable with a Data Type of U32 Bit Field.
 |
Note You can use scaling only for network-published shared variables. The shared variable you want to scale also must have a data source. Configure a shared variable to have a data source by placing a checkmark in the Bind to Source checkbox on the Variable page of the Shared Variable Properties dialog box. |
Shared variables with a Data Type of U32 Bit Field can have invert and/or select mask scaling. Complete the following steps to scale bit array shared variables.
- Right-click a target or a project library in the Project Explorer window and select New»Variable from the shortcut menu. You also can right-click an existing shared variable in the Project Explorer window and select Properties from the shortcut menu to display the Shared Variable Properties dialog box.
- In the Shared Variable Properties dialog box, select Scaling from Category list to display the Scaling page of the Shared Variable Properties dialog box.
- Place a checkmark in the Enable Scaling checkbox.
- Click the Edit button next to the Scaling Invert Mask text box to display the Edit Bit Mask dialog box.
- Set which bits you need on the Mask Bit Display. LabVIEW masks the bits you do not set and reports the masked bits in an array as zeros.
- Click the OK button to close the Edit Bit Mask dialog box.
- Click the Edit button next to the Scaling Select Mask text box to display the Edit Bit Mask dialog box.
- Set which bits are inverted between the device server and the Shared Variable Engine on the Mask Bit Display. You can invert only the bits selected in the Mask Bit Display.
- Click the OK button to close the Edit Bit Mask dialog box.
- Click the OK button to close the Shared Variable Properties dialog box.
Use the SharedVariableIO properties to scale U32 Bit Array shared variables programmatically.