REV 1 FIELDBUS GATEWAY MANAGER USER MANUAL Phone: (815) 433-5100 Fax: (815) 4334-5104 www.bb-elec.
Copyright © 2010 B&B Electronics. All Rights Reserved Worldwide. The information contained herein is provided in good faith, but is subject to change without notice. It is supplied with no warranty whatsoever, and does not represent a commitment on the part of B&B Electronics. Companies, names and data used as examples herein are fictitious unless otherwise stated.
TABLE OF CONTENTS TABLE OF CONTENTS GETTING STARTED ..........................................................................................1 SYSTEM REQUIREMENTS.................................................................................... 1 INSTALLING THE SOFTWARE ............................................................................... 1 CHECKING FOR UPDATES ................................................................................... 1 INSTALLING THE USB DRIVERS .....................
TABLE OF CONTENTS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL PROTOCOL CONVERSION ................................................................................. 20 MASTER AND SLAVE ........................................................................................................................ 20 MASTER AND MASTER...................................................................................................................... 20 WHICH WAY AROUND? ..............................................
TABLE OF CONTENTS EXPRESSION PROPERTIES ................................................................................................................. 53 TRANSLATABLE STRINGS .................................................................................................................. 54 COLOR PROPERTIES ........................................................................................................................ 54 EDITING FLAG TAGS .......................................................
TABLE OF CONTENTS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL KEYBOARD OPTIONS ....................................................................................................................... 82 LOCK INSERT MODE ........................................................................................................................ 82 USING THE IMAGE LIBRARY .............................................................................. 83 SELECTING PRIMITIVES ........................................
TABLE OF CONTENTS THE DIAL GAUGE PRIMITIVES .......................................................................................................... 134 DEFINING PAGE PROPERTIES ........................................................................... 137 DEFINING SYSTEM ACTIONS ............................................................................ 138 ADDITIONAL SYSTEM PROPERTIES .................................................................... 138 SELECTING LANGUAGES .......................
TABLE OF CONTENTS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL COMPACTFLASH ACCESS ................................................................................. 164 ACCESSING THE WEB SERVER .......................................................................... 165 USING ETHERNET ......................................................................................................................... 165 USING MODEMS .....................................................................................
TABLE OF CONTENTS CHANGING PAGE .......................................................................................... 183 CHANGING NUMERIC VALUES ........................................................................... 183 SIMPLE ASSIGNMENT ..................................................................................................................... 183 COMPOUND ASSIGNMENT ...............................................................................................................
TABLE OF CONTENTS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL COMMITANDRESET() .................................................................................... 215 COMPACTFLASHEJECT() ................................................................................. 216 COMPACTFLASHSTATUS() ............................................................................... 217 CONTROLDEVICE(DEVICE, ENABLE) ................................................................... 218 COPY(DEST, SRC, COUNT)........
TABLE OF CONTENTS GETFORMATTEDTAG(INDEX) ........................................................................... 256 GETINTERFACESTATUS(PORT) ......................................................................... 257 GETINTTAG(INDEX) ...................................................................................... 258 GETMAXTAGINT(INDEX) ................................................................................ 259 GETMAXTAGREAL(INDEX) .....................................................
TABLE OF CONTENTS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL MULDIV(A, B, C) .......................................................................................... 297 MUTESIREN() ............................................................................................. 298 NEWBATCH(NAME) ....................................................................................... 299 NOP() .......................................................................................................
TABLE OF CONTENTS SLEEP(PERIOD) ........................................................................................... 339 SQRT(VALUE) .............................................................................................. 340 STDDEV(ELEMENT, COUNT)............................................................................. 341 STOPSYSTEM() ............................................................................................ 342 STRIP(TEXT, TARGET) ......................................
VLINX FIELDBUS GATEWAY MANAGER USER MANUAL
GETTING STARTED SYSTEM REQUIREMENTS GETTING STARTED Fieldbus Gateway Manager is designed to provide quick and easy access to the features of the Vlinx Fieldbus Gateway series, while still allowing the advanced user to take advantage of high-end features, such as Fieldbus Gateway Manager’s unique programming support. SYSTEM REQUIREMENTS Fieldbus Gateway Manager is designed to run on PCs with the following specifications… • A Pentium class processor as required by the chosen operating system.
INSTALLING THE USB DRIVERS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL INSTALLING THE USB DRIVERS When you first connect a Vlinx Fieldbus Gateway to your PC using a USB cable, Windows Hardware Wizard will appear. Before continuing, make sure that the CD containing Vlinx Fieldbus Gateway Manager is in the CDROM drive of your PC. If connected to the Internet, Windows will ask to connect to Windows Update.
FIELDBUS GATEWAY MANAGER BASICS MAIN SCREEN ICONS FIELDBUS GATEWAY MANAGER BASICS To run Fieldbus Gateway Manager, select the Fieldbus Gateway Manager icon from the B&B Electronics folder on the Programs section of your Start Menu. The main Fieldbus Gateway Manager screen will appear, showing the icons that are used to configure the various aspects of the gateway’s behavior… The software is designed such that the first three icons are the only ones required for the majority of simple applications.
MAIN SCREEN ICONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL More advanced tag properties include alarms that may activate when various conditions relating to the tag occur, or triggers, which perform programmable actions on similar conditions. USER INTERFACE This icon is used to create and edit display pages, and to specify what actions should be taken when the Gateway’s keys are pressed, released or held down. The page editor allows you to display various graphical items known as primitives.
FIELDBUS GATEWAY MANAGER BASICS SELECTING A MODEL SECURITY MANAGER This icon is used to create and manage the various users of the Gateway, as well as the access rights granted to them. Real names may also be given, which allows the security logger to record not only what data was changed and when, but also by whom the data was changed. The rights required to modify a particular tag, or to access a page, are set via the security properties of the individual item.
WORKING WITH DATABASES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL This feature allows you to see help information for each icon in the main menu, or for each field in a dialog box or window.
FIELDBUS GATEWAY MANAGER BASICS DOWNLOADING TO A VLINX FIELDBUS GATEWAY VERIFYING THE USB LINK If you are using USB, you might also want to ensure that the Gateway’s USB drivers have been correctly installed. To do this, connect the Fieldbus Gateway, and, if the drivers have not previously been installed, follow the instructions at the start of this manual. Then, open the Device Manager for your operating system, and expand the USB icon to show the icon for the Vlinx device.
DOWNLOADING TO A VLINX FIELDBUS GATEWAY VLINX FIELDBUS GATEWAY MANAGER USER MANUAL upgrades at some point in time, it is highly recommended that you install a CompactFlash card in any device to which TCP/IP downloads are likely to be performed. EXTRACTING DATABASES The Link-Support Upload command can be used to instruct Fieldbus Gateway Manager whether or not it should include the information necessary to support database upload when sending a database to a Fieldbus Gateway.
FIELDBUS GATEWAY MANAGER BASICS DOWNLOADING TO A VLINX FIELDBUS GATEWAY Note that some caution is required when mounting the CompactFlash card... • When the card is mounted, the Gateway will periodically inform the PC if data on the card has been modified. This means that both the PC and the Gateway will suffer performance hits if the card is mounted during data logging operations for longer than necessary.
UPDATING VIA COMPACTFLASH VLINX FIELDBUS GATEWAY MANAGER USER MANUAL UPDATING VIA COMPACTFLASH If you need to update the database within a unit that is already installed at a customer’s site, Fieldbus Gateway Manager allows you to save a copy of the database to a CompactFlash card, ship that card to your customer, and have the Gateway load the database from that card. The process is performed via the Save Image command on the File menu.
FIELDBUS GATEWAY MANAGER BASICS REVISION 1 GURU MEDITATION CODES PAGE 11
CONFIGURING COMMUNICATIONS SERIAL PORT USAGE CONFIGURING COMMUNICATIONS The first stage of creating a Fieldbus Gateway Manager database is to configure the communications ports of the Fieldbus Gateway to indicate which protocols you want to use, and which remote devices you want to access. These operations are performed from the Communications window, which is opened by selecting the first icon of the Fieldbus Gateway Manager main screen.
PROTOCOL OPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL Select the appropriate manufacturer and driver, and press the OK button to close the dialog box. The port will then be configured to use the appropriate protocol, and a single device icon will be created in the left-hand pane. If you are configuring a serial port, the various Port Settings fields (Baud Rate, Data Bits, Stop Bits and Parity) will be set to values appropriate to the protocol in question.
CONFIGURING COMMUNICATIONS ETHERNET CONFIGURATION In the example above, the Modbus Universal Master protocol has been selected, and two additional devices have been created, indicating that a total of three remote devices are to be accessed. The right-hand pane of the window shows the properties of a single device. The Enable Device property is present for devices for all protocols, while the balance of the fields are specific to the protocol that has been selected.
ETHERNET CONFIGURATION VLINX FIELDBUS GATEWAY MANAGER USER MANUAL PHYSICAL LAYER The Physical Layer options control the type of connection that the Gateway will attempt to negotiate with the hub to which it is connected.
CONFIGURING COMMUNICATIONS SLAVE PROTOCOLS For most protocols, this will produce higher performance, as it will allow simultaneous communications with the two devices. It will, however, consume two of the four protocols, limiting your ability to connect via additional protocols in complex applications.
SLAVE PROTOCOLS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL Note that a single device has been automatically created for the protocol. In the case of master protocols, this represents the remote device that the Gateway will access. In this case, though, the device represents the Modbus slave that the Gateway will itself embody.
CONFIGURING COMMUNICATIONS SLAVE PROTOCOLS ADDING ITEMS TO A BLOCK Once the block has been created and its size defined, entries appear in the left-hand pane of the window to represent each of the registers that the block exposes to remote access.
PROTOCOL CONVERSION VLINX FIELDBUS GATEWAY MANAGER USER MANUAL PROTOCOL CONVERSION In addition to exposing internal data tags via slave protocols, Gateway Blocks can also be used to expose data that is obtained from other remote devices, or to move data between two such master devices. This unique protocol conversion feature allows much tighter integration between elements of your control system, even when using simple, low-cost devices.
CONFIGURING COMMUNICATIONS DATA TRANSFORMATION To move data between two master devices, simply select one of the devices, and create a Gateway Block for that device. You can then add references to the other device’s registers just as you would when exposing data on a slave protocol. Again, C2 will automatically read or write the data as required, transparently moving data between the devices. The example above shows how to move data from a Mitsubishi FX into an SLC-500.
ADVANCED COMMUNICATIONS USING EXPANSION CARDS ADVANCED COMMUNICATIONS This chapter explains how to use some of the more advanced communications features that are supported by Fieldbus Gateway Manager. Simple applications may not require these features, and you may thus choose to skip this chapter and return to it later. USING EXPANSION CARDS Each Fieldbus Gateway is capable of hosting an expansion card to provide additional communications facilities.
SHARING SERIAL PORTS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SHARING SERIAL PORTS All Vlinx Fieldbus Gateways provide a so-called “port sharing” facility that allows either physical or virtual serial connections to be made to any device connected to the Gateway. For example, you may be using the Gateway with a small programmable controller, but since the PLC has only a single serial port, you may find yourself continually swapping cables when modifying the PLC’s ladder program.
ADVANCED COMMUNICATIONS SHARING SERIAL PORTS TCP/IP port number of the serial port that you have shared. In the example below, we are routing data from the programming port to a PLC that is connected via the RS-232 comms port… Note that the Baud rate and other port settings do not have to be the same as those for the port which we are sharing.
SHARING SERIAL PORTS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL is thus the only package that we are able to support, and the following information assumes that you are using this package. To create a virtual serial port, open Serial/IP’s configuration screen, and select the name of the COM port you wish to define. This will typically be the first free COM port after those allocated to the physical ports and modems installed in your PC.
ADVANCED COMMUNICATIONS USING ELECTRONIC MAIL LIMITATIONS Note that some PLC programming packages may not work with virtually or physically shared ports. Issues to watch out for are tight timeouts that do not allow the Gateway time to relay the data to the PLC; a reliance on sending break signals or on the manipulation of hardware handshaking lines; or DOS-style port access such that the package cannot “see” the virtual serial ports.
USING ELECTRONIC MAIL VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The configuration options for the SMTP transport are shown below… PAGE 28 • The Transport Mode property is used to enable or disable the transport. Note that the mail manager must be enabled via the General tab before the SMTP transport can be enabled. Note also that either SMTP or SMS must be enabled if the mail manager is to be able to deliver messages.
ADVANCED COMMUNICATIONS USING ELECTRONIC MAIL useful when debugging SMTP operations, but it will tend to degrade performance slightly. • The Initial Timeout property is used to specify how long the mail client will wait for the SMTP server to sent its welcome banner. Some Microsoft servers attempt to negotiate Microsoft-specific authentication with mail clients, thereby delaying the point at which the banner appears.
WORKING WITH MODEMS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL THE ADDRESS BOOK The Addresses tab is used to define email recipients… An unlimited number of address book entries can be added, edited or deleted using the buttons in the right-hand pane. Each entry can refer to one or more email recipients from any of the transports enabled by the database. Recipients for multiple transports can be included in the same entry.
ADVANCED COMMUNICATIONS WORKING WITH MODEMS TCP/IP download facility, its web server, its shared serial ports, and to any TCP/IP protocols that have been selected via the Communications window. SOME TYPICAL APPLICATIONS The sections below list some typical applications of modem technology… • You want a Fieldbus Gateway in a remote location to send an email to a service engineer to inform him of a fault condition.
WORKING WITH MODEMS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL ADDING A DIAL-IN CONNECTION To add a dial-in connection to your database, open the Communications window and select the serial port to which the connection will be made.
ADVANCED COMMUNICATIONS WORKING WITH MODEMS even if you want a permanent connection, you must enter a suitable timeout so as to allow the detection of dead links. This implies that so-called permanent connections may still drop on occasions, but since the client will immediately reestablish the link, this is not an issue. REVISION 1 • The Additional Init string is used with non-direct links, and provides a series of AT commands to be used to initialize the modem. The initial AT prefix is not required.
WORKING WITH MODEMS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL ADDING A DIAL-OUT CONNECTION Dial-out connections are added exactly as above, except that the PPP and Modem Client driver should be selected for the required port.
ADVANCED COMMUNICATIONS WORKING WITH MODEMS specify the timeout after which the link will be terminated if no packets have been transmitted by the Gateway. • The Logon Username and Logon Password properties are used to define the credentials that will be passed to the remote server when attempting to initialize this connection. The username is not case sensitive, while the password is.
WORKING WITH MODEMS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SMS MESSAGE PROCESSING When SMS messaging is enabled, the Gateway will instruct the GSM modem to check for new incoming or outgoing messages every five seconds. Incoming messages are forwarded to the mail manager, which will optionally forward them to other users according to its configuration.
ADVANCED COMMUNICATIONS WORKING WITH MODEMS IP ROUTING The Ethernet icon in the Communications window contains a property called IP Routing. If this facility is enabled, incoming packets from non-firewalled modem interfaces will be compared against the IP address and netmask for the Ethernet interface, and will be forwarded to that interface should a match occur.
WORKING WITH MODEMS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL STATUS MEANING CONNECTED The modem has established a connection. This state will persist for only a short time, as the LCP negotiation process will begin after a small delay. NEG LCP The connection is negotiating LCP options. This process decides on a set of link protocol settings that are acceptable to both the client and the server.
ADVANCED COMMUNICATIONS WORKING WITH MODEMS • No Flow Control • Modem must ignore RTS • DSR override, always on • Auto answer disabled • Escape character set to 43 decimal • 500 millisecond guard time for the escape code sequence (+++) The following sequence shows the init strings send to modems: AT COMMAND STRING DESCRIPTION AT&FE0 &F - set factory defaults (same as &F0) E0 - disable echo ATH0Q0V1 H0 - Hang Up Q0 - Displays result codes V1 - Verbal codes ATL1M1X3 L1 - Low speaker volum
USING TIME MANAGEMENT VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The codes in the table below are modem replies recorded in the file.
ADVANCED COMMUNICATIONS USING TIME MANAGEMENT The properties are detailed below… • The Enable Time Manager property is used to control access to the other facilities. If it is not checked, Fieldbus Gateway Manager will operate in local time and will have no knowledge of time-zones or other time management information. TIME SERVER Fieldbus Gateway Manager can act as an SNTP server by selecting yes in the Time Server Enable SNTP drop down selection box.
USING TIME MANAGEMENT VLINX FIELDBUS GATEWAY MANAGER USER MANUAL selected, the unit’s Ethernet port must be configured to use DHCP, and the network’s DHCP server must be configured to designate a server via option 42. • The Enable GPS property is used to instruct the time client to use a GPS unit connected via NMEA-0183 as an alternative method of obtaining the current time. The unit may be connected to any serial port using the appropriate driver.
ADVANCED COMMUNICATIONS CONFIGURING THE SYNCHRONIZATION MANAGER (FTP) TIME-ZONE CONFIGURATION As mentioned above, the Fieldbus Gateway must have knowledge of the current time-zone if it is to use advanced time management. This information can be given to the Gateway in two ways: The simplest method is to use Send Time command on the Link menu of the Fieldbus Gateway Manager configuration software.
CONFIGURING THE SYNCHRONIZATION MANAGER (FTP) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL • The Server IP address indicates the IP address of the FTP server. In most applications, this address will be a computer/server IP address. • The Port Number represents the TCP port to which the Gateway FTP client service connects. This port number is setup in the FTP server. The default value is suitable for most applications.
ADVANCED COMMUNICATIONS CONFIGURING THE FTP SERVER The Log synchronization becomes available and the following settings can be entered. • The Base Directory defines the directory on the server where the log files will be synchronized. This directory is relative to the folder settings given in the FTP server.
CONFIGURING THE FTP SERVER VLINX FIELDBUS GATEWAY MANAGER USER MANUAL Numerous FTP clients are available on the market, some free, others at a charge. Windows Explorer is an example of FTP client embedded in the OS. The FTP Server configuration is available in the Communication module. FTP SERVER SETTINGS Check the Enable FTP Server check box to activate the FTP Server support. The following settings are then available.
ADVANCED COMMUNICATIONS CONFIGURING THE FTP SERVER ACCESSING THE SERVER To access an FTP server from a web browser, type ftp://192.168.200.1 where 192.168.200.1 has to be replaced with your unit IP address.
CONFIGURING DATA TAGS ALL ABOUT TAGS CONFIGURING DATA TAGS Once you have configured the communications options for your database, the next step is to define the data items that you want to display or otherwise manipulate. This is done by selecting the Data Tags icon from the main screen. ALL ABOUT TAGS Data Tags are named entities that represent data items within the Gateway.
ALL ABOUT TAGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL equal to the contents of a PLC register, it is not truly mapped to that register, in that it can never be written to and thus cannot be considered to be equivalent to that register. The need for this restriction is obvious if you consider a formula such a Tank1+Tank2. What would it mean to write to this expression? • Arrays represent a collection of data items within the terminal.
CONFIGURING DATA TAGS ALL ABOUT TAGS TAG COLORS The color of the tag depends of its family and mapping with a communication device. The table below shows the different colors by family and access for an integer tag. The same color scheme is used on all tag types; only the symbol is then different as shown above.
CREATING TAGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL • Tags are used within Fieldbus Gateway Manager to implement many advanced features. If you want to use functionality such as alarms, triggers, data logging or the web server, you will have to use tags, period. The formatting data from the tag definition is typically required by all these features, so tags are mandatory for their operation. In other words, tags will automate many tasks during programming, saving you time.
CONFIGURING DATA TAGS EDITING PROPERTIES EDITING PROPERTIES Most properties are edited in ways that are self-evident to anyone who has used a Windows operating system. For example, you may be required to enter a numeric value, or to select an item from a drop-down list. Certain types of property, though, provide more complex editing options, and these are described below. EXPRESSION PROPERTIES Expression properties are capable of being set to… • A constant value. • The contents of a data tag.
EDITING PROPERTIES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL TRANSLATABLE STRINGS Fieldbus Gateway Manager databases are designed to support multi-lingual operation, whereby any string that will be presented to the user of the Fieldbus Gateway is capable of being displayed in one of many different languages. To allow you to define these translations, properties that contain such strings have a button labeled Translate to their right-hand side.
CONFIGURING DATA TAGS EDITING FLAG TAGS The More option at the bottom of the list can be used to invoke the color selection dialog… This dialog offers several ways of defining a color. You can pick from the palette, pick from the “rainbow” window, or enter the explicit HSL or RGB parameters. The dialog also allows custom colors to be added to the palette. These will appear whenever the dialog is invoked, and will also appear in the drop-down list described above.
EDITING FLAG TAGS PAGE 56 VLINX FIELDBUS GATEWAY MANAGER USER MANUAL • The Bit Number property is used when a flag variable is mapped to a PLC register which contains more than a single bit of information. The property is then used to indicate which bit within the register is to be accessed by the tag. • The Access property is used to specify what sort of data transfers should be performed for a mapped variable.
CONFIGURING DATA TAGS EDITING FLAG TAGS THE DATA TAB (FORMULAE) The Data tab of a flag formula contains the following properties... • The Tag Value property is used to specify the value that is to be represented by this tag. It is typically set to a logical combination of other tags or PLC registers, or to a comparison between numeric values. In the example shown above, the tag is configured to be true when a motor speed exceeds a certain value.
EDITING FLAG TAGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL • The Simulation property is as described for flag variables. Note that the value to be simulated applies to all elements of the array. If you need to simulate on a per element basis, use a number of formulae to alias the array elements. • The Read Policy property is used to define how Fieldbus Gateway Manager will read the data for arrays that are mapped to remote data items.
CONFIGURING DATA TAGS EDITING FLAG TAGS • The Label Text property is used to specify the label that can be shown next to this tag when including the tag on a display page. The label differs from the tag name, in that the former can be translated for international applications, while the latter remains unchanged and is never shown to the user of the Gateway. • The On State and Off State properties are used to specify the text to be displayed when the tag contains a non-zero and zero value, respectively.
EDITING FLAG TAGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL THE ALARMS TAB The Alarms tab of a flag variable or formula contains the following properties... • The Event Mode property is used to indicate the logic that will be used to decide whether the alarm should activate. The tables below list the available modes. MODE ALARM WILL ACTIVATE WHEN… Active On The tag is true. Active Off The tag is false.
CONFIGURING DATA TAGS EDITING FLAG TAGS event, this property also specifies the amount of time for which the alarm condition must no longer exist before subsequent reactivations will result in a further alarm being signaled. As an example, if an alarm is set to activate when a speed switch indicates that a motor is not running even when the motor has been requested to start, this property can be used to provide the motor with time to run-up before the alarm is activated.
EDITING INTEGER TAGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL EDITING INTEGER TAGS You will recall that integer tags represent a 32-bit signed value. The following sections describe the various tabs that are displayed on the right-hand side of the Data Tags window when editing one of the various kinds of integer tags. THE DATA TAB (VARIABLES) The Data tab of an integer variable contains the following properties...
CONFIGURING DATA TAGS EDITING INTEGER TAGS MODE DESCRIPTION BCD to Binary The BCD value is converted to binary. Binary to BCD The binary value is converted to BCD. Swap Bytes in Word The lower two bytes of the value are swapped. Swap Bytes in Long All four bytes of the value are swapped. Swap Words The upper and lower words of the value are swapped. Reverse Bits in Byte Bits 0 through 7 of the value are reversed. Reverse Bits in Word Bits 0 through 15 of the value are reversed.
EDITING INTEGER TAGS • VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The Setpoint properties are as described for integer variables. THE DATA TAB (ARRAYS) The Data tab of an integer array contains the following properties... PAGE 64 • The Mapping property is used to specify if the variable is to be mapped to a register in a remote device, or if it exists only within the terminal.
CONFIGURING DATA TAGS EDITING INTEGER TAGS THE FORMAT TAB The Format tab of an integer tag contains the following properties... REVISION 1 • The Label Text property is used to specify the label that can be shown next to this tag when including the tag on a display page. The label differs from the tag name, in that the former can be translated for international applications, while the latter remains unchanged and is never shown to the user of the Gateway.
EDITING INTEGER TAGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL • The Group Digits property is used to indicate whether decimal values should have the digits before the decimal place grouped in threes, and separated with commas. Similar separation is performed on other number bases, using groupings and separators appropriate to the selected radix. • The Prefix property is used to specify a translatable string that will be displayed in front of the numeric value.
CONFIGURING DATA TAGS EDITING INTEGER TAGS THE ALARM TABS Each Alarm tab of an integer variable or formula contains the following properties... • The Event Mode property is used to indicate the logic that will be used to decide whether the alarm should activate. The tables below list the available modes. MODE ALARM WILL ACTIVATE WHEN… Data Match The value of the tag is equal to the alarm’s Value. Data Mismatch The value of tag is not equal to the alarm’s Value.
EDITING MULTI TAGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL property always acts to maintain an alarm once the alarm is activated, and not to modify the point at which the activation occurs. • The remainder of the properties are as described for the Alarms tab of flag tags. THE TRIGGERS TAB The Triggers tab of an integer variable or formula contains the following properties... • The Trigger Mode property is as described for the Alarm tabs.
CONFIGURING DATA TAGS EDITING MULTI TAGS THE DATA TAB (VARIABLES) The Data tab of a multi variable contains the following properties... • The Mapping property is used to specify if the variable is to be mapped to a register in a remote device, or if it exists only within the terminal. If you press the arrow button and select a device name from the resulting menu, you will be presented with a dialog box that will allow a PLC register to be selected.
EDITING MULTI TAGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL THE DATA TAB (ARRAYS) The Data tab of a multi array contains the following properties... All of these properties are as described for flag arrays. THE FORMAT TAB The Format tab of a multi tag contains the following properties... PAGE 70 • The Label Text property is used to specify the label that can be shown next to this tag when including the tag on a display page.
CONFIGURING DATA TAGS • EDITING MULTI TAGS The Navigation slider is used to step through the 512 states that can be defined for a particular tag. Moving the slider left and right will update the right-hand pane to show the selected states. The Export to File button can be used to export state names and values to a CSV file… The CSV file will contain a line for each defined state, stating the state label, the state value, and the text assigned to that state.
EDITING MULTI TAGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL THE COLORS TAB The Colors tab of a multi tag contains the following properties… • The various color pairs are used to specify how the tag should be displayed when it is each of the states specified on the Format tab. As with the Format tab, the Navigation slider can be used to up and down the list of color pairs when more than eight states have been defined.
CONFIGURING DATA TAGS • EDITING REAL TAGS The remainder of the properties are as described for the Alarms tab of flag tags. THE TRIGGERS TAB The Triggers tab of a multi variable or formula contains the following properties... • The Trigger Mode property is as described for the Alarm tabs. • The Delay property is as described for a flag tag’s Alarms tab. • The Action property is used to indicate what action should be performed when the trigger is activated.
EDITING STRING TAGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL THE DATA TAB (VARIABLES) The Data tab of a string variable contains the following properties... PAGE 74 • The Mapping property is used to specify if the variable is to be mapped to a register in a remote device, or if it exists only within the terminal. If you press the arrow button and select a device name from the resulting menu, you will be presented with a dialog box that will allow a PLC register to be selected.
CONFIGURING DATA TAGS EDITING STRING TAGS THE DATA TAB (FORMULAE) The Data tab of a string formula contains the following properties... • The Tag Value property is used to specify the value represented by this tag. It is typically set to a combination of other tags, linked together using math operators or functions. In the example above, the tag is set equal to the combination of two strings variables, separated by a space.
EDITING STRING TAGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL THE FORMAT TAB The Format tab of a string tag contains the following properties... • The Label Text property is used to specify the label that can be shown next to this tag when including the tag on a display page. The label differs from the tag name, in that the former can be translated for international applications, while the latter remains unchanged and is never shown to the user of the Gateway.
CONFIGURING DATA TAGS MORE THAN TWO ALARMS The parentheses, the space and the dash will all be included when the field is displayed, but only the 10 digits indicated by the ‘0’ characters will be stored in the string. Similarly, if data entry is enabled for a field using this template, the cursor will skip the various non-numeric positions when moving left or right, and will only allow numeric characters to be entered for those positions that can be selected.
EXPORTING TAG MAPPINGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL not need to push this button unless you have removed and then replaced tags, and wish to repair the expression that will have been broken when the tags were deleted. EXPORTING TAG MAPPINGS Selecting the Tags icon in the left-hand pane of the Tags window will also allow access to the tag import and export facilities.
CONFIGURING A VIRTUAL HMI CONTROLLING THE VIEW CONFIGURING A VIRTUAL HMI Now that you have configured your communications options, and created data tags for the various items that you wish to display, you can create display pages to allow the user to view or edit these data items. These pages are manipulated by selecting the User Interface icon from the main screen.
USING THE PAGE LIST VLINX FIELDBUS GATEWAY MANAGER USER MANUAL only mode. Editing of the screen however will not be available in this mode since the screen resolution is too small for accurate drawings. OTHER VIEW OPTIONS As well as controlling the zoom, the View menu contains the following options… • The Page List command can be used to show or hide the left-hand pane of the User Interface window. If the page list is disabled, even more space is made available for editing the display.
CONFIGURING A VIRTUAL HMI WORKING WITH THE GRID WORKING WITH THE GRID The Show Grid command on the View menu can be used to show or hide an eight-pixel grid that is useful for aligning objects. Every eighth column of the grid is shown in a brighter color, as is every sixth row. Various drawing operations may be configured so as to “snap” to the grid points whether or not the grid is shown,.
ADDING DISPLAY PRIMITIVES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SMART ALIGNMENT If you have the Smart Align features of the View menu enabled, Fieldbus Gateway Manager will provide you with guidelines to help align a new primitive with existing primitives, or with the center of the display. In the example shown above, the horizontal dotted line indicates that the center of the tank primitive is vertically aligned with the center of the display.
CONFIGURING A VIRTUAL HMI USING THE IMAGE LIBRARY mode, click the padlock icon again, or press the Escape key. The same operation can be performed by using the Lock Mode command on the Insert menu. USING THE IMAGE LIBRARY To add an image from Fieldbus Gateway Manager’s extensive image library, click on the “book” icon in the toolbar, or select the Picture / Image command from the Insert menu.
ALIGNING PRIMITIVES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL primitive will leave a copy of the primitive in its original position, thereby allowing duplicates to be created. You can also use the cursor keys to “nudge” the current selection a single pixel in the required direction. Holding down Ctrl while nudging will increase the movement of the primitives by a factor of eight. Primitives can be resized by selecting them, and then by dragging the appropriate handle to the required position.
CONFIGURING A VIRTUAL HMI REORDERING PRIMITIVES commands work on the currently selected primitives, and attempt to reallocate the free space between the items to achieve equal spacing. The two outer primitives will be left in their current positions. Note that the command may fail if an inappropriate set of primitives are selected, and may not achieve perfect spacing if the available space is too limited. REORDERING PRIMITIVES Primitives on a display page are stored in what is known as a z-order.
DEFINING COLORS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL when a Paste is performed, Fieldbus Gateway Manager will offset the newly-pasted item if it will exactly overlay an item of the same type. • The more detailed properties of a primitive can be edited by double-clicking the primitive, or by using the Properties command on the Edit menu. A dialog box will be displayed, allowing all of the primitives to be accessed. The properties associated with each primitive will be described below.
CONFIGURING A VIRTUAL HMI DEFINING FILL PATTERNS displayed in the “rainbow” will be capable of being rendered on the Gateway’s 256-color display. Fieldbus Gateway Manager will choose the nearest color within the abilities of the device. DEFINING FILL PATTERNS A fill pattern is defined as shown below… The Fill Style property is used to select the hatch or dotted pattern to be used, while the two color properties are used to define the colors to be used to form the pattern.
ACTION DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL virtual HMI facility: In order for remote access to be allowed, the Enable expression must evaluate to a non-zero value, and the Remote property must be set to Enabled. ACTION DESCRIPTIONS The sections below describe each available type of action. When each type is selected, the Action Details portion of the action dialog box will change to show the available options.
CONFIGURING A VIRTUAL HMI • ACTION DESCRIPTIONS VGA Displays: The popup cannot be larger than 296 pixels and higher than 224 pixels at the same time. One of the dimensions has to stay below the respective value. This means the maximum dimensions horizontally are 624 x 224 and vertically 296 x 464. Popup Menu: • QVGA Display: No limits • VGA Display: 296 pixels wide max. THE PUSH BUTTON ACTION This action is used to emulate a pushbutton.
ACTION DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL THE CHANGE INTEGER VALUE ACTION This action is used to write an integer value to a data item. The options are shown below… • The Write To property is used to define the data item to be changed. • The Data property is used to define the data to be written. In the example above, the primitive will set the MotorSpeed tag to 100. THE RAMP INTEGER VALUE ACTION This action is used to increase or decrease a data item.
CONFIGURING A VIRTUAL HMI USING DEFAULT SETTINGS In the example above, holding the primitive will raise MotorSpeed by 1 until it reaches 100. THE USER DEFINED ACTION This action is used to do anything else you desire! The options are shown below… • The On Pressed property is used to define the action to be performed when the primitive is pressed.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL THE LINE PRIMITIVE The Line primitive is a line drawn between two points. Its only properties are the style of line to be used. In addition to the solid colors shown on the line toolbox, a number of dotted styles can also be accessed via the properties dialog box. THE SIMPLE GEOMETRIC PRIMITIVES The Rectangle primitive is a rectangle with a defined outline and fill pattern.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS THE SIMPLE BAR PRIMITIVES The Simple Vertical Bar primitive allows an expression to be drawn as a vertical bar-graph between specified limits. Additional properties allow the primitive’s fill color and border style be defined. The Simple Horizontal Bar primitive allows an expression to be drawn as a horizontal bar-graph between specified limits. Additional properties allow the primitive’s fill color and border style be defined.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The properties are accessed by double-clicking the primitive… • The Value property is used to specify the first array element to be shown. • The Count property is used to specify the number of values to be shown. • The Minimum and Maximum properties are used to specify the scaling. • The Fill Format properties are used to define the fill color for the primitive.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The properties are split over five tabbed pages, one general, and one for each set/graph, and are accessed by double-clicking the primitive. The Properties tab defines the common features for all the graphs such as the background and outline color or if the primitive should be displayed or not using the Show Item field. Each graph is composed of the same proprietary set of properties. Data sources and scaling are defined directly on the graph tab.
PRIMITIVE DESCRIPTIONS • VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The X Axis Minimum and X Axis Maximum properties are used to specify the scaling for the horizontal axis, while the Y Axis Minimum and Y Axis Maximum properties are used to specify the scaling for the vertical axis. The Edit Graph Properties window accessed via the Edit button defines various formatting options.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS • The Data Points properties are used to define the pattern and colors used to create the data point markers. These properties will only be accessible if the chart has these data point markers enabled. • The Data Line properties are used to define the format and color of the line drawn between the data points. These properties will only be accessible if the chart has this line enabled.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL lowest number of major divisions is one, in which case large tick-mark will be drawn at the ends of the scale, but not along its length. This property is only available when the scale is fixed. • The Minor Divisions property is used to indicate into how many minor divisions each major division should be divided. Smaller tick-marks are drawn at each division. Selecting a value of one for this property will disable minor divisions.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS • The Text property is used to specify the text to be displayed. As mentioned above, the default language version of the text can also be edited directly on the display page when the primitive is created, or by clicking an existing primitive. • The Font property is used to specify the font to be used. The font list comprises the eight resident fonts found in all terminals, plus any custom fonts already created in this database.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL THE TAG TEXT PRIMITIVES The tag text primitives are used to display or edit an expression in textual form. Primarily, they are used to display tags, in which case the default format is taken from the Format tab associated with that tag in the Data Tags window. If a non-tag expression is entered—or if you want the formatting to differ from the default values for a tag—the format data can be overridden as required.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The first page is more-or-less the same for all five primitive types… REVISION 1 • The Value property is used to indicate from where the data for this primitive should be obtained. You may select a tag, a register in a communications device, or an expression that combines a number of such items. The data type of the item must be appropriate to the primitive in question eg.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL manually enter the data in the appropriate properties, or, assuming a suitable expression has been defined, you may instruct the primitive to get the required information from the underlying data tag. • The Flash on Alarm property is used to indicate whether or not you want the text on the Gateway’s display to flash if the tag entered in the value property is currently in an alarm state.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS various functions from the Function Reference or the data modification operators described in the Writing Actions section, or may run a program. • The On Entry Complete and On Entry Error properties are used respectively to define actions to be executed when data entry is completed successfully, or when an invalid value is entered.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL EDITING THE UNDERLYING TAG If you want to edit a tag text primitive’s properties, either double-click on the primitive, or right-click and select the Properties command from the resulting menu. If, however, you want to edit the properties of the tag that is being used to control the primitive, right-click and select the Tag Details command instead.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The first page is shown below… REVISION 1 • The Value property is used to indicate the time and date value to be displayed. If no value is entered, the current time and date is shown. If an expression is entered, it is taken to represent the number of seconds that have elapsed since 1st January 1997. Such values are typically obtained using the various time and date functions described in the Function Reference.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The second page contains data entry properties. These are as described for text tag primitives. The third page is shown below… PAGE 106 • The Label Text property is used to define an optional label for the primitive. • The Field Type property is used to indicate whether the field should display the time, the date or both. In the last case, this property also indicates in which order the two elements should be shown.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS THE RICH BAR PRIMITIVES The Rich Vertical Bar primitive allows you to display a more complex bar-graph which includes a label, a numeric version of the data being displayed, and tick markers to indicate any associated setpoint. The Rich Horizontal Bar primitive allows you to display a more complex bargraph which includes a label, a numeric version of the data being displayed, and tick markers to indicate any associated setpoint.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL • The Flash on Alarm property is used to indicate whether or not you want the text on the Gateway’s display to flash if the tag entered in the value property is currently in an alarm state. This property is not available for those primitives that have a non-tag value defined for the value property. • The Value Background property is used to indicate whether the value should be drawn with a solid or transparent background.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The third page contains the label and formatting information for the field... The properties shown are as described for an integer tag, and you are thus referred to the earlier section of the manual that refers to Data Tags for more information. Note that the existence of this primitive explains why one must enter minimum and maximum values for formulae, when such tags can never be the subject of data entry.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The first of these pages is shown below… PAGE 110 • The Value property is used to indicate from where the data for this primitive should be obtained. You may select a tag, a register in a communications device, or an expression that combines a number of such items. • The Data Entry property is used to indicate whether or not you want the user of the virtual HMI to be able to change the underlying value via this primitive.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The second page is used to control data entry, and functions are as for tag text primitives. You are thus referred to the earlier section for more information. The third page is used to define the optional label, and the minimum and maximum values, possibly by means of a complete data format. This page functions as was previously discussed for integer data tags, and you are referred to that section for further details.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL • The Show End Markers property is used to indicate whether to display a column that contains markers showing the beginning and end of the alarm list. If this column is omitted, the primitive will take less space, but it will be harder for the operator to determine the limits of the list. • The Show Alarm Time property is used to indicate whether or not the time at which the alarm occurred should be included in the primitive.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The third tab of the properties is used to control how the primitive’s buttons are labeled… • The Font property is used to select the required font. • The Enable Help property activates a Help button to be displayed on the primitive. This Help button can be used to provide the operator with information on specific alarms as explained in Using the Help button below.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL Up to eight pairs of colors may be assigned to tags with priorities 1 through 8. A priority value greater than 8 will use the setting for priority 8. USING THE HELP BUTTON The Alarm Viewer includes a Help button to provide context help on alarms. For example, when multiple alarms are active in the viewer, the operator can select one of the alarms and push the Help button to get more information or eventual solution for this alarm.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The first step is achieved using the system variable Data. This system variable is only available for the OnHelp field and contains information on the alarm selected. Data is a Long (Double word) and contains the following information: • Low word: the tag index this alarm is related to. • High word: the alarm number for this tag. (Remember, there are two alarms per tag. The second step is thus achieved by running a program with Data as argument.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The last step is then to write the program so the proper information is displayed depending on the alarm selected. The code sample below illustrates an example with 2 tags and different alarm numbers.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The properties of the alarm ticker are displayed on three tabbed pages. The first of these pages is shown below… • The Font property is used to select the font to be used to draw the primitive. A fixed-pitch font should ideally be used to ensure that the various data fields remain in the correct alignment. • The Ticker Colors properties are used to define the foreground and background colors used to display each alarm state.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL THE EVENT VIEWER PRIMITIVE The Event Viewer primitive is used to provide the operator with a method to view the events recorded in the system’s event log. As with the alarm viewer, it is sometimes placed on a popup page. The properties of this primitive are essentially the same as those for the alarm viewer. You are thus referred to the earlier section for more details.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS • The Sort Order property is used to choose whether files residing under the folder should be displayed or not and if the order is from the newest or the oldest file. The selection New File First will display the files from the newest to the oldest when moving through the folder with the primitive. The selection Old Files First will do the contrary.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The data logger primitive is configured via two property pages, shown below is the general properties page. PAGE 120 • The Data Log property is used to select the data log to be displayed. • The Sizing Mode property is used to indicate whether you wish to specify the number of data points to be displayed, or whether you want the software to display one data point for each horizontal pixel of the primitive.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The Pens page provides a way to change the color of the trace for each tag present in the data log. Select the tag to get the corresponding color. The color is changed via the drop down window. More colors are available at the end of the list. The trend viewer primitive is similar, but includes more pages.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL • The Data Log property is used to select the data log to be displayed. If you want the operator to be able to scroll backwards through historical data, be sure to enable the log’s history buffer. Refer to the Data Logging chapter for details. • The Viewer Width property is used to define the default amount of data to be shown when the primitive is first displayed.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS • The Major Data Gridlines property is used to indicate into how many major divisions the vertical axis of the viewer should be divided. A thick line will be drawn across the viewer for each division. Selecting a value of one for this property disables it. Note that each tag displayed is scaled according to its own format properties, and that different tags may thus have different scaling.
PRIMITIVE DESCRIPTIONS • VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The Style property is used to define the style of button to be displayed… STYLE DESCRIPTION Round A round button comprising two concentric circles. Flat Rectangle A rectangular button comprising two nested rectangles. 3D Rectangle A rectangular button drawn using 3D coloring effects. 3D Rectangle with Bevel A rectangular button with more pronounced 3D effects. Custom Images A button based upon two custom images.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS THE RICH BUTTON PRIMITIVE The Rich Button primitive displays an animated button that is used to control the state of a flag tag. While the same functionality can be achieved using a general button, the rich version automatically obtains data from the underlying tag. The properties of the rich button are defined using five tabs.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL • The Style property is as defined for general buttons. • The Layout property is used to define where the optional label and data values are to be placed relative to the button itself when custom images are used. The text fields are always placed within the button for the other button styles.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS Both primitives are configured using four tabbed pages, the first of which is shown below… REVISION 1 • The Value property is used to indicate from where the data for this primitive should be obtained. You may select a tag, a register in a communications device, or an expression that combines a number of such items. The data type of the item must be appropriate to the primitive in question eg.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The second tab contains additional formatting information… • The Fill Color 1 property is used to define the color of the rectangular portion of the selector that moves in order to indicate the tag state. The Fill Color 2 property is used to define the color of the rest of the primitive. • The Line Format property is used to define the color of the various lines that are used to draw the primitive.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The first tab is used to select the images to be displayed… REVISION 1 • The Image Count property is used to indicate how many different images should be displayed by this primitive. Up to ten different images can be shown. • The Image Selection property is a numeric value used to select between the various images if an Image Count of greater than one has been configured. A value of zero will display Image 0 and so on.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL If you use one of the Adjust buttons to manipulate an image, you will first be warned about the problems you will encounter if you then try to download a database containing manipulated images using earlier versions of the Windows operating systems.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The now-reduced image can be moved within the whole primitive by defining values to control its horizontal and vertical position. These values are defined together with minimum and maximum limits that specify the values corresponding to the extremes of the image’s movement within the primitive’s bounding rectangle… In this example, setting XPos to 0 will place the image at the left of the primitive, while setting it to 100 will place it at the far right.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The fourth tab of the primitive’s properties is used to control basic formatting… • The Fill Format properties are used to define the background pattern for the primitive. Note that if you want to animate the primitive in any way, you should specify some sort of background color so that the system can erase old images. • The Line Format properties are used to define the primitive’s outline style.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS THE CF IMAGE PRIMITIVE The CF Image primitive is only available via Insert > Picture > CF Image menu. This primitive is used to display images saved on the CompactFlash card thus saving internal memory on large databases. Images have to be converted before their transfer on the CompactFlash card using the makepic utility, the primitive is not made to display BMP or other image formats straight from the card.
PRIMITIVE DESCRIPTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The second tab of the primitive’s properties is used to define optional actions that can be triggered when the operator touches the image. You are referred to the earlier section on assigning actions to the primitives for more details of how to configure this functionality. CONVERTING IMAGES FOR THE COMPACTFLASH In order to prepare images for the CF Image primitive, the “makepic” utility is used.
CONFIGURING A VIRTUAL HMI PRIMITIVE DESCRIPTIONS The first of these pages is shown below… REVISION 1 • The Value property is used to define the value to be displayed. • The Show Label property is used to indicate whether a label should be included with the gauge. The label is displayed in the center of the primitive, above the optional value. If a tag is used for the value property, the label may be obtained from that tag. Otherwise, it must be entered on the Format tab of the dialog box.
PRIMITIVE DESCRIPTIONS • VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The Minor Divisions property is used to indicate into how many minor divisions each major division should be divided. Smaller tick-marks are drawn at each division. Selecting a value of one for this property will disable minor divisions.
CONFIGURING A VIRTUAL HMI DEFINING PAGE PROPERTIES DEFINING PAGE PROPERTIES Each page has a number of properties that can be accessed via the Page menu… REVISION 1 • The Entry Order property is used to define how the cursor on the Fieldbus Gateway will move between data entry fields. The setting determines whether fields organized in a grid will be entered in row or column order.
DEFINING SYSTEM ACTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL in many cases, actions that you may think need to be run on each update can be performed using triggers, or by using mapping blocks. • The Parent Page property is used to indicate the page to be displayed when the Gateway’s Exit key is pressed while this page is active. Selection of this page can be overridden using the techniques below.
CONFIGURING A VIRTUAL HMI ADDITIONAL SYSTEM PROPERTIES • The One Touch Data Entry property defines whether or not the keypad should pop up after one touch or two touches on a data entry field. Selecting No requires two touches to allow data entry. • The Keypad Next/Prev Keys property defines whether or not the system keypad popups for data entry should include the Next and Prev keys.
SELECTING LANGUAGES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL that have been imported into the project. By default, the filename alone of the image is stored, thereby requiring you to have the images available on disk whenever you are working on the project. If you wish to create a single file that contains all the required data for the project, enable this option. Note that databases that contain image files will typically be very large, and may prevent upload support from working.
CONFIGURING A VIRTUAL HMI CHANGING THE LANGUAGE CHANGING THE LANGUAGE To configure a key or primitive to change the language displayed by the Fieldbus Gateway, select User Defined mode and enter SetLanguage(n) as the On Pressed property, where n is a number between 1 and 8, according to the language to be displayed.
BLOCKING DEFAULT ACTIONS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL You will note that this dialog box is similar to that shown earlier in respect of primitives, but that it has two tabbed pages. The first page is used to define what will happen when the key in question is pressed when the current page is selected. The second page is used to define what will happen if the key is pressed when any page is selected.
CONFIGURING PROGRAMS USING THE PROGRAM LIST the action will not be performed, and a “TIMEOUT” message will be displayed for the operator. This timeout mechanism is required to avoid problems should a communications link become severed. CONFIGURING PROGRAMS The previous sections of this manual describe how you can use actions to perform all manner of operations in response to key presses or changes in data tags.
PROGRAM PROPERTIES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL to the approximate position of the error. If no errors exist, a dialog box will be displayed to confirm this fact, and the program will be translated into Fieldbus Gateway Manager’s internal format for subsequent execution by the Fieldbus Gateway.
CONFIGURING PROGRAMS MODE ADDING COMMENTS BEHAVIOR referenced by the program. Read When Executed External data used within the program will be read only when the program is invoked. The program will wait for the period defined in the timeout property for such data to be available. If the data cannot be read—perhaps because a device is offline—the program will not execute.
RETURNING VALUES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL RETURNING VALUES As mentioned above, programs can return values. Such programs can be invoked by other programs or by expressions anywhere in the database.
CONFIGURING PROGRAMS PROGRAMMING TIPS PROGRAMMING TIPS The sections below provide an overview of the programming constructions supported by Fieldbus Gateway Manager. The basic syntax used is that of the C programming language. Note that the aim is not to try and teach you to become a programmer, or to master the subtleties of the C language. Such topics are beyond the scope of this manual.
PROGRAMMING TIPS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The example below shows an if statement with two actions… if( TankEmpty ) { StartPump := 0; OpenValue := 1; } The example below shows an if statement with an else clause… if( MotorHot ) StartFan := 1; else StartFan := 0; Note that it is very important to remember to place the curly-brackets around groups of actions to be executed in the if or else portion of the statement.
CONFIGURING PROGRAMS PROGRAMMING TIPS This example below will start a motor selected by the value in the MotorIndex tag... switch( MotorIndex ) { case 1: MotorA break; case 2: case 3: MotorB break; case 4: MotorC break; default: MotorD break; } := 1; := 1; := 1; := 1; A value of 1 will start motor A, a value of 2 or 3 will start motor B, and a value of 4 will start motor C. Any value which is not explicitly listed will start motor D.
PROGRAMMING TIPS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL the do loop tests the condition afterwards. The for loop is a quicker way of defining a while loop, allowing you to combine three common elements into one statement. You should note that some care is required when using loops within your programs, as you may make a programming error which results in a loop that never terminates.
CONFIGURING PROGRAMS PROGRAMMING TIPS THE FOR LOOP You will notice that the while loop shown above has four elements… 1. The initialization of the loop control variable. 2. The evaluation of a test to see if the loop should continue. 3. The execution of the action to be performed by the loop. 4. The making of a change to the control variable. The for loop allows elements 1, 2 and 4 to be combined within a single statement, such that the action following the statement need only implement element 3.
PROGRAMMING TIPS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The example below shows the example from above, rewritten to use a do loop… int i:=0, t:=0; do { t += Data[i]; } while( ++i < 10 ); return t; LOOP CONTROL Two additional statements can be used within loops. The break statement can be used to terminate the loop early, while the continue statement can be used to skip the balance of the loop body and begin another iteration without executing any further code.
CONFIGURING DATA LOGGING BATCH LOGGING CONFIGURING DATA LOGGING Now that you have configured the core of your application, you may decide to make use of Fieldbus Gateway Manager’s data logger to record certain tag values to CompactFlash. Data recorded in this way is stored in industry-standard comma-separated variable (CSV) files, and can easily be imported into applications such as Excel using a variety of methods.
CREATING DATA LOGS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The figure above shows the result on the CompactFlash card for normal logging and batch logging. In this example, two batches were created, one called WATERA and one WATERB. Each folder contains a LOG1 folder which in turn contains log files with data only recorded while each respective batch was running. The data logger created continuous log files under LOGS\LOG1.
CONFIGURING DATA LOGGING DATA LOG PROPERTIES DATA LOG PROPERTIES Each data log has the following properties… REVISION 1 • The Update Type property defines if this data log will record data continuously or on a trigger edge. Continuous Sample data logging saves tags values at regular time intervals, as define by the Update Rate property. Triggered Snapshot saves tags values when the expression in the Log Trigger property goes from false to true.
LOG FILE STORAGE VLINX FIELDBUS GATEWAY MANAGER USER MANUAL • The History Buffer property is used to indicate how much RAM should be allocated for the history buffer for this data logger. The history buffer is used to support the historical trending user interface primitive, and allows the user to scroll backwards to view older data than would otherwise be available. No more than a total of 256K should be allocated to all data logs.
CONFIGURING DATA LOGGING THE LOGGING PROCESS THE LOGGING PROCESS Fieldbus Gateway Manager’s data logger operates using two separate processes. The first samples each data point at the rate specified in its properties, and places the logged data into a buffer within the RAM of the Fieldbus Gateway. The second process executes every two minutes, and writes the data from RAM to the CompactFlash card.
USING WEBSYNC VLINX FIELDBUS GATEWAY MANAGER USER MANUAL using this method, as earlier versions of Windows may otherwise lock the CompactFlash card and disrupt data logging. • The preferred method is to use the web server as described in the next chapter.
CONFIGURING DATA LOGGING USING WEBSYNC EXAMPLE USAGE As an example, the following command line… websync –poll 10 –path C:\Logs 192.9.200.52 …will read the log files for all data logs on the terminal with the IP address of 192.9.200.52, and will store these logs under subdirectories of the C:\Logs directory. WebSync will continue to execute, and will repeat the polling process every ten minutes.
CONFIGURING THE WEB SERVER WEB SERVER PROPERTIES CONFIGURING THE WEB SERVER Fieldbus Gateway Manager’s web server can be used to expose various data via the Fieldbus Gateway’s Ethernet port, allowing remote access to diagnostic information, or to the values recorded by the Data Logger. The web server is configured by selecting the Web Server icon from the main screen.
WEB SERVER PROPERTIES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL • The Remote Control property is used to enable or disable an option by which the remote viewing facility is extended to allow a web browser to be used to simulate the pressing of keys on the Fieldbus Gateway, thereby allowing remote control of the Gateway or the machine it controls. While this feature is extremely useful, care must be taken to use the various security parameters to avoid unauthorized tampering with a machine.
CONFIGURING THE WEB SERVER • ADDING WEB PAGES The Authentication properties are used to restrict access to any user connecting onto the web server when Authenticated Users is selected. Upon connection, the user will be required to enter the Username and Password defined under Logon Username (Max 31 characters) and Logon Password (Max 15 characters). Both are case sensitive.
USING A CUSTOM WEB SITE VLINX FIELDBUS GATEWAY MANAGER USER MANUAL available within the database. Tags can be added to the page by double-clicking them in the right-hand list; they can be removed by double-clicking them in the left-hand list, or by pressing the Del key while the tag is selected. The Up and Down buttons can be used to move tags within the list.
CONFIGURING THE WEB SERVER ACCESSING THE WEB SERVER are using an operating system earlier than Windows 2000 to perform such an operation, you may find that your PC locks the card when the drive is first mounted, whether or not a write is performed. Again, this lock will be released within a minute or so. ACCESSING THE WEB SERVER The web server can be accessed by multiple means depending on your application. USING ETHERNET The principal and easiest way to access the web server is via Ethernet.
WEB SERVER SAMPLES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL In case the TCP port defined in the Web Server module is different from 80, the IP address entered in the web browser has to be followed by a colon (:) and the port required. For example: http://192.168.100.0:81.
CONFIGURING THE WEB SERVER WEB SERVER SAMPLES The picture below shows the data log menu… The picture below shows the contents of a given data log… The picture below shows the contents of a given log file… REVISION 1 PAGE 167
WEB SERVER SAMPLES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The picture below shows a custom page containing three tags… The picture below shows the custom page being created within FrontPage… PAGE 168
USING THE SECURITY SYSTEM SECURITY BASICS USING THE SECURITY SYSTEM Fieldbus Gateway Manager contains powerful features to allow you to define which operators have access to which display pages, and limit those operators who are able to make changes to sensitive data. The software also contains a security logging facility that can be used to record changes to data values indicating when the change occurred, and by whom it was performed.
SECURITY BASICS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL USER RIGHTS Each user is granted zero or more access rights. A user with no rights can access those objects that merely require the identity of the user to be recorded, whereas users with more rights can access those objects that demand those rights to be present.
USING THE SECURITY SYSTEM SECURITY SETTINGS DEFAULT ACCESS To speed the configuration process, Fieldbus Gateway Manager also provides the ability to specify default access and write logging parameters for mapped tags, internal tags and display pages. The differentiation between mapped and unmapped tags is important in systems where all changes to external data must be recorded, but where data internal to Fieldbus Gateway Manager can be manipulated without the need for such an audit trail.
CREATING USERS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL value for this setting will produce an insecure system, while too low a value will produce a system that is awkward for operators. • The Clear Logon Name property is used to indicate whether or not the username should be cleared before asking the operator to logon. If this setting is disabled, the previous username will be displayed, and only the password will need to be re-entered.
USING THE SECURITY SYSTEM SPECIFYING TAG SECURITY • The Password property is used to specify an initial password for this user. The password is case-sensitive and comprises alphanumeric characters. Note that if the Override Existing box is checked, any changes made to this password from the Fieldbus Gateway itself will be overridden when this database is downloaded to the Gateway. • The System Rights properties are used to grant a user the ability to perform certain system actions.
DATA VALUES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL WRITING EXPRESSIONS You will recall from the earlier sections of this manual that many fields within Fieldbus Gateway Manager are configured as what are called expression properties.
WRITING EXPRESSIONS DATA VALUES The ‘U’ and ‘L’ suffixes supported by earlier versions of software are not used. CHARACTER CONSTANTS Character constants represent a single ASCII character, encoded in the lower 8 bits of a 32-bit signed number. A character constant comprises a single character enclosed in single quotation marks, such that 'A' can be used to represent a value of 65.
SIMPLE MATH VLINX FIELDBUS GATEWAY MANAGER USER MANUAL TAG VALUES The value of a tag is represented in an expression by the tag name. Upper-case and lower-case characters are considered equivalent when finding the required tag. Also, once an expression has been entered, any changes to the name of the tag will modify all of the expressions that make reference to it, so there is no need to re-edit the expressions to “fix” the name.
WRITING EXPRESSIONS TYPE CONVERSION TYPE CONVERSION Normally, Fieldbus Gateway Manager will automatically decide when to switch from evaluating an expression in integer math to evaluating it using floating-point. For example, if you divide an integer value by a floating-point value, the integer will be converted to floating-point before the division is carried out. However, there will be some situations where you want to force a conversion to take place.
TESTING BITS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL TESTING BITS Fieldbus Gateway Manager allows you to test the value of a bit within a data value by using the bit selection operator, which is represented by a single period. The left-hand side of the operator should be the value in which the bit is to be tested, and the right-hand side should be an expression indicating the bit number to test. This right-hand value should be between 0 and 31.
WRITING EXPRESSIONS CHOOSING VALUES CHOOSING VALUES You may find situations where you want to select between two values—be they integers, floating-point values or strings—depending on the value of some condition. For example, you may wish to set a motor’s speed equal to 500 rpm or 2000 rpm based on a flag tag.
INDEXING ARRAYS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL Each example shifts Data two bits in the specified direction. BITWISE NOT Finally, Fieldbus Gateway Manager provides a bitwise NOT operator to invert the sense of the bits in a value… OPERATOR PRIORITY EXAMPLE Bitwise NOT Group 2 ~Mask This example produces a value where every bit is equal to the opposite of its value in Mask.
WRITING EXPRESSIONS PRIORITY SUMMARY PRIORITY SUMMARY The table below shows the priority of all the operators defined in this section… GROUP OPERATORS Group 1 . Group 2 ! ~ Group 3 * / % Group 4 + - Group 5 << >> Group 6 < > <= >= Group 7 == != Group 8 & Group 9 | Group 10 ^ Group 11 && Group 12 || Group 13 ?: Operators in the lower-numbered groups are applied first.
WRITING ACTIONS CHANGING PAGE WRITING ACTIONS While expressions are used to define values, actions are used to define what you want to happen when a trigger or other event occurs. Since the vast majority of the actions in a database will relate to key-presses, and since Fieldbus Gateway Manager provides a simple method of defining commonly-used actions via the dialog box discussed in the User Interface section, you will often be able to avoid writing actions “by hand”.
RUNNING PROGRAMS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL such that an example such as Data.1:=(Level>10) can be used to set or clear a bit depending on whether or not a tank level exceeds a preset value. RUNNING PROGRAMS Programs may be invoked within actions by following the program name with a pair of parentheses. For example, Program1() will invoke the associated program. The program will execute in the foreground or background as defined by the program’s properties.
USING RAW PORTS CONFIGURING A SERIAL PORT USING RAW PORTS In order to allow customers to implement simple ASCII protocols without having to ask B&B Electronics to develop custom drivers, Fieldbus Gateway Manager provides a new facility whereby the software’s programming language can be used to directly control either serial ports or TCP/IP network sockets.
READING CHARACTERS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL The On Update property is configured as described above, while the Port property should be configured to indicate which TCP port you want the driver to monitor. The driver will accept connections on this port, and then call the On Update program to handle communications. READING CHARACTERS To read data from a raw port a character at a time, use the PortRead function, as documented in the Function Reference section of this manual.
USING RAW PORTS SENDING DATA The example above listens on a TCP/IP socket for a frame that starts with an asterisk and ends with a carriage return. It then converts the frame to a decimal value, stores this in an integer tag, and echoes the value back to the client. SENDING DATA To send data on a raw port, use the PortWrite or PortPrint functions, as documented in the Function Reference section of this manual. The first function sends a single byte, while the second function sends an entire string.
SYSTEM VARIABLE REFERENCE HOW ARE SYSTEM VARIABLES USED SYSTEM VARIABLE REFERENCE The following pages describe the various system variables that exist within Fieldbus Gateway Manager. These system variables can be invoked within actions or expressions as described in the previous two chapters. HOW ARE SYSTEM VARIABLES USED System variables are used either to reflect the state of the system, or to modify the behavior of the system in some way.
ACTIVEALARMS ACTIVEALARMS DESCRIPTION Returns a count of the currently active alarms. VARIABLE TYPE integer. ACCESS TYPE Read-Only.
SYSTEM VARIABLE REFERENCE COMMSERROR COMMSERROR DESCRIPTION Returns a bit-mask indicating whether or not each communications device is offline. A value of 1 in a given bit position indicates that the corresponding device is experiencing comms errors. Bit 0 (ie. the bit with a value of 1) corresponds to the first communication device. VARIABLE TYPE integer. ACCESS TYPE Read-Only.
DISPBRIGHTNESS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL DISPBRIGHTNESS DESCRIPTION Returns a number indicating the brightness of the display from 0 to 100, with zero being off. VARIABLE TYPE integer. ACCESS TYPE Read / Write.
SYSTEM VARIABLE REFERENCE DISPCONTRAST DISPCONTRAST DESCRIPTION Returns a number indicating the amount of display contrast from 0 to 100. VARIABLE TYPE integer. ACCESS TYPE Read / Write.
DISPCOUNT VLINX FIELDBUS GATEWAY MANAGER USER MANUAL DISPCOUNT DESCRIPTION Returns a number indicating the number of display updates since last reset. VARIABLE TYPE integer. ACCESS TYPE Read-Only.
SYSTEM VARIABLE REFERENCE DISPUPDATES DISPUPDATES DESCRIPTION Returns a number indicating how fast the display updates. VARIABLE TYPE integer. ACCESS TYPE Read-Only.
ISSIRENON VLINX FIELDBUS GATEWAY MANAGER USER MANUAL ISSIRENON DESCRIPTION Returns true if the Gateway’s sounder is on or false otherwise. VARIABLE TYPE integer. ACCESS TYPE Read-Only.
SYSTEM VARIABLE REFERENCE PI PI DESCRIPTION Returns pi as a floating-point number. VARIABLE TYPE Floating point. ACCESS TYPE Read-Only.
TIMEZONE VLINX FIELDBUS GATEWAY MANAGER USER MANUAL TIMEZONE DESCRIPTION Returns the Time Zone in hours from –12 to +12. Using the Link Send Time command in Fieldbus Gateway Manager will set the unit time and time zone to the computer’s values. Changing the Time Zone afterwards will increment or decrement the unit time. Note: TimeZone can only be viewed or changed if the Time Manager is enabled. VARIABLE TYPE integer. ACCESS TYPE Read / Write.
SYSTEM VARIABLE REFERENCE TIMEZONEMINS TIMEZONEMINS DESCRIPTION Returns the Time Zone in minutes from –720 to +720. Using the Link Send Time command in Fieldbus Gateway Manager will set the unit time and time zone to the computer’s values. Changing the Time Zone afterwards will increment or decrement the unit time. Note: TimeZoneMins can only be viewed or changed if the Time Manager is enabled. VARIABLE TYPE integer. ACCESS TYPE Read / Write.
USEDST VLINX FIELDBUS GATEWAY MANAGER USER MANUAL USEDST DESCRIPTION Returns the unit daylight saving time state. This variable will add an hour to the unit time if set to true. Note: UseDST can only be viewed or changed if the Time Manager is enabled. VARIABLE TYPE flag. ACCESS TYPE Read / Write.
PROGRAMMING REFERENCE EXPRESSION OPERATORS PROGRAMMING REFERENCE This section is a summary of all the commands used for programming. EXPRESSION OPERATORS For more information on the following operators, refer to the Writing Expression Section of this manual.
ACTION OPERATORS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL OPERATOR PRIORITY EXAMPLE Less Than Group 6 Data < Less Than or Equal To Group 6 Logical AND Group 11 Logical OR Group 12 Logical NOT Group 2 Selection Group 13 Fast ? 2000 : 500 OPERATOR PRIORITY EXAMPLE Grouping Operator Group 1 2*(Tag1+Tag2) Array Access Group 1 Array[4] Bit Selection Group 1 Input.
PROGRAMMING REFERENCE PROGRAMMING STATEMENTS MANIPULATING BIT OPERATOR PRIORITY EXAMPLE Bitwise AND Group 8 Data & Mask Bitwise OR Group 9 Data | Mask Bitwise XOR Group 10 Data ^ Mask Shift Left Group 5 Data << 2 Shift Right Group 5 Data >> 2 Bitwise NOT Group 2 ~Mask PROGRAMMING STATEMENTS LOCAL VARIABLES IN PROGRAMS int a; float b; cstring c; // Declare local integer ‘a’ // Declare local real ‘b’ // Declare local string ‘c’ IF STATEMENT if( condition ){ action1; } else{ action2; }
PROGRAMMING STATEMENTS VLINX FIELDBUS GATEWAY MANAGER USER MANUAL WHILE LOOP while ( condition ){ Action; } FOR LOOP for ( initialization; condition; control ){ action1; } DO LOOP do { action1; } while ( condition ); LOOP CONTROL COMMAND DESCRIPTION Break; Will cause a loop to break if called. PRIORITY SUMMARY GROUP OPERATORS Group 1 .
FUNCTION REFERENCE PROGRAMMING STATEMENTS FUNCTION REFERENCE The following pages describe the various standard functions that provided by Fieldbus Gateway Manager. These functions can be invoked within programs, actions or expressions as described in the previous chapters. Functions that are marked as active may not be used in expressions that are not allowed to change values eg. in the controlling expression of a display primitive. Functions that are marked as passive may be used in any context.
ABS(VALUE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL ABS(VALUE ) ARGUMENT TYPE DESCRIPTION value int / float The value to be processed. DESCRIPTION Returns the absolute value of the argument. In other words, if value is a positive value, that value will be returned; if value is a negative value, a value of the same magnitude but with the opposite sign will be returned. FUNCTION TYPE This function is passive. RETURN TYPE int or float, depending on the type of the value argument.
FUNCTION REFERENCE ACOS(VALUE) ACOS(VALUE ) ARGUMENT TYPE DESCRIPTION value float The value to be processed. DESCRIPTION Returns the angle theta in radians such that cos(theta) is equal to value. FUNCTION TYPE This function is passive. RETURN TYPE float. EXAMPLE theta := acos(1.
ALARMACCEPTALL() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL ALARMACCEPTALL() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Accepts all active alarms. FUNCTION TYPE This function is passive. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE ASIN(VALUE) ASIN(VALUE ) ARGUMENT TYPE DESCRIPTION value float The value to be processed. DESCRIPTION Returns the angle theta in radians such that sin(theta) is equal to value. FUNCTION TYPE This function is passive. RETURN TYPE float. EXAMPLE theta := asin(1.
ATAN(VALUE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL ATAN(VALUE ) ARGUMENT TYPE DESCRIPTION value float The value to be processed. DESCRIPTION Returns the angle theta in radians such that tan(theta) is equal to value. FUNCTION TYPE This function is passive. RETURN TYPE float. EXAMPLE theta := atan(1.
FUNCTION REFERENCE ATAN2(A, B) ATAN2(A , B ) ARGUMENT TYPE DESCRIPTION a float The value of the side that is opposite the angle theta. b float The value of the side that is adjacent to the angle theta DESCRIPTION This function is equivalent to atan(a/b), except that it also considers the sign of a and b, and thereby ensures that the return value is in the appropriate quadrant.
BEEP(FREQ, PERIOD) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL BEEP(FREQ , P ERI OD ) ARGUMENT TYPE DESCRIPTION freq int The required frequency in semitones. period int The required period in milliseconds. DESCRIPTION Sounds the terminal’s beeper for the indicated period at the indicated pitch. Passing a value of zero for period will turn off the beeper. Beep requests are not queued, so calling the function will immediately override any previous calls.
FUNCTION REFERENCE CLEAREVENTS() CLEAREVENTS() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Clears the list of events displayed in the event log. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
CLOSEFILE(FILE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL CLOSEFILE(FI LE ) ARGUMENT TYPE DESCRIPTION file int File handle as returned by OpenFile. DESCRIPTION Closes a file previously opened in a call to FileOpen(). FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE COMMITANDRESET() COMMITANDRESET() ARGUMENT TYPE DESCRIPTION none DESCRIPTION This function will force all retentive tags to be written on the internal flash memory and then will reset the unit. NOTE: THIS FUNCTION SHOULD IN NO CASE BE CALLED ON A REGULAR BASIS, AS FREQUENT WRITING TO THE FLASH MEMORY WILL END UP IN A FAILURE. THIS FUNCTION IS TO BE USED IN COMBINATION WITH SetPortConfig() AND SetNetConfig() SO NEW PARAMETERS ARE SAVED AND SHOULD ONLY BE CALLED ONCE.
COMPACTFLASHEJECT() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL COMPACTFLASHEJECT() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Ceases all access of the CompactFlash card, allowing safe removal of the card. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE COMPACTFLASHSTATUS() COMPACTFLASHSTATUS() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Returns the current status of the CompactFlash slot as an integer. VALUE STATE 0 Empty DESCRIPTION Either no card is installed or the card has been ejected via a call to the CompactFlashEject function. 1 Invalid The card is damaged, incorrectly formatted or not formatted at all. Remember only FAT16 is supported. 2 Checking The Gateway is checking the status of the card.
CONTROLDEVICE(DEVICE, ENABLE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL CONTROLDEVICE(DEVI CE , ENABLE ) ARGUMENT TYPE DESCRIPTION device int Device to be enabled or disabled. enable int Determines if device is enabled or disabled. DESCRIPTION Allows the database to disable or enable a specified communications device. The number to be placed in the device argument to identify the device can be viewed in the status bar of the Communications category when the device name is highlighted.
FUNCTION REFERENCE COPY(DEST, SRC, COUNT) COPY(DEST, SRC , COUN T) ARGUMENT TYPE DESCRIPTION dest int / float The first array element to be copied to. src int / float The first array element to be copied from. count int The number of elements to be processed. DESCRIPTION Copies count array elements from src onwards to dest onwards. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
COS(THETA) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL COS(THETA ) ARGUMENT TYPE DESCRIPTION theta float The angle, in radians, to be processed. DESCRIPTION Returns the cosine of the angle theta. FUNCTION TYPE This function is passive. RETURN TYPE float.
FUNCTION REFERENCE CREATEDIRECTORY(NAME) CREATEDIRECTORY(NAM E ) ARGUMENT TYPE DESCRIPTION name cstring The directory to be created. DESCRIPTION Creates a new directory on the CompactFlash card. Note that the filing system used on the card does not support long filenames, and that if backslashes are included in the pathname to separate path elements, they must be doubled-up per Fieldbus Gateway Manager’s rules for string constants as described in the chapter on Writing Expressions.
CREATEFILE(NAME) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL CREATEFILE(NAM E ) ARGUMENT TYPE DESCRIPTION name cstring The file to be created. DESCRIPTION Creates an empty file on CompactFlash. Note that the filing system used on the card does not support long filenames, and that if backslashes are included in the pathname to separate path elements, they must be doubled-up per Fieldbus Gateway Manager’s rules for string constants as described in the chapter on Writing Expressions.
FUNCTION REFERENCE DATATOTEXT(DATA, LIMIT) DATATOTEXT(DATA , LI M I T) ARGUMENT TYPE DESCRIPTION data int The first element in an array. limit int The number of characters to process. DESCRIPTION Forms a string from an array (4 characters per array elelment) until either the limit is reached, or a null character is detected. FUNCTION TYPE This function is passive. RETURN TYPE cstring.
DATE(Y, M, D) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL DATE(Y , M , D ) ARGUMENT TYPE DESCRIPTION y int The year to be encoded, in four-digit form. m int The month to be encoded, from 1 to 12. d int The date to be encoded, from 1 upwards. DESCRIPTION Returns a value representing the indicated date as the number of seconds elapsed since the datum point of 1st January 1997. This value can then be used with other time/date functions. FUNCTION TYPE This function is passive. RETURN TYPE int.
FUNCTION REFERENCE DECTOTEXT(DATA, SIGNED, BEFORE, AFTER, LEADING, GROUP) DECTOTEXT(DATA , SI GNED , BEFORE , AFTER , LEADI NG , GROUP ) ARGUMENT TYPE DESCRIPTION data int/float Numeric data to be formatted. signed int 0 – unsigned, 1 – soft sign, 2 – hard sign. before int Number of digits to the left of the decimal point. after int Number of digits to the right of the decimal point. leading int 0 – no leading zeros, 1 – leading zeros.
DEG2RAD(THETA) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL DEG2RAD(THETA ) ARGUMENT TYPE DESCRIPTION theta float The angle to be processed. DESCRIPTION Returns theta converted from degrees to radians. FUNCTION TYPE This function is passive. RETURN TYPE float.
FUNCTION REFERENCE DELETEDIRECTORY(NAME) DELETEDIRECTORY(NAM E ) ARGUMENT TYPE DESCRIPTION name cstring The directory to be deleted. DESCRIPTION Remove a directory, its subdirectories and contents from the CompactFlash.
DELETEFILE(FILE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL DELETEFILE(FI LE ) ARGUMENT TYPE DESCRIPTION file int File handle as returned by OpenFile. DESCRIPTION Closes and then deletes a file located on the CompactFlash card. FUNCTION TYPE This function is active. RETURN TYPE int.
FUNCTION REFERENCE DEVCTRL(DEVICE, FUNCTION, DATA) DEVCTRL(DEVI CE , FUNCTI ON , DATA ) ARGUMENT TYPE DESCRIPTION device int The index of the device to be controlled. function int The required function to be executed. data cstring Any parameter for the function. DESCRIPTION This function is used to perform a special operation on a communications device.
DISABLEDEVICE(DEVICE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL DISABLEDEVICE(DEVI CE ) ARGUMENT TYPE DESCRIPTION device int The device to be disabled. DESCRIPTION Disables communications for the specified device. The number to be placed in the device argument to identify the device can be viewed in the status bar of the Communications category when the device name is highlighted. FUNCTION TYPE The function is passive. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE DISPOFF() DISPOFF() ARGUMENT TYPE DESCRIPTION none float Turns backlight to display off. DESCRIPTION Turns backlight to display off. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
DISPON() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL DISPON() ARGUMENT TYPE none DESCRIPTION Turns backlight to display on.. DESCRIPTION Turns backlight to display on. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE DRVCTRL(PORT, FUNCTION, DATA OR VALUE???) DRVCTRL(P OR T, FUNCTI ON , DATA OR VALUE ??? ) ARGUMENT TYPE DESCRIPTION port int The index of the driver to be controlled. function int The required function to be executed. data cstring Any parameter for the function. DESCRIPTION This function is used to perform a special operation on a communications driver. The number to be placed in the port argument to identify the driver is the port number to which the driver is bound.
EMPTYWRITEQUEUE (DEV) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL EMPTYWRITEQUEUE (DEV ) ARGUMENT TYPE DESCRIPTION dev int The device number DESCRIPTION Empties the writing queue for the device identified with the argument dev. This will remove any pendant writes to the device from the queue, therefore the removed information will not be transferred to the device. Note: The device number can be identified in Fieldbus Gateway Manager’s status bar when a device is selected in Communication.
FUNCTION REFERENCE ENABLEDEVICE(DEVICE) ENABLEDEVICE(DEVI CE ) ARGUMENT TYPE DESCRIPTION device int The device to be enabled. DESCRIPTION Enables communications for the specified device. The number to be placed in the device argument to identify the device can be viewed in the status bar of the Communications category when the device name is highlighted. FUNCTION TYPE This function is passive. RETURN TYPE This function does not return a value.
ENDBATCH() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL ENDBATCH() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Stops the current batch. Note: Starting a new batch within less than 10 seconds of ending or starting the last one will produce undefined behavior. To go straight from one batch to another, call NewBatch() without an intervening call to EndBatch(). FUNCTION TYPE This function is passive. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE EXP(VALUE) EXP(VALUE ) ARGUMENT TYPE DESCRIPTION value float The value to be processed. DESCRIPTION Returns e (2.7183) raised to the power of value. FUNCTION TYPE This function is passive. RETURN TYPE float. EXAMPLE Variable2 := exp(1.
EXP10(VALUE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL EXP10(VALUE ) ARGUMENT TYPE DESCRIPTION value float The value to be processed. DESCRIPTION Returns 10 raised to the power of value. FUNCTION TYPE This function is passive. RETURN TYPE float. EXAMPLE Variable4 := exp10(0.
FUNCTION REFERENCE FILL(ELEMENT, DATA, COUNT) FILL(ELEM ENT, DATA , COUNT) ARGUMENT TYPE DESCRIPTION element int / float The first array element to be processed. data int / float The data value to be written. count int The number of elements to be processed. DESCRIPTION Sets count array elements from element onwards to be equal to data. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FIND(STRING,CHAR,SKIP) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL FIND(STRI NG ,CHAR ,SK I P ) ARGUMENT TYPE DESCRIPTION string cstring The string to be processed. char int The character to be found. skip int The number of times the character is skipped. DESCRIPTION Returns the position of char in string, taking into account the number of skip occurrences specified. The first position counted is 0. Returns -1 if char is not found.
FUNCTION REFERENCE FINDFILEFIRST(DIR) FINDFILEFIRST(DI R ) ARGUMENT TYPE DESCRIPTION dir cstring Directory to be used in search. DESCRIPTION Returns the filename of name of the first file or directory located in the dir directory on the CompactFlash card. Returns an empty string if no files exist or if no card is present. This function can be used with the FindFileNext function to scan all files in a given directory. FUNCTION TYPE This function is active. RETURN TYPE cstring.
FINDFILENEXT() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL FINDFILENEXT() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Returns the filename of the next file or directory in the directory specified in a previous call to the FindFileFirst function. Returns and empty string if no more files exist. This function can be used with the FindFileFirst function to scan all files in a given directory. FUNCTION TYPE This function is active. RETURN TYPE cstring.
FUNCTION REFERENCE FINDTAGINDEX(LABEL) FINDTAGINDEX(LABEL ) ARGUMENT TYPE DESCRIPTION label cstring Tag label (not tag name or mnemonic) DESCRIPTION Returns the index number of the tag specified by label. FUNCTION TYPE This function is active. RETURN TYPE int. EXAMPLE Index = FindTagIndex(“Power”) Returns the index number for the tag with label Power.
FORCE(TAG, VALUE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL FORCE(TAG, VALUE) ARGUMENT TYPE DESCRIPTION Tag int/float Tag which will be forced Value int/float Value to be written to the Tag DESCRIPTION Sets tag to value, removing any existing entries for tag from the write queue and performing the write whether or not the operation results in a change to the value of tag.
FUNCTION REFERENCE FORCECOPY(DEST, SRC, COUNT) FORCECOPY(DEST, SRC, COUNT) ARGUMENT TYPE DESCRIPTION dest int/float The first array element to be copied to src int/float The first array element to be copied from count int The number of element to be processed DESCRIPTION Copies count elements from array element src to array element dest. See Force(tag, value) for a description of forced assignment, and why it can be useful. FUNCTION TYPE This function is active.
FORMATCOMPACTFLASH() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL FORMATCOMPACTFLASH() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Formats the CompactFlash card in the terminal, thereby deleting all data on the card. You should thus ensure that the user is given appropriate warnings before this function is invoked. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE FTPGETFILE(SERVER, LOC, REM, DELETE) FTPGETFILE(SER VER , LOC , REM , DELETE ) ARGUMENT TYPE DESCRIPTION server int FTP connection number, always 0 loc cstring Local file name on the CompactFlash card rem cstring Remote file name on the FTP server delete int If true, the source will be deleted after the transfer, otherwise, it will remain on the source disk. DESCRIPTION This function will transfer the defined file from the FTP server to the Gateway’s CompactFlash card.
FTPPUTFILE(SERVER, LOC, REM, DELETE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL FTPPUTFILE(SER VER , LOC , REM , DELETE ) ARGUMENT TYPE DESCRIPTION server int FTP connection number, always 0 loc cstring Local file name on the CompactFlash card rem cstring Remote file name on the FTP server delete int If true, the source will be deleted after the transfer, otherwise, it will remain on the source disk.
FUNCTION REFERENCE GETALARMTAG(INDEX) GETALARMTAG(I NDEX ) ARGUMENT TYPE DESCRIPTION index int Tag index number DESCRIPTION This function returns a bit mask integer representing the tag alarms state for the tag identified with index. Bit 0 (ie. the bit with a value of 0x01) represents the Alarm 1 state and bit 1 (ie. the bit with a value of 0x02) the Alarm 2. Note: The tag index can be found from the tag name using the FindTagIndex() function FUNCTION TYPE This function is passive. RETURN TYPE int.
GETBATCH() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETBATCH() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Returns the name of the current batch. FUNCTION TYPE This function is passive. RETURN TYPE cstring.
FUNCTION REFERENCE GETCAMERADATA(PORT, CAMERA, PARAM) GETCAMERADATA(P OR T, CAM ERA , P ARAM ) ARGUMENT TYPE DESCRIPTION port int The port number where the camera is connected camera int The camera number on the port param int The camera parameter to be read DESCRIPTION This function returns the value of the parameter number param for a Banner camera connected on the Gateway. The argument camera is the device number showing in Fieldbus Gateway Manager status bar when the camera is selected.
GETDATE (TIME) AND FAMILY VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETDATE (TI M E ) AND FAMILY ARGUMENT TYPE DESCRIPTION time int The time value to be decoded. DESCRIPTION Each member of this family of functions returns some component of a time/date value, as previously created by GetNow, Time or Date. The available functions are as follows… FUNCTION DESCRIPTION GetDate Returns the day-of-month portion of time. GetDay Returns the day-of-week portion of time.
FUNCTION REFERENCE GETDISKFREEBYTES(DRIVE) GETDISKFREEBYTES(DRI VE ) ARGUMENT TYPE DESCRIPTION drive int The drive number, always 0. DESCRIPTION Returns the number of free memory bytes on the CompactFlash Card. Note: This function requires time to calculate free memory space, as a long CompactFlash access is necessary. Do NOT call this function permanently with on tick, on update or in a formula. Call it upon an event such as OnSelect on the page you want to display the resulting value.
GETDISKFREEPERCENT(DRIVE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETDISKFREEPERCENT(DRI VE ) ARGUMENT TYPE DESCRIPTION drive int The drive number, always 0. DESCRIPTION Returns the percentage of free memory space on the CompactFlash Card. Note: This function requires time to calculate free memory space, as a long CompactFlash access is necessary. Do NOT call this function permanently with on tick, on update or in a formula.
FUNCTION REFERENCE GETDISKSIZEBYTES(DRIVE) GETDISKSIZEBYTES(DR I VE ) ARGUMENT TYPE DESCRIPTION drive int The drive number, always 0. DESCRIPTION Returns the size in bytes of the CompactFlash Card. Note: This function requires time to calculate free memory space, as a long CompactFlash access is necessary. Do NOT call this function permanently with on tick, on update or in a formula. Call it upon an event such as OnSelect on the page you want to display the resulting value.
GETFORMATTEDTAG(INDEX) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETFORMATTEDTAG(I N DEX ) ARGUMENT TYPE DESCRIPTION index int Tag index number DESCRIPTION Returns a string representing the formatted value of the tag specified by index. The string returned follows the format programmed on the targeted tag. For example, a flag will show On or Off, a multi variable will show the text corresponding to the value. The index can be found from the tag label using the function FindTagIndex().
FUNCTION REFERENCE GETINTERFACESTATUS(PORT) GETINTERFACESTATUS(P ORT) ARGUMENT TYPE DESCRIPTION interface int The interface to be queried. DESCRIPTION Returns a string indicating the status of the specified TCP/IP interface. Refer to the earlier chapter on Advanced Communications for details of how to calculate the value to be placed in the interface parameter, and of how to interpret the returned value. FUNCTION TYPE This function is passive. RETURN TYPE cstring.
GETINTTAG(INDEX) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETINTTAG(I NDEX ) ARGUMENT TYPE DESCRIPTION index int Tag index number DESCRIPTION Returns the value of the integer tag specified by index. The index can be found from the tag label using the function FindTagIndex(). This function will only work if the targeted tag is an integer. FUNCTION TYPE This function is active. RETURN TYPE int. EXAMPLE Value = GetIntTag(10) Returns the value of the tag with index 10.
FUNCTION REFERENCE GETMAXTAGINT(INDEX) GETMAXTAGINT(INDEX) ARGUMENT TYPE DESCRIPTION index int Tag index number DESCRIPTION This function returns the maximum value from the data limits. The index can be found from the tag label using the function FindTagIndex(). This function will only work if the target tag is an integer. FUNCTION TYPE This function is passive. RETURN TYPE int.
GETMAXTAGREAL(INDEX) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETMAXTAGREAL(INDEX) ARGUMENT TYPE DESCRIPTION index int Tag index number DESCRIPTION This function returns the maximum value from the data limits. The index can be found from the tag label using the function FindTagIndex(). This function will only work if the target tag is an real (floating point). FUNCTION TYPE This function is passive. RETURN TYPE float.
FUNCTION REFERENCE GETMINTAGINT(INDEX) GETMINTAGINT(INDEX) ARGUMENT TYPE DESCRIPTION index int Tag index number DESCRIPTION This function returns the minimum value from the data limits. The index can be found from the tag label using the function FindTagIndex(). This function will only work if the target tag is an integer. FUNCTION TYPE This function is passive. RETURN TYPE int.
GETMINTAGREAL(INDEX) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETMINTAGREAL(INDEX) ARGUMENT TYPE DESCRIPTION index int Tag index number DESCRIPTION This function returns the minimum value from the data limits. The index can be found from the tag label using the function FindTagIndex(). This function will only work if the target tag is an real (floating point). FUNCTION TYPE This function is passive. RETURN TYPE float.
FUNCTION REFERENCE GETMONTHDAYS(Y, M) GETMONTHDAYS(Y , M ) ARGUMENT TYPE DESCRIPTION y int The year to be processed, in four-digit form. m int The month to be processed, from 1 to 12. DESCRIPTION Returns the number of days in the indicated month, accounting for leap years etc. FUNCTION TYPE This function is passive. RETURN TYPE int.
GETNETGATE(PORT) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETNETGATE(P ORT) ARGUMENT TYPE DESCRIPTION port int The index of the Ethernet port. Must be zero. DESCRIPTION Returns the IP address of the port’s default gateway as a dotted-decimal text string. FUNCTION TYPE The function is passive. RETURN TYPE cstring.
FUNCTION REFERENCE GETNETID(PORT) GETNETID(P ORT) ARGUMENT TYPE DESCRIPTION port int The index of the Ethernet port. Must be zero. DESCRIPTION Reports an Ethernet port’s MAC address as 17-character text string. FUNCTION TYPE This function is passive. RETURN TYPE cstring.
GETNETIP(PORT) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETNETIP(P OR T) ARGUMENT TYPE DESCRIPTION port int The index of the Ethernet port. Must be zero. DESCRIPTION Reports an Ethernet port’s IP address as a dotted-decimal text string. FUNCTION TYPE This function is passive. RETURN TYPE cstring.
FUNCTION REFERENCE GETNETMASK(PORT) GETNETMASK(P ORT) ARGUMENT TYPE DESCRIPTION port int The index of the Ethernet port. Must be zero. DESCRIPTION Reports an Ethernet port’s IP address mask as a dotted-decimal text string. FUNCTION TYPE This function is passive. RETURN TYPE cstring.
GETNOW() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETNOW() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Returns the current time and date as the number of seconds elapsed since the datum point of 1st January 1997. This value can then be used with other time/date functions. FUNCTION TYPE This function is passive. RETURN TYPE int.
FUNCTION REFERENCE GETNOWDATE() GETNOWDATE() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Returns the number of seconds in the days that have passed since 1st of January 1997. FUNCTION TYPE This function is passive. RETURN TYPE int.
GETNOWTIME() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETNOWTIME() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Returns the time of day in terms of seconds. FUNCTION TYPE This function is passive. RETURN TYPE int.
FUNCTION REFERENCE GETPORTCONFIG(PORT, PARAM) GETPORTCONFIG(P ORT, P ARAM ) ARGUMENT TYPE DESCRIPTION port int Number of the port to be set param int Port parameter to be set DESCRIPTION Returns the value of a parameter on port. The port number starts from the programming port with value 1. The table below shows the parameter number and associated return values. PARAM NB DESCRIPTION POSSIBLE VALUES 1 Baud Rate The actual baud rate, e.g.
GETREALTAG(INDEX) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETREALTAG(I NDEX ) ARGUMENT TYPE DESCRIPTION index int Tag index number DESCRIPTION Returns the value of the real tag specified by index. The index can be found from the tag label using the function FindTagIndex().This function will only work if the targeted tag is a real (floating point). FUNCTION TYPE This function is active. RETURN TYPE float. EXAMPLE Value = GetRealTag(10) Returns the floating-point value of the tag with index 10.
FUNCTION REFERENCE GETSTRINGTAG(INDEX) GETSTRINGTAG(I NDEX ) ARGUMENT TYPE DESCRIPTION Index int Tag index number DESCRIPTION Returns the value of the string tag specified by index. The index can be found from the tag label using the function FindTagIndex().This function will only work if the targeted tag is a String. FUNCTION TYPE This function is active. RETURN TYPE cstring. EXAMPLE Value = GetStringTag(10) Returns the string value of the tag with index 10.
GETTAGLABEL(INDEX) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETTAGLABEL(I NDEX ) ARGUMENT TYPE DESCRIPTION index int Tag index number DESCRIPTION Returns the label of the tag (not the mnemonic or tag name) specified by index. FUNCTION TYPE This function is active. RETURN TYPE cstring. EXAMPLE Label = GetTagLabel(10) Returns the label of the tag with index 10.
FUNCTION REFERENCE GETUPDOWNDATA(DATA, LIMIT) GETUPDOWNDATA(DATA , LI M I T) ARGUMENT TYPE DESCRIPTION data int A steadily increasing source value. limit int The number of values to generate. DESCRIPTION This function takes a steadily increasing value and converts it to a value that oscillates between 0 and limit–1.
GETUPDOWNSTEP(DATA, LIMIT) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GETUPDOWNSTEP(DATA , LI M I T) ARGUMENT TYPE DESCRIPTION data int A steadily increasing source value. limit int The number of values to generate. DESCRIPTION See GetUpDownData for a description of this function. FUNCTION TYPE This function is passive. RETURN TYPE int.
FUNCTION REFERENCE GOTOPAGE(NAME) GOTOPAGE(NAM E ) ARGUMENT TYPE DESCRIPTION name Display Page The page to be displayed. DESCRIPTION Selects page name to be shown on the terminal’s display. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
GOTOPREVIOUS() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL GOTOPREVIOUS() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Causes the Gateway to return to the previous page shown on the terminal’s display. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE HASACCESS (RIGHTS) HASACCESS (RI GHTS ) ARGUMENT TYPE DESCRIPTION rights int The required access rights. DESCRIPTION Returns a value of true or false depending on whether the current user has access rights defined by the rights parameter. This parameter comprises a bit-mask representing the various user-defined rights, with bit 0 (ie. the bit with a value of 0x01) representing User Right 1, bit 1 (ie. the bit with a value of 0x02) representing User Right 2 and so on.
HIDEPOPUP() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL HIDEPOPUP() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Hides the popup that was previously shown using ShowPopup. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE INTTOTEXT(DATA, RADIX, COUNT) INTTOTEXT(DATA , RADI X , COUN T) ARGUMENT TYPE DESCRIPTION data int The value to be processed. radix int The number base to be used. count int The number of digits to generate. DESCRIPTION Returns the string obtained by formatting data in base radix, generating count digits.
ISDEVICEONLINE(DEVICE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL ISDEVICEONLINE(DEVI CE ) ARGUMENT TYPE DESCRIPTION device int Reports if device is online. DESCRIPTION Reports if device is online or not. As device is marked as offline if a repeated sequence of communications error have occurred. When a device is in the offline state, it will be polled periodically to see if has returned online.
FUNCTION REFERENCE ISPORTREMOTE(PORT) ISPORTREMOTE(PORT) ARGUMENT TYPE DESCRIPTION port int The port number to monitor. DESCRIPTION The function will monitor the specified port to indicate if port sharing is active. FUNCTION TYPE This function is passive. RETURN TYPE This function does not return a value.
ISWRITEQUEUEEMPTY(DEV) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL ISWRITEQUEUEEMPTY(DEV ) ARGUMENT TYPE DESCRIPTION dev int The device number to get the queue state from DESCRIPTION Returns the state of the writes queue for the device identified with the argument dev. The function will return true if the queue is empty, false otherwise. Note: The device number can be identified in Fieldbus Gateway Manager’s status bar when a device is selected in Communication.
FUNCTION REFERENCE LEFT(STRING, COUNT) LEFT(STRI NG , COUNT) ARGUMENT TYPE DESCRIPTION string cstring The string to be processed. count int The number of characters to return. DESCRIPTION Returns the first count characters from string. FUNCTION TYPE This function is passive. RETURN TYPE cstring.
LEN(STRING) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL LEN(STR I NG ) ARGUMENT TYPE DESCRIPTION string cstring The string to be processed. DESCRIPTION Returns the number of characters in string. FUNCTION TYPE This function is passive. RETURN TYPE int.
FUNCTION REFERENCE LOADCAMERASETUP(PORT, CAMERA, INDEX, FILE) LOADCAMERASETUP(P ORT, CAM ER A , I NDEX , FI LE ) ARGUMENT TYPE DESCRIPTION port int The port number where the camera is connected camera int The camera device number index int Inspection file number in the camera file cstring Path and filename for the inspection file on the Gateway CompactFlash card DESCRIPTION This function loads the inspection file from the Gateway CompactFlash card to the camera memory.
LOG(VALUE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL LOG(VALUE ) ARGUMENT TYPE DESCRIPTION value float The value to be processed. DESCRIPTION Returns the natural log of value. FUNCTION TYPE This function is passive. RETURN TYPE float. EXAMPLE Variable1 := log(5.
FUNCTION REFERENCE LOG10(VALUE) LOG10(VALUE ) ARGUMENT TYPE DESCRIPTION value float The value to be processed. DESCRIPTION Returns the base-10 log of value. FUNCTION TYPE This function is passive. RETURN TYPE float. EXAMPLE Variable3 := log10(5.
LOGSAVE() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL LOGSAVE() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Forces the data logger to save on the CompactFlash Card. Note: This function should NOT be called permanently or regularly. It is intended only for punctual use. An overuse of this function may result in CompactFlash card damage and loss of data. FUNCTION TYPE This function is passive.
FUNCTION REFERENCE MAKEFLOAT(VALUE) MAKEFLOAT(VALUE ) ARGUMENT TYPE DESCRIPTION value int The value to be converted. DESCRIPTION Reinterprets the integer argument as a floating-point value. This function does not perform a type conversion, but instead takes the bit pattern stored in the argument, and assumes that rather than representing an integer, it actually represents a floating-point value.
MAKEINT(VALUE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL MAKEINT(VALUE ) ARGUMENT TYPE DESCRIPTION value float The value to be converted. DESCRIPTION Reinterprets the floating-point argument as an integer. This function does not perform a type conversion, but instead takes the bit pattern stored in the argument, and assumes that rather than representing a floating-point value, it actually represents an integer.
FUNCTION REFERENCE MAX(A, B) MAX(A , B ) ARGUMENT TYPE DESCRIPTION a int / float The first value to be compared. b int / float The second value to be compared. DESCRIPTION Returns the larger of the two arguments. FUNCTION TYPE This function is passive. RETURN TYPE int or float, depending on the type of the arguments.
MEAN(ELEMENT, COUNT) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL MEAN(ELEM ENT, COUNT) ARGUMENT TYPE DESCRIPTION element int / float The first array element to be processed. count int The number of elements to be processed. DESCRIPTION Returns the mean of the count array elements from element onwards. FUNCTION TYPE This function is passive. RETURN TYPE float.
FUNCTION REFERENCE MID(STRING, POS, COUNT) MID(STRI NG , P OS , COUNT) ARGUMENT TYPE DESCRIPTION string cstring The string to be processed. pos int The position at which to start. count int The number of characters to return. DESCRIPTION Returns count characters from position pos within string, where 0 is the first position. FUNCTION TYPE This function is passive. RETURN TYPE cstring.
MIN(A, B) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL MIN(A , B ) ARGUMENT TYPE DESCRIPTION a int / float The first value to be compared. b int / float The second value to be compared. DESCRIPTION Returns the smaller of the two arguments. FUNCTION TYPE This function is passive. RETURN TYPE int or float, depending on the type of the arguments.
FUNCTION REFERENCE MULDIV(A, B, C) MULDIV(A , B , C ) ARGUMENT TYPE DESCRIPTION a int First value. b int Second value. c int Third value. DESCRIPTION Returns a*b/c. The intermediate math is done with 64-bit integers to avoid overflows. FUNCTION TYPE This function is passive. RETURN TYPE int.
MUTESIREN() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL MUTESIREN() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Turns off the Gateway’s internal siren. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE NEWBATCH(NAME) NEWBATCH(NAM E ) ARGUMENT TYPE DESCRIPTION name cstring Name of the batch. DESCRIPTION Starts a batch called name. The name must be no more than 8 characters in length and made up of characters that are valid FAT16 filename. Restarting a batch already on the CF card will append the data. If a new batch exceeds the maximum number of batches to be kept, the oldest batch (i.e. The one last changed) will be deleted.
NOP() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL NOP() ARGUMENT TYPE DESCRIPTION none DESCRIPTION This function does nothing. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE OPENFILE(NAME, MODE) OPENFILE(NAM E , M ODE ) ARGUMENT TYPE DESCRIPTION name cstring The file to be opened. mode int The mode in which the file is to be opened… 0 = Read Only 1 = Read/Write at Start of File 2 = Read/Write at End of File DESCRIPTION Returns a handle to the file name located on the CompactFlash card. This function is restricted to a maximum of four open files at any given time. The CompactFlash card cannot be unmounted while a file is open.
PI() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL PI() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Returns pi as a floating-point number. FUNCTION TYPE This function is passive. RETURN TYPE float.
FUNCTION REFERENCE PLAYRTTTL(TUNE) PLAYRTTTL(TUNE ) ARGUMENT TYPE DESCRIPTION tune cstring The tune to be played in RTTTL representation. DESCRIPTION Plays a tune using the terminal’s internal beeper. The tune argument should contain the tune to be played in RTTTL format—the format used by a number of cell phones for custom ring tones. Sample tunes can be obtained from many sites on the World Wide Web. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
POPDEV(ELEMENT, COUNT) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL POPDEV(ELEM ENT, COUNT) ARGUMENT TYPE DESCRIPTION element int / float The first array element to be processed. count int The number of elements to be processed. DESCRIPTION Returns the standard deviation of the count array elements from element onwards, assuming the data points to represent the whole of the population under study. If you need to find the standard deviation of a sample, use the StdDev function instead.
FUNCTION REFERENCE PORTCLOSE(PORT) PORTCLOSE(P OR T) ARGUMENT TYPE DESCRIPTION port int Closes the specified port. DESCRIPTION This function is used in conjunction with the active or passive TCP raw port drivers to close the selected port by gracefully closing the connection that is attached to the associated socket. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
PORTGETCTS(PORT) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL PORTGETCTS(P OR T) ARGUMENT TYPE DESCRIPTION port int The raw port to get the CTS state from DESCRIPTION Returns the CTS state of the specified port. The port must be one of the serial ports configured to use a raw driver. Note: The communication port number can be identified in Fieldbus Gateway Manager’s status bar when the port is selected. FUNCTION TYPE This function is active. RETURN TYPE int.
FUNCTION REFERENCE PORTINPUT(PORT, START, END, TIMEOUT, LENGTH) PORTINPUT(P ORT, START, END , TI M EOUT, LEN GTH ) ARGUMENT TYPE DESCRIPTION port int The raw port to be read. start int The start character to match, if any. end int The end character to match, if any. timeout int The inter-character timeout in milliseconds, if any. length int The maximum number of characters to read, if any.
PORTPRINT(PORT, STRING) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL PORTPRINT(P OR T, STR I NG ) ARGUMENT TYPE DESCRIPTION port int The raw port to be written to. string cstring The text string to be transmitted. DESCRIPTION Transmits the text contained in string to the port indicated by port. The port must be configured to use a raw driver, such as the raw serial port driver, or either of the raw TCP/IP drivers. The data will be transmitted, and the function will return.
FUNCTION REFERENCE PORTREAD(PORT, PERIOD) PORTREAD(P ORT, P ERI OD ) ARGUMENT TYPE DESCRIPTION port int The raw port to be read. period int The time to wait in milliseconds. DESCRIPTION Attempts to read a character from the port indicated by port. The port must be configured to use a raw driver, such as the raw serial port driver, or either of the raw TCP/IP drivers. If no data is available within the indicated time period, a value of –1 will be returned.
PORTSETRTS(PORT, STATE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL PORTSETRTS(P ORT, STATE ) ARGUMENT TYPE DESCRIPTION port int The raw port to control state int The state of the RTS, true (1) or false (0) DESCRIPTION Sets the RTS.of the port indicated by port with the setting in state. The port must be configured to use a raw driver and be on of the serial ports. The state argument can take values 0 or 1 only.
FUNCTION REFERENCE PORTWRITE(PORT, DATA) PORTWRITE(P OR T, DATA ) ARGUMENT TYPE DESCRIPTION port int The raw port to be written to. data int The byte to be transmitted. DESCRIPTION Transmits the byte indicated by data on the port indicated by port. The port must be configured to use a raw driver, such as the raw serial port driver, or either of the raw TCP/IP drivers. The character will be transmitted, and the function will return.
POSTKEY(CODE, TRANSITION) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL POSTKEY(CODE , TRANSI TI ON ) ARGUMENT TYPE DESCRIPTION code int Key code. transition int Transition code. DESCRIPTION Adds a physical key operation to the queue. FUNCTION TYPE This function is active.
FUNCTION REFERENCE POWER(VALUE, POWER) POWER(VALUE , P OW ER ) ARGUMENT TYPE DESCRIPTION value int / float The value to be processed. power int / float The power to which value is to be raised. DESCRIPTION Returns value raised to the power-th power. FUNCTION TYPE This function is passive. RETURN TYPE int or float, depending on the type of the value argument.
RAD2DEG(THETA) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL RAD2DEG(THETA ) ARGUMENT TYPE DESCRIPTION theta float The angle to be processed. DESCRIPTION Returns theta converted from radians to degrees. FUNCTION TYPE This function is passive. RETURN TYPE float.
FUNCTION REFERENCE RANDOM(RANGE) RANDOM(RANGE ) ARGUMENT TYPE DESCRIPTION range int The range of random values to produce. DESCRIPTION Returns a pseudo-random value between 0 and range-1. FUNCTION TYPE This function is passive. RETURN TYPE int.
READDATA(DATA, COUNT) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL READDATA(DATA , COUN T) ARGUMENT TYPE DESCRIPTION data any First array element to be read. count int Number of elements to be read. DESCRIPTION Requests that count elements from array element data onwards to read on the next comms scan. This function is used with arrays that have been mapped to external data, and which have their read policy set to Read Manually.
FUNCTION REFERENCE READFILE(FILE, CHARS) READFILE(FI LE , CHARS ) ARGUMENT TYPE DESCRIPTION file int File handle as required by OpenFile. chars int Number of characters to be read. DESCRIPTION Reads a string up to 512 characters in length from the specified file. This function does not look for a line feed and carriage return therefore allowing line read of more than 510 characters (ReadFileLine() limit).
READFILELINE(FILE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL READFILELINE(FI LE ) ARGUMENT TYPE DESCRIPTION file int File handle as returned by OpenFile. DESCRIPTION Returns a single line of text from file. FUNCTION TYPE This function is active. RETURN TYPE cstring.
FUNCTION REFERENCE RENAMEFILE(HANDLE, NAME) RENAMEFILE(HANDLE , NAM E ) ARGUMENT TYPE DESCRIPTION handle int File handle. name cstring New file name. DESCRIPTION Returns a non-zero value upon a successful rename file operation. The file handle is the returned value of the Openfile() function. After the rename operation, the file stays open and should be closed if no further operations are required.
RIGHT(STRING, COUNT) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL RIGHT(STRI NG , COUN T) ARGUMENT TYPE DESCRIPTION string cstring The string to be processed. count int The number of characters to return. DESCRIPTION Returns the last count characters from string. FUNCTION TYPE This function is passive. RETURN TYPE cstring.
FUNCTION REFERENCE SAVECAMERASETUP(PORT, CAMERA, INDEX, FILE) SAVECAMERASETUP(P ORT, CAM ER A , I NDEX , FI LE ) ARGUMENT TYPE DESCRIPTION port int The port number where the camera is connected camera int The camera device number index int Inspection file number in the camera file cstring Path and filename for the inspection file on the Gateway CompactFlash card DESCRIPTION This function saves the inspection file uploaded from the camera on the Gateway CompactFlash card.
SCALE(DATA, R1, R2, E1, E2) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SCALE(DATA , R 1 , R 2 , E 1 , E 2 ) ARGUMENT TYPE DESCRIPTION data int The value to be scaled. r1 int The minimum raw value stored in data.. r2 int The maximum raw value stored in data.. e1 int The engineering value corresponding to r1. e2 int The engineering value corresponding to r2.
FUNCTION REFERENCE SENDFILE(RCPT, FILE) SENDFILE(RCP T, FI LE ) ARGUMENT TYPE DESCRIPTION rcpt int The recipient’s index in the database’s address book. file cstring The path and file name to be sent. DESCRIPTION Sends an email from the Gateway with the file specified attached. The function returns immediately, having first added the required email to the system’s mail queue. The message will be sent using the appropriate mail transport as configured in the database.
SENDMAIL(RCPT, SUBJECT, BODY) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SENDMAIL(RCP T, SUBJECT, BODY ) ARGUMENT TYPE DESCRIPTION rcpt int The recipient’s index in the database’s address book. subject cstring The required subject line for the email. body cstring The required body text of the email. DESCRIPTION Sends an email from the Gateway. The function returns immediately, having first added the required email to the system’s mail queue.
FUNCTION REFERENCE SET(TAG, VALUE) SET(TAG , VALUE ) ARGUMENT TYPE DESCRIPTION tag int or real The tag to be changed. value int or real The value to be assigned. DESCRIPTION This function sets the specified tag to the specified value. It differs from the more normally used assignment operator in that it deletes any queued writes to this tag and replaces them with an immediate write of the specified value.
SETINTTAG(INDEX, VALUE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SETINTTAG(I NDEX , VALUE ) ARGUMENT TYPE DESCRIPTION index int Tag index number value int The value to be assigned DESCRIPTION This function sets the tag specified by index to the specified value. The index can be found from the tag label using the function FindTagIndex().This function will only work if the target tag is an integer. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE SETLANGUAGE(CODE) SETLANGUAGE(CODE ) ARGUMENT TYPE DESCRIPTION code int The language to be selected. DESCRIPTION Set the terminal’s current language to that indicated by code. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
SETNETCONFIG(PORT, ADDR, MASK, GATE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SETNETCONFIG(P OR T, ADDR , M ASK , GATE ) ARGUMENT TYPE DESCRIPTION port int The index of the Ethernet port. Must be zero. addr int The required IP address for the port. mask int The required netmask for the port. gate int The required default gateway for the port. DESCRIPTION Overrides the database settings for the Ethernet port.
FUNCTION REFERENCE SETNOW(TIME) SETNOW(TI M E ) ARGUMENT TYPE DESCRIPTION time int The new time to be set. DESCRIPTION Sets the current time via an integer that represents the number of seconds that have elapsed since 1st January 1997. The integer is typically generated via the other time/date functions. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
SETPORTCONFIG(PORT, PARAM, VALUE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SETPORTCONFIG(P ORT, P ARAM , VALUE ) ARGUMENT TYPE DESCRIPTION port int Number of the port to be set param int Port parameter to be set value int Value of the parameter DESCRIPTION Sets the serial port parameter to value. The port number starts from the programming port with value 1. The table below shows the parameter number and associated possible values.
FUNCTION REFERENCE SETPORTCONFIG(PORT, PARAM, VALUE) The following setup shows how to modify the RS232 port from the device display. • Create a tag for each parameter value, i.e. Baud, DataBits, StopBits, Parity and PhysicalMode. Make sure all tags are set to retentive. • Insert the tags on the User Interface for operator access. • Create a button, set its action to User Defined and enter the CommitAndReset() function in the OnPressed field.
SETREALTAG(INDEX, VALUE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SETREALTAG(I NDEX , VALUE ) ARGUMENT TYPE DESCRIPTION index int Tag index number value float The value to be assigned DESCRIPTION This function sets the tag specified by index to the specified value. The index can be found from the tag label using the function FindTagIndex().This function will only work if the target tag is a real (floating point). FUNCTION TYPE This function is active.
FUNCTION REFERENCE SETSTRINGTAG(INDEX, VALUE) SETSTRINGTAG(INDEX, VALUE) ARGUMENT TYPE DESCRIPTION index Int Tag index number value Int The value to be assigned DESCRIPTION This function set the tag specified by index to the specified value. The index can be found from the tag label using the function FindTagIndex(). This function will only work if the target tag is a string. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
SGN(VALUE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SGN(VALUE ) ARGUMENT TYPE DESCRIPTION value int / float The value to be processed. DESCRIPTION Returns –1 if value is less than zero, +1 if it is greater than zero, or 0 if it is equal to zero. FUNCTION TYPE This function is passive. RETURN TYPE int or float, depending on the type of the value argument.
FUNCTION REFERENCE SHOWMENU(NAME) SHOWMENU(NAM E ) ARGUMENT TYPE DESCRIPTION name Display Page Display page to show as popup menu. DESCRIPTION Displays the page specified as a popup menu. This function is only available with on units fitted with touch-screens. Popup menus are shown on top of whatever is already on the screen, and are aligned with the left-hand side of the display. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
SHOWPOPUP(NAME) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SHOWPOPUP(NAM E ) ARGUMENT TYPE DESCRIPTION name Display Page The page to be displayed as a popup. DESCRIPTION Shows page name as a popup on the terminal’s display. The popup will be centered on the display, and shown on top of the existing page. The popup can be removed by calling the HidePopup() function.
FUNCTION REFERENCE SIN(THETA) SIN(THETA ) ARGUMENT TYPE DESCRIPTION theta float The angle, in radians, to be processed. DESCRIPTION Returns the sine of the angle theta. FUNCTION TYPE This function is passive. RETURN TYPE float.
SIRENON() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SIRENON() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Turns on the Gateway’s internal siren. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE SLEEP(PERIOD) SLEEP(P ERI OD ) ARGUMENT TYPE DESCRIPTION period int The period for which to sleep, in milliseconds. DESCRIPTION Sleeps the current task for the indicated number of milliseconds. This function is normally used within programs that run in the background, or that implement custom communications using Raw Port drivers. Calling it in response to triggers or key presses is not recommended. FUNCTION TYPE This function is active.
SQRT(VALUE) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SQRT(VALUE ) ARGUMENT TYPE DESCRIPTION value int / float The value to be processed. DESCRIPTION Returns the square root of value. FUNCTION TYPE This function is passive. RETURN TYPE int or float, depending on the type of the value argument.
FUNCTION REFERENCE STDDEV(ELEMENT, COUNT) STDDEV(ELEM ENT, COUNT) ARGUMENT TYPE DESCRIPTION element int / float The first array element to be processed. count int The number of elements to be processed. DESCRIPTION Returns the standard deviation of the count array elements from element onwards, assuming the data points to represent a sample of the population under study. If you need to find the standard deviation of the whole population, use the PopDev function instead.
STOPSYSTEM() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL STOPSYSTEM() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Stops the Gateway to allow a user to update the database. This function is typically used when serial programming is required with respect to a unit whose programming port has been allocated for communications. Calling this function shuts down all communications, and thereby allows the port to function as a programming port once more. FUNCTION TYPE This function is active.
FUNCTION REFERENCE STRIP(TEXT, TARGET) STRIP(TEX T, TARGET) ARGUMENT TYPE DESCRIPTION text cstring The string to be processed. target int The character to be removed. DESCRIPTION Removes all occurrences of a given character from a text string. FUNCTION TYPE This function is passive. RETURN TYPE cstring. EXAMPLE Text := Strip(“Mississippi”, ’s’) Text now contains “Miiippi”.
SUM(ELEMENT, COUNT) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL SUM(ELEM ENT, COUN T) ARGUMENT TYPE DESCRIPTION element int / float The first array element to be processed. count int The number of elements to be processed. DESCRIPTION Returns the sum of the count array elements from element onwards. FUNCTION TYPE This function is passive. RETURN TYPE int or float, depending on the type of the value argument.
FUNCTION REFERENCE TAN(THETA) TAN(THETA ) ARGUMENT TYPE DESCRIPTION theta float The angle, in radians, to be processed. DESCRIPTION Returns the tangent of the angle theta. FUNCTION TYPE This function is passive. RETURN TYPE float.
TESTACCESS(RIGHTS, PROMPT) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL TESTACCESS(R I GHTS , P ROM P T) ARGUMENT TYPE DESCRIPTION rights int The required access rights. prompt cstring The prompt to be used in the log-on popup. DESCRIPTION Returns a value of true or false depending on whether the current user has access rights defined by the rights parameter. This parameter comprises a bit-mask representing the various user-defined rights, with bit 0 (ie.
FUNCTION REFERENCE TEXTTOADDR(ADDR) TEXTTOADDR(ADDR ) ARGUMENT TYPE DESCRIPTION addr cstring The addressed in dotted-decimal form. DESCRIPTION Converts a dotted-decimal string into a 32-bit IP address. FUNCTION TYPE This function is passive. RETURN TYPE int. EXAMPLE ip := TextToAddr(“192.168.0.
TEXTTOFLOAT(STRING) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL TEXTTOFLOAT(STRI NG ) ARGUMENT TYPE DESCRIPTION string cstring The string to be processed. DESCRIPTION Returns the value of string, treating it as a floating-point number. This function is often used together with Mid to extract values from strings received from raw serial ports. It can also be used to convert other string values into floating-point numbers. FUNCTION TYPE This function is passive. RETURN TYPE float.
FUNCTION REFERENCE TEXTTOINT(STRING, RADIX) TEXTTOINT(STRI NG , RADI X ) ARGUMENT TYPE DESCRIPTION string cstring The string to be processed. radix int The number base to be used. DESCRIPTION Returns the value of string, treating it as a number of base radix. This function is often used together with Mid to extract values from strings received from raw serial ports. It can also be used to convert other string values into integers. FUNCTION TYPE This function is passive. RETURN TYPE int.
TIME(H, M, S) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL TIME(H , M , S ) ARGUMENT TYPE DESCRIPTION h int The hour to be encoded, from 0 to 23. m int The minute to be encoded, from 0 to 59. s int The second to be encoded, from 0 to 59. DESCRIPTION Returns a value representing the indicated time as the number of seconds elapsed since midnight. This value can then be used with other time/date functions.
FUNCTION REFERENCE USECAMERASETUP(PORT, CAMERA, INDEX) USECAMERASETUP(P OR T, CAM ERA , I NDEX ) ARGUMENT TYPE DESCRIPTION port int The port number where the camera is connected camera int The camera device number index int Inspection file number in the camera DESCRIPTION This function selects the inspection file to be used by the camera. The number to be placed in the port argument is the port number to which the driver is bound.
USERLOGOFF() VLINX FIELDBUS GATEWAY MANAGER USER MANUAL USERLOGOFF() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Causes the current user to be logged-off the system. Any future actions that require security access rights will result in the display of the log-on popup to allow the entry of credentials. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
FUNCTION REFERENCE USERLOGON() USERLOGON() ARGUMENT TYPE DESCRIPTION none DESCRIPTION Forces the display of the log-on popup to allow the entry of user credentials. You do not normally have to use this function, as Fieldbus Gateway Manager will prompt for credentials when any action that requires security clearance is performed. FUNCTION TYPE This function is active. RETURN TYPE This function does not return a value.
WAITDATA(DATA, COUNT, TIME) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL WAITDATA(DATA , COUNT, TI M E ) ARGUMENT TYPE DESCRIPTION data any First array element to be read. count int Number of elements to be read. time int The timeout period in milliseconds. DESCRIPTION Requests that count elements from array element data onwards to read on the next comms scan. This function is used with arrays that have been mapped to external data, and which have their read policy set to Read Manually.
FUNCTION REFERENCE WRITEFILE(FILE, TEXT) WRITEFILE(FI LE , TEXT) ARGUMENT TYPE DESCRIPTION file int File handle as required by OpenFile. Text cstring Text to be written to file. DESCRIPTION Writes a string up to 512 characters in length to the specified file and returns the number of bytes successfully written. This function does not automatically include a Line feed and carriage return at the end. For easier programming, refer to WriteFileLine(). FUNCTION TYPE This function is active.
WRITEFILELINE(FILE, TEXT) VLINX FIELDBUS GATEWAY MANAGER USER MANUAL WRITEFILELINE(FI LE , TEXT) ARGUMENT TYPE DESCRIPTION file int File handle as required by OpenFile. text cstring Text to be written to file. DESCRIPTION Writes a string to the specified file and returns the number of bytes successfully written, including the carriage return and linefeed characters that will be appended to each line. FUNCTION TYPE This function is active. RETURN TYPE int.
TROUBLESHOOTING GENERAL TROUBLESHOOTING This section covers the most common problems encountered while setting up, programming or using the product. Do not forget to always download in the device after changing settings in Fieldbus Gateway Manager. GENERAL PROBLEM POSSIBLE CAUSES POSSIBLE SOLUTIONS Unit continually Cross-references between tags, e.g., Remove one of the references or use cycles on and off.
GENERAL VLINX FIELDBUS GATEWAY MANAGER USER MANUAL PROBLEM POSSIBLE CAUSES POSSIBLE SOLUTIONS Values show “----” No communication with target device See Serial Communication or Ethernet Communication. Value does not The tag on the screen is not linked Check the tag mapping making sure update. correctly. the target device (PLC, etc.) register is correct. Check the primitive Data Source in the user interface in case the word WAS is displayed. Re-link the tag in this case.
TROUBLESHOOTING GENERAL PROBLEM POSSIBLE CAUSES POSSIBLE SOLUTIONS Symbol or image The background of the image is not Change the primitive Fill Format to leaves a trace when refreshed. Solid color. animated. Add the system variable dispcount in the background of the image to force the refresh. Rich Bar Graph or Tag minimum and maximum are not Check the tag’s minimum and Dial Gauge does not setup. maximum values. These are used by move both primitives for min and max.
FIELDBUS GATEWAY MANAGER MESSAGES VLINX FIELDBUS GATEWAY MANAGER USER MANUAL FIELDBUS GATEWAY MANAGER MESSAGES ERRORS POSSIBLE CAUSES POSSIBLE SOLUTIONS Device incompatible The device you are trying to download Create a new database file with file. into doesn’t match the database device. corresponding to your device (File > New). Unable to open The communication port you try to communication port. download with is unavailable.
TROUBLESHOOTING SERIAL COMMUNICATION SERIAL COMMUNICATION This section is used to troubleshoot the communication between two devices linked via serial ports, i.e. RS232 or RS485. TIP: For communication troubleshooting, it is strongly advised to create a new Fieldbus Gateway Manager database including only one data tag mapped to a known register in the target device. PROBLEM POSSIBLE CAUSES POSSIBLE SOLUTIONS Values show “---” Port settings do not match.
ETHERNET COMMUNICATION VLINX FIELDBUS GATEWAY MANAGER USER MANUAL ETHERNET COMMUNICATION This section is used to troubleshoot the communication between two devices linked via Ethernet. TIP: For communication troubleshooting, it is strongly advised to create a new Fieldbus Gateway Manager database including only one data tag mapped to a known register in the target device. PROBLEM POSSIBLE CAUSES POSSIBLE SOLUTIONS Values show “----” Incorrect target device IP address.
TROUBLESHOOTING PROGRAMS Values blink between Incorrect tag mapping on one of the Delete tags one after another and the data and “----” tags on the display. download in-between. When the values on the screen stop blinking, the last deleted tag was mapped incorrectly or accessed an unknown register in the target device. Communications times-out. Increase the Slave Response or Device Timeout on the communication port or target device in Fieldbus Gateway Manager.
WEB SERVER VLINX FIELDBUS GATEWAY MANAGER USER MANUAL WEB SERVER PROBLEM POSSIBLE CAUSES SOLUTIONS Internet Browser says Web Server not enabled. Check that the Web Server in Fieldbus “Cannot display the web page” Gateway Manager is enabled. Ethernet port disabled or Ethernet Check that the Ethernet port in settings issue. Fieldbus Gateway Manager is enabled and has a correct IP address. See Ethernet Communication troubleshooting.