SPA Bus Communication Server for Microsoft Windows and InTouch Applications User Manual Ver 1.x Rev 2.3 DR120 10 DR120 11 KLINKMANN AUTOMATION P.O. Box 38 FIN-00371 Helsinki Finland tel. int. + 358 9 5404940 fax int. + 358 9 5413541 www.klinkmann.
Klinkmann Automation SPA Bus Server i Table Of Contents Overview ......................................................................................................................... 1 Communication Protocols ............................................................................................... 2 Accessing Remote Items via the SPA Server ................................................................. 3 Installing the SPA Bus Server ...........................................................
Klinkmann Automation SPA Bus Server 1 SPA Bus Communication Server Overview The SPA Bus Communication Server (hereafter referred to as the “SPA Server” or “SPA” or “Server”) is a Microsoft Windows application program that acts as a communication protocol server and allows other Windows application programs to access to data from SPA bus devices. The SPA bus consists of one IBM PC or compatible computer as a master and several slaves.
Klinkmann Automation SPA Bus Server 2 Communication Protocols Dynamic Data Exchange (DDE) is a communication protocol developed by Microsoft to allow applications in the Windows environment to send/receive data and instructions to/from each other. It implements a client-server relationship between two concurrently running applications. The server application provides the data and accepts requests from any other application interested in its data. Requesting applications are called clients.
Klinkmann Automation SPA Bus Server 3 The OPC is based on Microsoft OLE, COM and DCOM technologies and enables simple and standardised data interchange between the industrial or office sector and the production sector. From general point of view many aspects of OPC are similar to DDE, but main difference is in the implementation by using Microsoft's COM (Component Object Model) technology.
Klinkmann Automation SPA Bus Server 4 Installing the SPA Bus Server Installing the Server The SPA Bus Server installation package is supplied as a Microsoft Installer file DR12010_xxx.msi (for “Suite Link & DDE” version) or DR12011_xxx.msi (for “OPC & DDE” version), where xxx is the current (latest) version of SPA Bus Server. To install the SPA Server, run the DR12010_xxx.msi (for “Suite Link & DDE” version) or DR12011_xxx.
Klinkmann Automation SPA Bus Server 5 In case “HASP Device driver” and “HASP Files” are selected then HASP USB key will be supported and both HASP-key and software license will be available (files needed for HASP USB key will be installed): Note: In case the SafeNet Sentinel LDK Run-time Environment (HASP HL Runtime Package) is already installed on your computer (separately or by some other software) then it can be disabled: When installation is finished, the subdirectory specified as a folder where to
Klinkmann Automation SPA Bus Server 6 Runtime Package), copied to SPA Server folder only if “HASP Device driver” is selected during the installation in “Custom Setup” dialog. LICENSE.RTF Klinkmann Automation software license file. KLSERVER.DLL Dynamic Link Library necessary for “OPC & DDE” version of the Server. WWDLG32.DLL Dynamic Link Library necessary only for “OPC & DDE” version of the Server.
Klinkmann Automation SPA Bus Server 7 Licensing by using HASP HL key The following should be done to enable the licensing by HASP HL key: - - - The “HASP Device driver” and “HASP Files” are selected during the SPA Bus Server installation in “Custom Setup” dialog – that causes correspondingly haspdinst.exe and hasp_windows_4442.
Klinkmann Automation SPA Bus Server 8 4) Click OK and restart SPA Bus Server. SPA Bus Server software license now is enabled. Note – the “Software Key” string is saved to MS Windows system directory (e.g. C:\Windows) WIN.INI file [SPA] section to enable it is automatically detected at SPA Bus Server next start-up.
Klinkmann Automation SPA Bus Server 9 3) Take the screenshot from ArchestrA SMC Logger or SPA Internal Log file window containing the “Software License Key removal message”, like below: or take the string with “Software License Key removal message” directly from ArchestrA SMC Logger or SPA Internal Log file, like following: Software Key 6dd7-4b19-8f20-500e removed.
Klinkmann Automation SPA Bus Server 10 Installing the I/O Server Infrastructure The I/O Server Infrastructure installation package is supplied as a self-extracting archive (IOServerInfrastructure.exe) and can be downloaded from Klinkmann’s web site. To install the I/O Server Infrastructure from the self-extracting archive, run the IOServerInfrastructure.exe and proceed as directed by the I/O Server Infrastructure Setup program.
Klinkmann Automation SPA Bus Server 11 To change the Server's internal parameters, invoke the /Configure/Server Settings... command. The "Server Settings" dialogue box will appear: The following describes each field in this dialogue box: Protocol Timer Tick This field is used to change the frequency at which the Server checks for work to do. This should be approximately 2 to 4 times the fastest rate desired to update data from the SPA bus devices.
Klinkmann Automation SPA Bus Server 12 NT service. However, to view configuration information or to reconfigure the Server, the user must log on to the system. Any Server related problems that may arise such as missing adapter cards, licensing failures or device drivers not loading will not be visible to the user until a log on is performed. Disabling this option and rebooting the system will cause the Server to run as a Windows NT application program once again. Notes. 1.
Klinkmann Automation SPA Bus Server 13 Configure Communication Port Command This command is used to configure the communication port that will be used to communicate with the SPA bus devices. Invoke the menu item /Configure/Com Port Settings... The "Communication Port Settings" dialogue box will appear: The following describes each field in this dialogue box: Com Port This field is used to select a communication port. Note. The default Communication port is COM1.
Klinkmann Automation SPA Bus Server 14 Parity The selected Parity must match the setting used in the SPA bus. Note. The default setting is Even parity. Data Bits The selected Data Bits must match the setting used in the SPA bus. Note. The default setting is 7 Data Bits. Echo This field must be checked if echo comes back to the port. The echo can be generated by some RS-232/RS-485 converters or by the SACO 100M device. Note. The default setting is no echo.
Klinkmann Automation SPA Bus Server 15 Configuration File Location When the SPA Server starts up, it first attempts to locate its configuration file by, first checking the WIN.INI file for a path that was previously specified. If the path is not present in the WIN.INI file, the Server will assume that the current working directory is to be used. To start the Server from an application directory configuration file other than the default configuration file a special switch (/d:) is used.
Klinkmann Automation SPA Bus Server 2. 16 To modify an existing topic, select the topic name and click on Modify. To define a new topic, click on New. The "Topic Definition" dialogue box will appear: 3. Enter the Topic Name. Note: If using InTouch the same Topic Name is to be entered in the "Add Access Name" dialogue box described in the Using the SPA Server with InTouch section. 4. Click on the ComPort button to associate a communication port with the topic.
Klinkmann Automation SPA Bus Server 17 10. Set the Send Date & Time to enable or disable Date and Time transfers and enter interval between Date/Time transfers. Date/Time transfer may be enabled only if the topic corresponds to SACO 100M device and should not be enabled for other SPA bus devices. 11. Set the event File Name. Enter file name where events will be saved. Several topics may use the same event file.
Klinkmann Automation SPA Bus Server 18 Item Names The SPA Server uses an item/point naming convention, based on the format of SPA bus master messages. The SPA Server item names also must fit inside the range of data categories and bus codes defined in the SPA Server Unit Definition File (see SPA Server Unit Definition File section below) for the appropriate unit (device).
Klinkmann Automation SPA Bus Server 19 There are also following additional items: F, f An -- Slave identification code, Message; -- Alarms, Message, Read Only, where n is a channel number, n value can be 0 ... 999. These items are used for requesting the current alarms for the channel. Supported data categories, the range of channels, data numbers and value limits depend on SPA unit (device) associated with the topic. To know which channels and bus codes (i.e.
Klinkmann Automation SPA Bus Server 20 The ITEMCOUNT item is an Integer type Read Only item used to access the number of active items in the corresponding topic. The range of valid values is from 0 to 2147483647. ERRORCOUNT The ERRORCOUNT item is an Integer type Read Only item used to access the number of active items with errors in the corresponding topic. The range of valid values is from 0 to 2147483647.
Klinkmann Automation SPA Bus Server 21 The following examples show the invalid item names: ID2.0, SI2.0, MM2.1000000 OI1000.2, VD1203.2, A2001 IU0.16, Md2.8, Sr10.1 d110, w183, l10, U22, m001 -- Data number is out of range; -- Channel number is out of range; -- Invalid data type; -- Invalid data category. SPA Server Unit Definition File The SPA Server Unit Definition File (file name Unit.def) contains the list of supported SPA units, available data categories and bus codes for each unit.
Klinkmann Automation SPA Bus Server 22 7. Max value - the maximum write value for integer or real parameters or the maximum length of string for Message type parameters; not supported if Data type is Discrete; ! -- the start character of comment. One or more spaces or tabs should separate the fields of bus code definition. The maximum length of one row is 125 characters and there must be at the end of each row. Both uppercase and lowercase letters can be used.
Klinkmann Automation SPA Bus Server 23 Click on Add…. The "Add Access Name" dialogue box will appear: Note. If Add is selected, this dialogue box will be blank when it initially appears. Data has been entered here to illustrate the entries that are made. The following fields are required entries when entering an Access Name Definition: Access Name Enter an arbitrary name that will be used by InTouch to refer to the topic.
Klinkmann Automation SPA Bus Server 24 When to advise server Select Advise all items if you want the Server program to poll for all data whether or not it is in visible windows, alarmed, logged, trended or used in a script. Selecting this option will impact performance, therefore its use is not recommended. Select Advise only active items if you want the Server program to poll only points in visible windows and points that are alarmed, logged, trended or used in any script.
Klinkmann Automation SPA Bus Server 25 To access SPA device items, the type must be I/O Discrete, I/O Integer, I/O Real or I/O Message. Select the Tag type. The "Details" dialogue box for the tagname will appear: Select the Access name for SPA Server by clicking on the Access Name: … button. The "Access Names" dialogue box will appear: Select the appropriate Access Name and click on Close. (If the Access Name has not been defined as previously described, click on Add… and define the Access Name now.
Klinkmann Automation SPA Bus Server 26 The "Details" dialogue box will appear displaying the selected Access Name: For integers fill in the Min EU, Max EU, Min Raw and Max Raw fields. These fields control the range of values that will be accepted from the Server and how the values are scaled. If no scaling is desired, Min EU should be equal to Min Raw and Max EU equal to Max Raw.
Klinkmann Automation SPA Bus Server 27 The status of communication between the Server and InTouch can be read into Excel by entering the following DDE reference formula in a cell on a spreadsheet (in following examples spa02 is the Topic Name configured for SPA Server): =view|DDEStatus!spa02 or =view|IOStatus!spa02 Using the SPA Server with OPC Clients The “OPC & DDE” version of SPA Server is accessible from OPC Clients (e.g., Wonderware OPCLink I/O Server) and DDE clients (e.g., Excel).
Klinkmann Automation SPA Bus Server 28 Below is a simple example how to configure DCOM on NT Workstations for OPC Server computer (computer name JohnB) and on OPC Client computer (computer name SteveL). Action Remote OPC Server Computer name – JohnB Install the OPC Server. Run Dcomcnfg.exe Invoke Default Properties and set Default Authentication Level to (None), Default Impersonation Level to Impersonate. Select OPC Server from Applications list and click on the Properties… button.
Klinkmann Automation SPA Bus Server Error message DCOM not installed Server execution failed Class not registered RPC server is unavailable Interface not supported Access is denied Error 80070776 Catastrophic failure Not enough storage 29 Possible reason DCOM has not been installed 1) OPC Server can not be started 2) Identity for OPC server not properly configured 3) OPC Server is not located on a local hard disk 4) OPC Server path in registry is too long or uses LFN (Long File Names) 5) DCOMCNFG Loca
Klinkmann Automation SPA Bus Server 30 To uninstall “SPA OPC & DDE Server” NT Service, at first the Service must be stopped by Control Panel/Services/Stop and then SPA Server must be started manually with command line parameter "/DelService": SPA /DelService After this the SPA Server “OPC & DDE” version will be still registered and accessible to OPC clients.
Klinkmann Automation SPA Bus Server 31 Clicking on this button initiates the browsing through exposed address space of SPA Server. The starting addresses of each available data area and names of pre-defined (additional) items will appear on “Browse OPC items:” window in alphabetical order.
Klinkmann Automation SPA Bus Server 32 Notes on Using Microsoft Excel Data from SPA topics may be accessed from Excel spreadsheets. To do so, enter a formula like the following into a cell on the spreadsheet. =SPA|topic!item Sometimes, Excel requires the topic and/or item to be surrounded by apostrophes. In the formula, topic must be replaced with one of the valid topic names defined during the Server configuration process. Replace item with one of the valid item names described in the Item Names section.
Klinkmann Automation SPA Bus Server 33 =TERMINATE(channel) Closes the channel at the end of the macro. Some applications have a limited number of channels. Therefore they should be closed when finished. Channel is the channel number returned by the previously executed INITIATE function. =RETURN() Marks the end of the macro. The following is an example of Excel macro used to poke value from cell B2 to topic node1 item iv0.3: PokeMacro -Ctrl a =INITIATE("SPA","node1") =POKE(A2,"iv0.3",B2) =ON.TIME(NOW()+0.
Klinkmann Automation SPA Bus Server 34 Troubleshooting WIN.INI entries The first time you run the SPA Server configuration, most of the items in the following list will automatically appear in the WIN.INI file. It is usually in the MS Windows system directory (e.g. C:\WINNT). It is an ASCII file and can be altered manually if you wish with any text editor, for example MS Notepad (Do not use a program that formats text, such as MS Word or Write unless the file is saved as DOS text).
Klinkmann Automation SPA Bus Server 35 Troubleshooting menu The following debugging choices are appended to the Server’s System Menu (the menu that appears when you click on the Server icon in the upper left hand corner of the Server's window): Suspend Protocol/Resume Protocol -- these choices permit you to turn protocol processing on and off, what means that you can suspend access to the SPA bus. Show Send -- if checked then all outgoing data is displayed in ASCII format.
Klinkmann Automation SPA Bus Server 36 Internal Logger To enable the SPA Internal Logger, check the Show Logger option at the SPA Server System Menu (see Troubleshooting menu section above) - this command can be used to start/stop the Internal Logger.
Klinkmann Automation SPA Bus Server 37 Options/Font To configure the font used by Internal Logger, select Options/Font… from Internal Logger main menu - the “Font” dialog box will appear: SPA Server Ver 1.x User Manual Rev 2.
Klinkmann Automation SPA Bus Server 38 KLINKMANN AUTOMATION SPA Bus Communication Server Revision History Mar 95 Rev 1.0 Apr 96 Aug 96 Sep 96 Jan 97 Apr 97 Jun97 Sep 97 Nov 99 Rev 1.1 Rev 1.2 Rev 1.3 Rev 1.4 Rev 1.5 Rev 1.7 Rev 1.8 Rev 2.0 Jan 2001 Mar 2002 May 2013 Rev 2.1 Rev 2.2 Rev 2.3 Release 1.0. The Server is tested with SACO 16D1 and OPTO22 AC7A/B Adapter Card. The SACO 16D1 unit is not supporting M and A data categories and therefore these data categories are tested only by simulating.