Control a Device
Controlling a device in NetLinx Studio means that it will appear to a specified System device that messages are being sent from the NetLinx Master. The options in the Control a Device dialog allow you to specify the <D:P:S> combination for the target device you want to control. Use device control to simulate basic control of a specified NetLinx device, including Channels (PUSH/RELEASE), Levels and String/Commands. Use this option to test specific areas in your Source Code against a specific device.
To use NetLinx Device Control:
- Select Diagnostics > Control a Device to access the Control a Device dialog (FIG. 281).
FIG. 281 Control a Device dialog
- Enter the Device, Port and System <D:P:S> combination of the device you wish to control. The <D:P:S> value ranges are 0 - 65535.
- To send Channel messages (i.e., Push/Release, CHON, and CHOFF) , enter a valid channel number for the specified <D:P:S> in the Channel field.
- The Channel number range is 0-65535.
- Select the On or Off buttons to send Channel ON (CHON) and Channel OFF (CHOFF) messages for the specified <D:P:S>.
- Click Pulse to send a push/release on the specified channel. You may click and hold the Pulse button to see how the master controller responds to the message.
- To send Level messages, enter the desired Level (number), Value and data Type (BYTE, CHAR, WIDECHAR, INTEGER, SINTEGER, ULONG, LONG, FLOAT, or DOUBLE), and click Send to emulate the specified level and value.
- The Level number range is 0-65535.
- The list below contains the valid level data types and their ranges:
Data Type | Min Value | Max Value |
---|---|---|
CHAR | 0 | 255 |
INTEGER | 0 | 65535 |
SINTEGER | -32768 | 32767 |
LONG | 0 | 429497295 |
SLONG | -2147483648 | 2147483647 |
FLOAT | -3.402823466e+38 | 3.402823466e+38 |
- To send a String or Command, enter a string or command in the Message(s) To Send field (use the Return key within the field to enter a new line for the next message).
When entering a send command (in the context of this dialog) do not include the "send c" or "SEND_COMMAND" in the statement - only type what would normally occur within the quotes, but don't include the quotes either.
For example to send the "CALIBRATE" send command, simply type CALIBRATE (no quotes) rather than SEND_COMMAND
<dev> "CALIBRATE".
NOTE: Hold down the Shift key to select a specific range of lines to send to the controller instead of all the lines within the edit control.
- Click the Message Type option buttons (String or Command) to specify the type of message you are sending.
- Click Send To Device to send the messages in the Message(s) to Send field to the specified device. If none of the messages are selected (highlighted), all messages are sent. If you have selected a line or a range of lines, only the selected messages will be sent.
- Check the Messaging Options check boxes to Enable Asynchronous Notifications and/or Enable Internal Diagnostic Messages.
NOTE: Enable NetLinx Notifications to view the results in the Notifications tab of the Output Bar. For example, in order to view a string sent to a device, you must f irst enable Strings to Device notifications (in the NetLinx Device Notifications Options dialog).