Emulate a Device

Emulating a device means that NetLinx Studio generates messages that appear to the master to have come from a specified

<D:P:S> combination. The options in the Emulate a Device dialog allow you to specify the <D:P:S> combination for a device you want to emulate. Use device emulation to simulate basic control of a specified NetLinx Master, including Channels (PUSH/ RELEASE), Levels and String/Commands, to test specific areas in your Source Code against a specific device.

  1. Select Diagnostics > Emulate a Device to open the Emulate a Device dialog (FIG. 280).

FIG. 280 Emulate a Device dialog

  1. Enter the Device, Port and System <D:P:S> combination of the device you wish to emulate (real or fictitious). The <D:P:S> value ranges are 0 - 65535.
  2. To emulate a channel (push/release), enter a valid Channel number to emulate Channel messages (i.e., Push/Release, CHON, and CHOFF) for the specified <D:P:S> in the Channel field.
    • The Channel number range is 0-65535.
    • Select the Push button to emulate a push/release on the channel specified. You may click and hold down the Push button to see how the master controller responds to the push message.
    • Select the On or Off buttons to emulate Channel ON (CHON) and Channel OFF (CHOFF) messages for the specified <D:P:S>.
  3. To emulate a level, 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 indicates 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
  1. To emulate sending a String or Command, type 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.

  1. Click the Message Type option buttons (String or Command) to specify the type of message you are sending.
  2. Click Send To Master to send the messages in the Message(s) to Send field to the master. If none of the messages are selected, all messages are sent. If you have selected a line or a range of lines, only the selected messages will be sent.
  3. 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 from a device, you must f irst enable Strings From Device notifications (in the NetLinx Device Notifications Options dialog).

results matching ""

    No results matching ""