Xantech CRM-WIC Reference Manual

Room monitor – web intelligent controller
Table of Contents

Advertisement

Reference Manual &
Programming Guide
Room Monitor – Web Intelligent Controller
Model: CRM-WIC

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CRM-WIC and is the answer not in the manual?

Questions and answers

Summary of Contents for Xantech CRM-WIC

  • Page 1 Reference Manual & Programming Guide Room Monitor – Web Intelligent Controller Model: CRM-WIC...
  • Page 2: Table Of Contents

    ... 12 OWERING CRM-WIC C ETERMINE ONNECTION DHCP NABLING ISABLING CRM-WIC CCESSING THE THROUGH THE ONFIGURING THROUGH THE ONFIGURING THROUGH THE USING THE CRM-WIC ... 15 ... 15 ESTING ARDWARE PLOADING IRMWARE PGRADES ... 15 IEWING ERVER PLOADING USTOM ANAGING...
  • Page 3 EXAMPLE #2: Net_GetSubnetMask ... 47 ... 48 AULT ODES SING ACROMEDIA LASH STEP 1: Pass CRM-WIC IP Address to Flash... 48 Step 2: Call RPC with HTTP Post ... 49 Step 3: Response Tokens... 50 ... 50 ISUAL ASIC CRIPTING ...
  • Page 4 GetEventByIdx ( Idx )... 57 GetEventByName ( Name )... 57 GetEventIdxById ( EventId ) ... 58 GetEventName ( EventId )... 58 GetEventType ( EventId ) ... 58 GetEventOption ( EventId, OptionType ) ... 59 GetEventConcurrent ( EventId )... 60 GetEventSource ( EventId )... 60 GetEventMatch ( EventId ) ...
  • Page 5 GetVariableValue ( VarId )... 90 SetVariableById ( VarId, Name, Type, Default, Value, Persist ) ... 91 SetVariableByName ( Name, Type, Default, Value, Persist ) ... 93 AddVariable ( Name, Type, Default, Value, Persist )... 94 DeleteVariableById ( VarId )... 95 DeleteVariableByName ( Name )...
  • Page 6: Introduction

    Introduction Xantech’s Commercial Room Monitor – Web Intelligent Controller is a stand-alone room controller and also the long awaited ‘glue’ piece providing dynamic RS232 feedback module from any RS232 device for the Commercial CSPLCD TouchPanel displays. On it’s own, the Web Intelligent Controller is an Event driven component with two RS232 ports (configurable for RS422 and RS485) and a single IP port.
  • Page 7: Box Contents

    Box Contents Box Contents for the CRM-WIC Web Intelligent Controller Power Adapter Model:CRMWIC...
  • Page 8: Hardware User Interface

    Hardware User Interface Hardware User Interface for the CRM-WIC...
  • Page 9 422/485, and Handshaking for Serial Ports 1 and 2. It is possible to override the dipswitch settings by using the Admin Web Pages Green LED The green LED indicates that the CRM-WIC is Indicator for powered. Power Power Adapter The CRM-WIC is powered using the included Port Power Adapter.
  • Page 10: Specifications

    Specifications Size Weight Power Adapter Processor Memory Ports Monitoring Network Access CRM-WIC Input Voltage Network Adapter RS-232/RS-422/485 * Available Flash Memory may vary based on firmware version. Pin-Outs 5.4" H x 4.4" W x 0.95" D 0.6 lbs. 12V DC...
  • Page 11: Factory Default Configurations

    9600 19200 38000 57600 115000 Position 5: Number Bits 8 Bits 7 Bits 10.10.10.10 255.255.255.0 10.10.10.1 CRM-WIC admin Position 6-7: Parity Position 8: Stop Bits Position 9: Serial Port RS-422-485 Position 10-11: Handshaking (Jump to None Even 1 Bits 2 Bits ON...
  • Page 12: Quick Start

    STEP 1: Powering Up Locate the power adapter which came with your CRM-WIC. Plug the small end into the power supply port on the upper right side of the CRM-WIC, and the large plug into a wall socket or compatible power supply.
  • Page 13: Enabling / Disabling Dhcp By Reset

    DHCP Enabled IP Address Subnet Mask Gateway After all the LEDs flash once, wait for the blue LED to start blinking slowly. The CRM-WIC will then be ready to accept connections. 10.10.10.11 255.255.255.0 10.10.10.1 Automatic...
  • Page 14: Accessing The Crm-Wic Through The Network

    Accessing the CRM-WIC through the Network Once the CRM-WIC is physically connected to the network, and the blue light is blinking slowly, you may access the CRM-WIC through your web browser, ftp client, and other network clients. Upload User-Defined Web pages to:...
  • Page 15: Using The Crm-Wic

    Web Pages , page 20} Uploading Firmware Upgrades Firmware upgrade files may be uploaded, one file at a time, to the CRM-WIC after the CRM-WIC is set to firmware upgrade mode. The CRM-WIC may be set to firmware upgrade mode through the serial Boot Menu or the Admin Web Pages.
  • Page 16 For full details, see the RPC section at the end of this manual.
  • Page 17: Boot Menu Reference

    Accessing the Boot Menu with a Serial Connection Connect the Serial 1 Port of the CRM-WIC to your computer with an RS-232 Data Transfer Cable (also known as a Null Modem Cable). Using Hyper Terminal (or similar software), connect to the CRM-WIC with the default Serial Settings: Baud Rate: 9600, Data bits: 8, Parity: None, Stop bits: 1, and Flow control: None.
  • Page 18: 0: Display Current Settings

    • OS Filename 1: Restore Factory Defaults This option restores the CRM-WIC’s network settings to the factory defaults. {see Factory Default Configurations on page 11}. 2: Configure IP Settings You may enable DHCP or manually set an IP address, subnet mask, and gateway IP address.
  • Page 19: 5: Download New Firmware

    Select "5" to upgrade the OS (*.AFW) or bootstrap loader (*.ABT) file. The Boot Menu display will first indicate some network initialization, and then the CRM-WIC will prompt you to use a tftp (trivial ftp) client to upload your upgrade file to the CRM-WIC at a specific IP address.
  • Page 20: Admin Web Pages

    • DIAGNOSTIC – serial port configuration settings, firmware upgrade instructions, logs, options, and other diagnostic tools for using and/or monitoring CRM-WIC hardware. • EVENT MANAGER {see separate section, The Event Manager, page 30} - powerful non- programming tool to automate CRM-WIC tasks.
  • Page 21: Setup

    This web page allows you to set several administrative options. Many of these options are also available from the Boot Menu. Firmware Version The firmware version installed on the CRM-WIC is displayed. Date / Time The current date and time is displayed. You may also set the date and time using the pulldown menus.
  • Page 22: Network Settings

    Network Settings If DHCP is enabled for the CRM-WIC, the IP Address, Subnet Mask, and Default Gateway are automatically assigned, and the values will be grey and uneditable. If the DHCP is disabled, the values for IP Address, Subnet Mask, and Default Gateway will be black and editable.
  • Page 23: Diagnostics

    Diagnostics Four of the Diagnostics described in this section (Serial, Memory, Log, and F/W) are available for the CRM-WIC:...
  • Page 24: Serial: Serial Port Diagnostics

    SERIAL: Serial Port Diagnostics The serial port diagnostics are available for the CRM-WIC From this web page, you may access three diagnostics for the serial ports. Serial Send & Receive Histories First, you may monitor the send and receive histories from either serial port.
  • Page 25 Send String The second diagnostic allows you to send a byte stream through the port specified at the top of the page. The byte stream you wish to send must be a URL-encoded send string: To send a URL-encoded string, follow these three rules for encoding: 1.
  • Page 26: Memory: System Memory Information

    You may also choose whether to use RS-232 or RS-422/285 signal levels. MEMORY: System Memory Information System memory information is available for the CRM-WIC. File space reflects the hard disk space available for custom web pages. RAM reflects the status of the system memory.
  • Page 27: Log: Log Files

    LOG: Log Files Log files for the CRM-WIC servers are available for the CRM-WIC. An admin may review or clear (reset) the logs from this page: RPC Server Info Displays the build date and version number of the RPC server. Also displays all tokens and methods available from the server.
  • Page 28: F/W: Firmware

    -i [IP Address] put [Filename with Full Path] If ActiveX is enabled for your web browser, you may also request that the CRM-WIC create a batch file CRM-WICload.bat that will execute this command. The batch file will be placed at the root of your local drive.
  • Page 29: Events (See Section: The Event Manager)

    Details of the Event Manager are described in the section, The Event Manager. Files This link will simply take you to the CRM-WIC's ftp server: ftp://[IP Address or Host Name]/ Any custom web pages uploaded to the /wwwpub directory may be viewed at:...
  • Page 30: The Event Manager

    The Event Manager The Event Manager is a feature of the CRM-WIC that allows you to program the CRM-WIC to perform operations autonomously. With the Event Manager, you can associate different hardware or software events with actions to be performed directly on the CRM-WIC. There is then no need to continuously control the CRM-WIC using some client side software.
  • Page 31: The Event Manager Web Page

    The Event Manager Web Page The Event Manager page may be accessed by clicking on "Events" at the top of any page. This page is organized by events, actions, and variables. Note that actions are always associated with its event. Selecting an event will highlight the event and display all its associated actions.
  • Page 32: Events

    Events Creating and Editing Events Selecting the "Add event" button from the Event Manager page will create a new event, while selecting the "Edit" button above the Event list will allow you to edit whichever event is highlighted. You will be prompted for the name of the event, the type of event, and any options associated with the event, as described in the next two sections.
  • Page 33: Other Event Options

    While Clock Events allow you to schedule recurring tasks based on fixed, regular calendar periods (daily, weekly, etc,), Timer Events allow you to schedule recurring tasks based on user-defined time periods. For example, a Timer Event may be triggered every 27 seconds or 36 hours. Variable A Variable Event is triggered when the value of a variable matches a constant or expression.
  • Page 34: Actions

    Actions Creating and Editing Actions Actions are the tasks performed when an event is triggered, so they are always associated and displayed with their events. Actions may be created from the main Event Manager web page by first selecting an event, highlighting it, and then selecting the "Add action"...
  • Page 35: Action Timing Options

    If the "(expression)" check box is CHECKED, the Output Variable will be assigned the value calculated for the specified expression in the Output Value text box. The interpretation and calculation of expressions are detailed in the Expressions section. Serial A Serial Action allows you to send an Output Value to a specified port. If the "(expression)" check box is UNCHECKED, the value in the Output Value text box will be sent as a string to the specified port.
  • Page 36: Creating And Editing Variables

    The storage of the Current Value does take some time, since it is stored into flash. Therefore, if a variable is changed often, such as a counter, the CRM-WIC will perform more efficiently if you set a Default Value, and UNCHECK the "Persist" check box.
  • Page 37: Types Of Variables

    Current Value The Current Value is the working value of the variable. It is the value accessed in all Event and Action expressions. In addition, Variable Actions [[see page]] send their outputs to the Current Value. The Current Value is set to the Default Value during system start-up, if the Persistent flag is not set. Types of Variables Number A Number Variable can have an integer value between -2...
  • Page 38: Expressions

    (NOTE: Variable Events and Actions automatically interpret the value based on its variable type On the other hand, if the "(expression)" option is CHECKED, the CRM-WIC will treat the values as expressions and evaluate them before matching on a trigger or sending an output.
  • Page 39: Operators

    Operators The operators that are supported are: • Arithmetic operations: +, -, *, / • Logical comparison operators: ==, != , <, > • Logical operators: &&, ||, ! • Bitwise operators: &, | , ~ • Range operator: in Addition/Plus (+) Operator The ‘+’...
  • Page 40 Multiplication/Times (*) Operator This operator multiplies two numbers, or can be used for creating a string with a repeating value. The numbers and strings can be either variables or literals. For example: This expression... "Hello"*3 3*"Hello" Division/Divide (/) Operator The divide operator is valid only for numerical values and variables. Use this operator to divide one numerical value by another.
  • Page 41 Not-Equal Comparison (!=) Operator The not-equal comparison operator will compare two tokens, which can be strings or integers. Exactly opposite to the equal comparison operator, the expression will return 0 if the two tokens are equivalent, and 1 if they are NOT equal. For example, assuming MyNumber has an integer value of 4, and MyName has a string value of "John": This expression...
  • Page 42 If Expression1 is... True (1) True (1) False (0) False (0) In other words: This expression... (3==3)&&(4==4) 1&&(4==5) 0&&(4==4) (3==6)&&0 Logical-Or (||) Operator Assume you have two Boolean expressions, Expression1 and Expression2, each returning true (1) or false (0). The logical-or operator determines the true or false state of the complex expression Expression1||Expression2 using the rules applying to a traditional logical OR statement: If Expression1 is...
  • Page 43 This expression..resolves to this value. !(4==3) !("Hello"=="Hello")
  • Page 44 Bitwise-And (&) Operator The bitwise-and operator performs the logical AND operation bit by bit between two integers. This is better understood by looking at the example of 12&10. The binary value of 12 is 1100, and the binary value of 10 is 1010. 12&10 is computed by performing an AND between each of the corresponding four bits: 12&10: Therefore: 12&10 = (Hex) 1000 = (Decimal) 8...
  • Page 45: Escaping Special Characters

    Range (in) Operator The ‘in’ operator compares a numerical value or variable against a range variable. The resultant type is an integer value of either 0 or 1. If the value is within the range, 1 is returned; otherwise, 0 is returned. For example, assume Count has a value of 15, Range10 has a value of 1 to 10, and Range20 has a value of 1 to 20 This expression...
  • Page 46: Remote Procedure Calls

    Remote Procedure Calls The CRM-WIC supports remote procedure calls (RPCs) for most web interfaces, including HTML, Flash (.fla), and Active Server Pages (.asp). Methods are typically called using the HTTP Post syntax for HTML and Flash, and Visual Basic scripting for Active Server Pages.
  • Page 47: Response Tokens

    Response Tokens The response tokens are: • status - 0 for Failure, 1 for Success • faultCode - If status is 0 (failure). faultCode will be an integer representing a specific error {Fault Codes, page 48}. This token is NOT returned if status is 1 (success). •...
  • Page 48: Fault Codes

    STEP 1: Pass CRM-WIC IP Address to Flash To begin, you must pass the IP address of CRM-WIC to your Flash file. There is more than one way to do this, but below, we describe one sample method using JavaScript. NOTE: In this script, the .html and.swf files must reside on the CRM-WIC to determine the IP address.
  • Page 49: Step 2: Call Rpc With Http Post

    Once you have the IP address, you are able to access the RPC server. Load the method and it's parameters into a LoadVars() object as shown below, then make the call with sendAndLoad(). // Get CRM-WIC IP RPCServerIP = [callerID, or whatever you used to get the IP address of the CRM-WIC];...
  • Page 50: Step 3: Response Tokens

    To access an RPC using Visual Basic, first create a CRM-WIC object of type "CRM-WIC.UserAPI.1". Then, call the method with the object, specifying any parameters in parentheses. For example, this script in an Active Server Page retrieves the IP address of the CRM-WIC and the settings for serial ports 1 and Dim CRM-WICUser...
  • Page 51: Note On Error Checking

    Note on Error Checking The HRESULT, referred to in the Syntax of each method, ALWAYS returns "S_OK", so it is not useful in error checking. Instead, use the error checking values described in the HTTP Post and Visual Basic above, and the Error Information Methods below[[]] Errors are based on the type of a function’s out/retval value.
  • Page 52: Getlastextendederrorstring ( )

    Parameters ErrorString [out, retval] String describing an error. Remarks ErrorString corresponds to response1 of an HTTP Post response when status is 0 (failure). GetLastExtendedErrorString ( ) Returns an extended description of the error from the last failed method call. Syntax HRESULT GetLastExtendedErrorString( [out, retval] BSTR* ExtErrorString Parameters...
  • Page 53: Time_Getdate ( )

    Time_GetDate ( ) Returns current time and date on the device. Syntax HRESULT Time_GetDate( [out, retval] DATE* Date Parameters Date [out, retval] DATE object. Remarks If the returned DATE object represents a date before 1900, the returned value will be negative, signifying an error. The format is [year],[month],[day],[hour],[minute],[second],[millisecond]"...
  • Page 54: Net_Getsubnetmask ( )

    Net_GetSubnetMask ( ) Returns the current subnet mask of the device. Syntax HRESULT Net_GetSubnetMask( [out, retval] BSTR* SubnetMask Parameters SubnetMask [out, retval] String containing the current subnet mask of the device, such as "255.255.255.0".
  • Page 55: Serial Methods

    Serial Methods Serial_GetSettings ( Port ) Returns the port settings for the specified serial port. Use the CRM-WIC DIP switches or Web interface to set these parameters. Syntax HRESULT Serial_GetSettings( [in] long Port, [out, retval] BSTR* Settings Parameters Port [in] Port number for the serial port. Valid values are 1 and 2.
  • Page 56: Serial_Read ( Port )

    Serial_Read ( Port ) Returns the contents of the serial read buffer for the specified serial port. Syntax HRESULT Serial_Read( [in] long Port, [out, retval] BSTR* Read Parameters Port [in] Port number for the serial port. Valid values are 1 and 2. Read [out, retval] URL encoded string read from the specified port.
  • Page 57: Event Methods

    Event Methods Most of the Event methods use the Event’s ID to retrieve information about an Event. The Event’s ID is set when an Event is created, and is unique to the Event. The ID is re-issued when the system is powered up or the reset button is pressed.
  • Page 58: Geteventidxbyid ( Eventid )

    GetEventIdxById ( EventId ) Returns the index into the Event list for an Event with a specified ID. Syntax HRESULT GetEventIdxById( [in] long EventId, [out, retval] long* Idx Parameters EventId [in] ID for the specified event. [out, retval] The index of the Event in the Event list. Remarks The index returned will be in the range 0 to Count-1, where Count is the value returned by GetEventCount.
  • Page 59: Geteventoption ( Eventid, Optiontype )

    Remarks Type is returned as one of the following values: Value Type Unknown Scheduled Timer Variable Serial Input Digital Input A/D Input GetEventOption ( EventId, OptionType ) Returns the value of a specified option for a specified event. Syntax HRESULT GetEventOption( [in] long EventId, [in] long OptionType, [out, retval] long* OptionVal...
  • Page 60: Geteventconcurrent ( Eventid )

    GetEventConcurrent ( EventId ) GetEventConcurrent returns a value signifying whether an Event’s Actions should run concurrently or sequentially. Syntax HRESULT GetEventConcurrent( [in] long EventId, [out, retval] long* Concurrent Parameters EventId [in] ID for the specified event. Concurrent [out, retval] 1 if actions should be executed concurrently, 0 if actions should be executed sequentially. Remarks When Actions are set to execute sequentially, the next Action in the list will not execute until the previous Action has completely executed.
  • Page 61: Geteventmatch ( Eventid )

    GetEventMatch ( EventId ) Returns the expression to be evaluated or data to be compared when the Event is notified of a change in data Syntax HRESULT GetEventMatch( [in] long EventId, [out, retval] BSTR* Match Parameters EventId [in] ID for the specified event. Match [out, retval] [???]] Remarks...
  • Page 62: Geteventschrecurtype ( Eventid )

    GetEventSchRecurType ( EventId ) Returns the type of schedule used by the specified Event. Syntax HRESULT GetEventSchRecurType( [in] long EventId, [out, retval] long* RecurType Parameters EventId [in] ID for the specified event. RecurType [out, retval] Type of schedule to apply Valid values for RecurType are: Value Description Once...
  • Page 63: Geteventschmonth ( Eventid )

    Parameters EventId [in] ID for the specified event. MaskDay [out, retval] Day of the month, or a mask of bits for the days of the week. MaskDay values for weekly Events: Sunday Monday Tuesday Wednesday Thursday Friday Saturday Remarks This function is valid only for Clock Events. GetEventSchMonth ( EventId ) Returns the month value for the Event’s schedule.
  • Page 64: Geteventschyear ( Eventid )

    GetEventSchYear ( EventId ) Returns the year part of the Event’s schedule. Syntax HRESULT GetEventSchYear( [in] long EventId, [out, retval] long* Year Parameters EventId [in] ID for the specified event. Year [out, retval] Integer representing the scheduled year (for example, "1984" or "2003"). Remarks This function gets a value that is not used by the Event Manager.
  • Page 65: Geteventschminute ( Eventid )

    Parameters EventId [in] ID for the specified event. Hour [out, retval] Integer representing the scheduled hour. Values range from 0 to 23. Remarks This function is valid only for Clock and Timer Events. GetEventSchMinute ( EventId ) Returns the minute that the Event is to be triggered. Syntax HRESULT GetEventSchMinute( [in] long EventId,...
  • Page 66: Seteventbyid ( Eventid, Name, Type, Concurrent, Source, Match )

    SetEventById ( EventId, Name, Type, Concurrent, Source, Match ) Sets the basic information about an existing Event. Syntax HRESULT SetEventById( [in] long EventId, [in] BSTR Name, [in] long Type, [in] long Concurrent, [in] BSTR Source, [in] BSTR Match, [out, retval] VARIANT_BOOL* Success Parameters EventId [in] ID for the specified event.
  • Page 67: Seteventoption ( Eventid, Optiontype, Optionval )

    Syntax HRESULT SetEventByName( [in] BSTR Name, [in] long Type, [in] long Concurrent, [in] BSTR Source, [in] BSTR Match, [out, retval] VARIANT_BOOL* Success Parameters Name [in] Name of the Event to set the information for. Type [in] Type of Event, e.g. Clock Set Type to one of the following values: Value Type Scheduled...
  • Page 68 [in] BSTR OptionVal, [out, retval] VARIANT_BOOL* Success Parameters EventId [in] ID of the event to modify. OptionType [in] Integer specifying which option to modify. OptionVal [in] New value for the option. Success [out, retval] TRUE if specified option was successfully set, FALSE if setting the option failed. Remarks Pass one of the following values into OptionType: Value Option...
  • Page 69: Seteventschedule ( Eventid, Recur, Maskorday, Month, Year, Recureveryn, Hour, Minute, Second )

    SetEventSchedule ( EventId, Recur, MaskOrDay, Month, Year, RecurEveryN, Hour, Minute, Second ) Modify the schedule settings of a specified event. Syntax HRESULT SetEventSchedule( [in] long EventId, [in] long Recur, [in] long MaskOrDay, [in] long Month, [in] long Year, [in] long RecurEveryN, [in] long Hour, [in] long Minute, [in] long Second,...
  • Page 70: Cloneeventbyid ( Eventid, Cloneactions, Newname )

    Remarks This function is valid only for Clock and Timer Events. If both SetEventSchedule and SetEventOption need to be called for an Event, then SetEventOption should be called before SetEventSchedule. CloneEventById ( EventId, CloneActions, NewName ) Clone (duplicate) an Event specified by its ID. Syntax HRESULT CloneEventById( [in] long EventId,...
  • Page 71: Deleteeventbyid ( Eventid )

    Concurrent [in] Set to 1 to execute Actions concurrently, and 0 otherwise. [in] Port, variable, etc. to be used for the source of the Event’s trigger. The value of Source depends on the type of Source Event. Event Type Clock and Timer Variable Serial Match...
  • Page 72: Sortevents ( Sorttype, Direction )

    SortEvents ( SortType, Direction ) Sorts the list of Events by the sort type and direction. Syntax HRESULT SortEvents( [in] long SortType, [in] long Direction, [out, retval] VARIANT_BOOL* Success Parameters SortType [in] Type of sort to apply to the list. Direction [in] Direction of the sort: ascending (1) or descending (0).
  • Page 73: Action Methods

    Action Methods GetActionByIdx ( EventId, Idx ) Returns the Action ID for a specified Event ID and Action index number. Syntax HRESULT GetActionByIdx( [in] long EventId, [in] long Idx, [out, retval] long* ActionId Parameters EventId [in] ID of the Event that contains the Action. [in] Index number for the Action.
  • Page 74: Moveactionbyidx ( Eventid, Idx, Where )

    MoveActionByIdx ( EventId, Idx, Where ) Changes the order of execution for the Actions under the specified Event. Syntax HRESULT MoveActionByIdx( [in] long EventId, [in] long Idx, [in] long Where, [out, retval] VARIANT_BOOL* Success Parameters EventId [in] ID of specified event. [in] Index number for the Action of interest Where [in] Direction to move the Action in the execution order.
  • Page 75: Getactionoption ( Actionid, Optiontype )

    Remarks Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Value Action Type Set a Variable’s value CRM-WIC Send serial data Trigger another Event GetActionOption ( ActionId, OptionType ) Returns the option for an Action, specified by its ID and the option type.
  • Page 76: Getactiondelay ( Actionid )

    GetActionDelay ( ActionId ) Returns the “Delay before start” value for the specified Action. Syntax HRESULT GetActionDelay( [in] long ActionId, [out, retval] double* Delay Parameters ActionId [in] ID of the action to examine. Delay [out, retval] Number of seconds to delay. A millisecond is represented as 0.001 seconds. Remarks For Actions that execute concurrently and for the first Action in the execution list, the value returned by this function is the number of seconds that the Event Manager will wait after the owning Event has been triggered before executing the Action.
  • Page 77: Getactionport ( Actionid )

    Parameters ActionId [in] ID of the action to examine. StopAfter [out, retval] The number of times to execute the Action Remarks If -1 is returned in StopAfter, then the Action will execute continuously until the owning Event is specifically canceled by an Action of type “Event”.
  • Page 78: Setactionbyid ( Actionid, Name, Type, Delay, Dutycycle, Stopafter, Port, Output )

    Remarks The output value for the Action depends on the type of Action. Action Type Returned values for Output Variable Depends on the type of Variable being assigned Serial A simple string or complex expression Event “0”: Cancel the Event “1”: Execute the Event “2”: Disable the Event “3”: Enable the Event...
  • Page 79 Variable. For Actions that execute or cancel an Event, the Port value is the name of the Event. In all other cases, Port is the name of the port of the associated device, e.g. “Port1”. Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Value Action Type Set a Variable’s value CRM-WIC...
  • Page 80: Setactionbyidx ( Eventid, Idx, Name, Type, Delay, Dutycycle, Stopafter, Port, Output )

    SetActionByIdx ( EventId, Idx, Name, Type, Delay, DutyCycle, StopAfter, Port, Output ) Modifies an Action specified by its associated Event ID and index. Syntax HRESULT SetActionByIdx( [in] long EventId, [in] long Idx, [in] BSTR Name, [in] long Type, [in] double Delay, [in] double DutyCycle, [in] long StopAfter, [in] BSTR Port,...
  • Page 81: Setactionbyname ( Eventid, Name, Type, Delay, Dutycycle, Stopafter, Port, Output )

    Variable. For Actions that execute or cancel an Event, the Port value is the name of the Event. In all other cases, Port is the name of the port of the associated device, e.g. “Port1”. Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Value Action Type Set a Variable’s value CRM-WIC...
  • Page 82: Setactionoption ( Actionid, Optiontype, Optionval )

    Variable. For Actions that execute or cancel an Event, the Port value is the name of the Event. In all other cases, Port is the name of the port of the associated device, e.g. “Port1”. Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Value Action Type Set a Variable’s value CRM-WIC...
  • Page 83: Addactionbyevid ( Eventid, Name, Type, Delay, Dutycycle, Stopafter, Port, Output )

    Syntax HRESULT SetActionOption( [in] long ActionId, [in] long OptionType, [in] long OptionVal [out, retval] VARIANT_BOOL* Success Parameters ActionId [in] ID for specified action. OptionType [in] Type of option to modify. OptionVal [in] Updated value for the option. Success [out, retval] TRUE if the specified action option was updated, FALSE if updating the option failed. Remarks Two options are supported for Actions: OptionType...
  • Page 84: Addactionbyevname ( Eventname, Name, Type, Delay, Dutycycle, Stopafter, Port, Output )

    Variable. For Actions that execute or cancel an Event, the Port value is the name of the Event. In all other cases, Port is the name of the port of the associated device, e.g. “Port1”. Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Value Action Type Set a Variable’s value CRM-WIC...
  • Page 85 Variable. For Actions that execute or cancel an Event, the Port value is the name of the Event. In all other cases, Port is the name of the port of the associated device, e.g. “Port1”. Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Valid values for Output...
  • Page 86: Deleteactionbyid ( Actionid )

    Value Action Type Set a Variable’s value CRM-WIC Send serial data Trigger another Event DeleteActionById ( ActionId ) Delete an Action with the given ID. Syntax HRESULT DeleteActionById( [in] long ActionId, [out, retval] VARIANT_BOOL* Success Parameters ActionId [in] ID of the Action to delete.
  • Page 87: Deleteactionbyidx ( Eventid, Idx )

    DeleteActionByIdx ( EventId, Idx ) Delete an Action from the specified Event’s list of Actions. Syntax HRESULT DeleteActionByIdx( [in] long EventId, [in] long Idx, [out, retval] VARIANT_BOOL* Success Parameters EventId [in] ID of the Event that owns the Action. [in] Index into the Event’s list of Actions that identifies which Action to delete. Success [out, retval] TRUE if the specified Action was successfully deleted, FALSE if deleting the Action failed.
  • Page 88: Getactioncount ( Eventid )

    Parameters SortType [in] Type of sort to perform Direction [in] Direction of the sort: 1 for ascending, and 0 for descending. Success [out, retval] TRUE if the Actions were successfully sorted, FALSE if sorting the Actions failed. Remarks This function is not supported in the version 2.0 firmware. GetActionCount ( EventId ) Returns the total number of Actions associated with an Event.
  • Page 89: Getvariablebyname ( Name )

    GetVariableByName ( Name ) Returns a Variable’s ID (not the value) from its name. Syntax HRESULT GetVariableByName( [in] BSTR Name, [out, retval] long* VarId Parameters Name [in] Name of Variable to get the ID of. VarId [out, retval] ID of the named Variable. GetVariableName ( VarId ) Returns the Variable’s name from its ID.
  • Page 90: Getvariabletype ( Varid )

    GetVariableType ( VarId ) Returns the type of the specified variable. Syntax HRESULT GetVariableType( [in] long VarId, [out, retval] long* Type Parameters VarId [in] ID of specified Variable. Type [out, retval] The type of value stored in the Variable. Valid types are: Type Value Description GetVariableDefault ( VarId ) Returns the default value of the specified variable.
  • Page 91: Setvariablebyid ( Varid, Name, Type, Default, Value, Persist )

    Syntax HRESULT GetVariableValue( [in] long VarId, [out, retval] BSTR* Value Parameters VarId [in] ID of specified variable. Value [out, retval] String containing the current value of the specified variable. Remarks The returned value is a string that represents the stored value of the Variable. The string value will need to be converted by the caller into the actual type, e.g.
  • Page 92 Parameters VarId [in] ID of the Variable. Name [in] Name of the specified Variable (can be modified). Type [in] Variable type Valid types are: Type Value Description Default [in] Default value for the Variable. Value [in] Current value for the Variable. Persist [in] Set to 1 to make the Variable persistent.
  • Page 93: Setvariablebyname ( Name, Type, Default, Value, Persist )

    SetVariableByName ( Name, Type, Default, Value, Persist ) Modifies a Variable, specified by its name. Syntax HRESULT SetVariableByName( [in] BSTR Name, [in] long Type, [in] BSTR Default, [in] BSTR Value, [in] long Persist, [out, retval] VARIANT_BOOL* Success Parameters Name [in] Name of the Variable to change. Type [in] Variable type Valid types are:...
  • Page 94: Addvariable ( Name, Type, Default, Value, Persist )

    Remarks Use SetVariableByID to modify the Variable’s name. Default and Value The returned value is a string that represents the stored value of the Variable. The string value will need to be converted by the caller into the actual type, e.g. a variable of type long. The format for the returned string depends on the Variable’s type.
  • Page 95: Deletevariablebyid ( Varid )

    Parameters Name [in] Name to give the newly added Variable. Type [in] Type of Variable to add. Valid types are: Type Value Description Default [in] Default value of the new Variable. Value [in] Current value of the new Variable. Persist [in] Set to 1 to make the Variable persistent, 0 if not.
  • Page 96: Deletevariablebyname ( Name )

    Parameters VarId [in] ID of the Variable to delete. Success [out, retval] TRUE if the specified Variable was successfully deleted, FALSE if deleting the Variable failed. Remarks Get the ID of the variable by calling either GetVariableByName or GetVariableByIdx. DeleteVariableByName ( Name ) Delete a Variable specified by its name.
  • Page 97: Getvariablecount ( )

    GetVariableCount ( ) Returns the total number of variables. Syntax HRESULT GetVariableCount( [out, retval] long* NumVariables Parameters NumVariables [out, retval] Total number of variables in the system. Remarks Use this function in conjunction with GetVariableByIdx to enumerate the list of available Variables.
  • Page 98: Index

    Index...
  • Page 99: Limited Warranty

    Limited Warranty Xantech Corp. warrants that this product is free of defects in both materials and workmanship for a period of 1 year for parts and labor from date of purchase. During the warranty period, and upon proof of purchase, the product will be repaired or replaced (with same or similar model) at our option without charge for parts or labor for the specified warranty period (1 year parts and labor).

Table of Contents