Home
onlinecomponents.com
Contents
1. eee nennen 1 3 PST TOM DEF ee ia du ai at a a ace aa sai 2 1 3 Example Program in CA ee eee eee eee eee aaa aaa 3 1 3 1 Variable Settings Variable Declaration eee eee 3 4 3 2 Settings for the Controller Class Constructor Declaration 3 6 3 3 Events From the Controller e eee anna 3 8 3 4 Activating Deactivating the Control Program Enable Disable the Application 3 11 3 5 Function for PCP Data Exchange Get the PCP Data From the Application 3 12 3 6 Closing the Application Program IDisposable Member 3 12 3 7 Function for Data Exchange Update the Data on the Form 3 13 3 8 Executing the Example Program eee 3 14 4 Additional Software ein ne 4 1 4 1 BUSCWITUFALION neuen 4 1 4 2 Process Data Addressing LL nenne nnnnnnennnnne nennen 4 2 4 3 HFI Device Explorer eee eee 4 2 4 4 i IRRD RR RR RP RR NR se RR PR IRI ERIE PA RR AN IRA RN NR IRI e NOR ARE RA E 4 6 4 5 HFI Code Generator eee eee eee eee aaa 4 8 4 6 lig O16 111 6 S re ee ne ee 4 11 4 6 1 Controls for the Application Program sess seeeennnnnnzznnnnzznnnnzzzznnzzz A 11 4 6 2 Functions of the Controls ssennnnnnnzznnnzznnnnznnznnanznnnnnnnnnnnnnna A 12 9 Remote Debugging seit sence ee ee ee en NNE NE RE NINE NON NNE ERA 5 1 5 1 Remote Debug Monitor eee eee eee eee eee ea nennen nnnnnenen 5 1 5 2 Acce
2. Do not create blocking programming while or integrate waiting times sleep Always use parallel threads or timers to access Forms databases etc Blocking an event blocks the complete Controller class and therefore the complete application The OnUpdateProcessData event is called cyclically at the interval set for the process data cycle time 20 ms In the ProcessDataEvent function registered in the OnUpdateProcessData event see Figure 3 11 on page 3 7 the process data is processed region ttt Events From the Controller rare TH I A aa jii 2Sutmbar fl jj Called once for each bus cycle jii lt 2 summary gt ri lt param neme state gt lt param gt private void Controller OnUpdateProcessData inbject Sender i jii TODO insert your process data handling application here if Test application for a counter if OUT Variable Value lt OUT Variable NaxValue OUT Variable Value t else i OUT Variable Value OUT Variable MinValue H Figure 3 12 ProcessDataEvent 7473_en_01 OnUpdateMailbox OnDiagnostic Controller 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Example Program in C The OnUpdateMailbox event is called cyclically at the interval set for the mailbox update time 50 ms In the MailboxDataEvent function registered in the OnUpdateMailbox event see Figure 3 11 on page 3 7 the PCP device is activated or deactivated i
3. Figure 3 24 User interface for the example program In the Controller Handling area the Controller Ready checkbox indicates that the Controller class has been started successfully The INTERBUS Handling and Diagnostic area shows the behavior of the bus e g for the Alarm Stop or Auto Start actions The Input Data and Output Data areas can be used to read the status of inputs or write outputs e To write output data activate the fields for the bit variables or enter Integer or ByteArray variables e Then click on Write Values 3 14 PHOENIX CONTACT 7473_en_01 onlinecomponenis com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Example Program in C The second page of the user interface is where PCP communication is mapped PCP communication is activated deactivated automatically by the control program see MailboxDataEvent on page 3 9 ger Demo ca 0 x Figure 3 25 User interface for the example program PCP Communication tab e Click on Read Data CR2 Data from the IB IL RS 232 terminal is read Ene Demo C 10 x ReadRequest 0x5fff DOxODDD Feadlonfirmation 0007 0200 0024 DDDA 0000 DUDU 1113 0000 0000 0000 Figure 3 26 PCP data read 7473_en_01 PHOENIX CONTACT 3 15 THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG e Click on Write Data CR2 The Baud Rate parameter for the IB IL RS 232 terminal is initialized at 19200 LEJHFI Demo c 0 x
4. public Varoutput MODULE 1 OUT public varuutput MODULE 2 OUT public Var utput MODULE 5 OUT fendregion fregion Create PCP variables public PoP NODULE 5 fendregion Figure 4 4 7473_en_01 TLETT new new new OO Da Po m p I Baa aa am Device Description Consecutive Number BE D Mame Dia WO Lengt Byte BIE ma Assignment im Change Device Description Interface Type Device Number gt 7 Presentation Group Humber Parameter Channel Station Name Service info Assign Individually Device Hame Manufacturer Hame Device Type Order Ho Undefined ID code 220 dec Profile Humber p hex Process Data Channel fi 6 Bit Parameter Channel 2 Words Sep Isolated disconnection flat active Gray out device F Box Presentation mea m Q B 6 Var Input O PD Length WMord 16 0 Varlnputi PD Length DWord 3 2 0 Var Input 6 PD Length Word 16 0 VaroutputiD PD Length Word 16 0 VarOutput 2 PD Length DWord 32 0 VarOutput 6 PD Length Word 16 0 POP MODULE 5 ali INTERBUS parameters in CMD PHOENIX CONTACT 4 7 HFI PROG 4 8 PHOENIX CONTACT 4 5 HFI Code Generator onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS The HFI Code Generator tool uses a CSV file and a selected template to create an operational application with all the var
5. Controller Board SVC File Physical Play ILB ETH 24 DI16 DIO16 2TX For a logical bus configuration via CMD the controller board must have been parameterized at least once with CMD and the parameterization must have been saved In plug and play mode the controller board reads the connected bus configuration and stores this configuration permanently in the memory This stored configuration is used during startup with a logical configuration For parameterization with the generated SVC file service file the control PC writes the firmware services contained in the SVC file to the controller board This option is ideal if CMD is not available on the control PC e g for a series production machine For a physical bus configuration CMD and plug and play mode are not required The controller activates the connected bus configuration as the valid configuration frame This option is primarily used for tests during the configuration phase This means that the control program can be restarted again immediately following a change in the bus configuration without having to modify the CMD configuration every time The user must ensure that the process data addressing corresponds to the existing bus configuration PHOENIX CONTACT 4 1 THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG 4 2 Process Data Addressing In order to generate a CSV file with process data addressing the following software tools can be used depending on
6. Logging and Instrumentation Application Block Both products are available from Microsoft free of charge 7473_en_01 PHOENIX CONTACT 5 3 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG 5 4 PHOENIX CONTACT 7473_en_01
7. oana hex F BASF M PESULT Diagnostic Parameter Register lI Create Config C SVRESULT 0o00 hes Activate Config DE RESULT Current INTERBUS Cycle Time WARNING 23 ms Start Data Transfer Alarm Stop F QUALITY SDSI Confirm PF Faults Lonfirm Diagnostic DETECT he RUN M ACTIVE M READY Controller Revision Info Figure 4 12 Controls ctrlIBS_Diag THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Control le Controller Ready l Controller Error Watchdog Occurred Enable Disable Auto Start Watchdog Clear 7473_en_01 THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Additional Software ctriMessageClient Read PCP and firmware telegrams in the active application Controller INTERBUS PCP Communication Process Data _chiMessageClent1 Available Objects 2 Properties Message Client List Mame intemal FL IL 24 BK Int FL IL 24 BE Ta DULE 5 Diagnostic Active True Receive Data Timeout 2 State fide Send Data Time Estimated Receiwe Data Time 27 11 2006 14 55 03 27 11 2006 1455 11 Figure 4 13 Controls ctriMessageClient ctriVarinput Read the properties of an input object see Figure 4 14 ctriVarOutput Read and write the properties of an output object Controller INTERBUS PCP Communication Process Data cti arlnpat _ctrh ar utput Available Objects 3 Input Properties Available Objects 3 Output Properties Object List Variable Type Juins3 Object List Variable
8. 13 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG 3 8 Executing the Example Program The main program points have now been considered and or adapted You can now execute and test the program Translate the program and start it The program user interface is opened e Inthe Controller Handling area enter the IP address of the controller board e Start the Controller class by clicking on Enable HHF Demo c Controller PCP Communication Type FL IL 24 BE Connection 172 16 252 191 Enable Controller Ready Controller Error Disable Figure 3 23 Setting the IP address and activating the Controller class Controller Handling Figure 3 24 shows the entire user interface for the example program 101 x EJHrI Demo c Controller PCP Communication Type JFL IL 24 BK Connection 172 16 252 131 Enable IV Controller Ready Controller Error Disable INTERBUS Handling and Diagnostic Alarm Stop IV INTERBUS Ready INTERBUS Detect 0002 Parameter Register TR 17 INTERBUS Active I INTERBUS PF ee e 7 INTERBUS Run J INTERBUS Bus Fail M Controller Handling Input Data read only Output Data read write Boolean Yariables Boolean Variables Bio F Biti sto M Biti Integer Variable Integer Yariable D hex CE hex ByteArray Variable Byte rray Variable 00 00 00 00 hex 00 00 00 FE hex Write Values
9. Surman yo Called once for each mailbox cycle Pf surnar yo i lt param name Sender gt lt param private void Controller OnUpdate ailboxiobject Sender i ij Enable Disable the PCP Device if iController IBS Diag Statuskegister RUN if lPCP RS232 1 Ready amp amp PCP RS232_ 1 Error PCP RS232 1 Enable H else i if PCP R3232 1 Ready PCP RS232 1 Errar PCP R3232 1 Disable i jii TODO insert your mailbox handling here is called once for each MX cycle Figure 3 13 MailboxDataEvent The OnDiagnostic event is called on a change in the diagnostic status of the Controller The DiagnosticRun function registered in the OnDiagnostic event see Figure 3 11 on page 3 7 displays the current diagnostic message in a non blocking message box jii 2Surtmbar fl fff Called whenever an error occurs in the controller object jii lt 2 summar y gt jii lt param name Sender gt lt param jii lt param name Diagqnostic gt lt param private void Controller OnDiagnostic object Sender Diagnosticirgs Diagnostic ode ff Shows each error message Utril MessageBoxShow Sender Diagnostic jii TOLO your error handling can be inserted here Figure 3 14 DiagnosticRun PHOENIX CONTACT 3 9 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG OnReadConfirmation OnWriteConfirmation OnDiagnostic PCP PHOENIX CONTACT The OnReadConfirmationReceived event is called if
10. Type lings Input 0 0 UlntE3 Output 0 0 Ulnt6s Input 2 0 UlntE3 variable Length Output 2 0 LIIntE2 variable Length Input 6 0 LIlntbi Output 6 0 LIIHtE3 Minimum Wale Minimum Wale Maxim Value Maximum Value Base Address Base Address Byte Length Byte Length Bit Offset Bit Offset Data Data Actual Value fo T hes Actual Value fo hes Actual State False Actual State False Figure 4 14 Controls ctriVarinput ctrlVarOutput When the EditActivate property is set the Actual Value output variable value of the selected output object can be edited 7473_en_01 PHOENIX CONTACT 4 13 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG 4 14 PHOENIX CONTACT 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Remote Debugging 9 Remote Debugging Initial debugging can often be completed on the local development computer However since some problems only occur in the test or production environment debugging within this environment is also required Microsoft provides the Remote Debugger as part of Visual Studio Net It can be used to debug an application on another computer IS The information below is provided by the company Microsoft Corporation 5 1 Remote Debug Monitor In order to work with the Remote Debug Monitor install the Machine Debug Manager via the Visual Studio Net setup You can either install a full version of Visual Studio
11. complete project Generate Project or only the variables Generate Variables If a project already exists you only need to generate the variables In this case a window opens following generation which displays all generated variables They can then be copied from this window for further processing in a project e Confirm your entries with Next gHr Code Generator Ioj x Project or Yar able generation h d j Fi 52003 CS ETH BE DIE DOA 52003 CS FL IL 24 BK 52003 CS IBS PCI SET C Generate Variables 52003 VB ETH BK DIE DO V5 2003 VB FL IL 24 BK 52003 VB IBS PCI SC I T is Generate Project Controller Connection i 7216 282 191 l About lt Back Next gt Exit Figure 4 7 Template and IP address for the FL IL 24 BK PAC e Inthewindow that opens select the path for the CSV file gHr Code Generator ioj x Setthe Project Directory ay F Project Directom Dacuments and Settings pberl 7iMy DocumentWW52003 CS FL IL 24 BE A About lt Back Mewt gt Exit Figure 4 8 Select path 7473_en_01 PHOENIX CONTACT 4 9 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG e Inthewindow that opens click on Generate and generate the source code for an example project adapted to your controller board ine Code Generator Ioj x Generating the Source U Fu Click on lext ta generate the source code W Launch IDE Ta
12. connected to the supported hardware in your control program 1 2 HFI Interface for Data Access in the Field HFI High Level Language Fieldbus Interface The object oriented and NET capable HFI user interface can be used by a Windows XP based PC control program to read and control data from the field I O signals and diagnostic data can be accessed from every NET application via a class library At signal level the HFI library supports PCI cards with direct INTERBUS master and bus couplers with Ethernet connection and the Ethernet gateway from the Factory Line product range see also Supported controller boards on page 1 2 The PC control program functions can be integrated easily All data access is performed via registered variables and diagnostic messages are processed automatically by the classes In addition information can be transferred directly from the INTERBUS bus configurator CMD IBS CMD SWT G4 E Order No 2721442 PHOENIX CONTACT 1 1 THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG 1 3 System Requirements Table 1 1 provides an overview of the environment required for HFI 1 1x or HFI 2 0x and the development system that is compatible for each version Table 1 1 System requirements for HFI Product Setup Development System HFI 1 1x Windows XP SP1 Microsoft Visual Studio 2003 NET Framework 1 1 SP1 CH 2003 VB 2003 SharpDevelop free of charge HFI 2 0x Windows XP SP1 Microsoft Visual Stu
13. discretion and without giving prior notice insofar as this is reasonable for the user The same applies to any technical changes that serve the purpose of technical progress The receipt of technical documentation in particular data sheets installation instructions manuals etc does not constitute any further duty on the part of Phoenix Contact GmbH amp Co KG to furnish information on alterations to products and or technical documentation Any other agreement shall only apply if expressly confirmed in writing by Phoenix Contact GmbH amp Co KG Please note that the supplied documentation is product specific documentation only and that you are responsible for checking the suitability and intended use of the products in your specific application in particular with regard to observing the applicable standards and regulations Although Phoenix Contact GmbH amp Co KG makes every effort to ensure that the informa tion content is accurate up to date and state of the art technical inaccuracies and or printing errors in the information cannot be ruled out Phoenix Contact GmbH amp Co KG does not offer any guarantees as to the reliability accuracy or completeness of the infor mation All information made available in the technical data is supplied without any accompanying guarantee whether expressiy mentioned implied or tacitly assumed This information does not include any guarantees regarding quality does not describe any fair mark
14. the controller board used HFI Device Explorer which is installed with the HFI setup CMD which must be installed separately IBS CMD SWT G4 E Order No 2721442 Table 4 2 Software tool for process data addressing depending on the controller HFI Device Explorer board IL ETH BK DI8 DO4 2TX PAC pene ILB ETH 24 DI16 DIO16 2TX No IS For Inline Block IO module addressing please refer to the corresponding data sheet For information on further processing of data in the HFI Code Generator please refer to HFI Code Generator on page 4 8 4 3 HFI Device Explorer The HFI Device Explorer tool can read the connected bus configuration of a supported controller board Table 4 3 Controller boards supported by the HFI Device Explorer FL IL 24 BK B PAC FL IL 24 BK PAC IL ETH BK DI8 DO4 2TX PAC 4 2 PHOENIX CONTACT 7473_en_01 7473_en_01 IS onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Additional Software Configuration data can then be entered directly in your development environment or written to a CSV file e Open the HFI Device Explorer e Click on Add Device or Edit Device to open the Edit Device Parameter window e Enter the device name and IP address e Set the operating mode for the controller board From the three possible controller board operating modes the HFI requires Expert Mode For the controller boards listed in Table 4 3 there are various options fo
15. the directories required for operation and copies the files for the HFI Make sure the required driver is installed on your PC see Software Requirements on page 1 3 Notes on Software Inthe Start menu select Start Programs Phoenix Contact DotNet Framework to access example projects and HFI tools The required assemblies for the libraries are located in the following directory DotNet Framework HFI DotNet Libraries The file names for the assemblies have the extension _FX11 _FX20 etc This extension indicates the Net framework for which the relevant assembly is approved FX is the abbreviation for framework the subsequent information specifies the framework version e g 11 for 1 1 7473_en_01 PHOENIX CONTACT 2 1 THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG Structure of an HFI Application With Possible Controller Boards Windows Forms Application Main program frmMain Varinput VarOutput a ie IBS G4 controller controller boards e g PCI card Control program App_xy Driver interface Ethernet Driver interface PCI card Controller boards IBS PCI SC I T FL IL 24 BK ae ru Figure 2 1 Structure of an HFI application 2 2 PHOENIX CONTACT 7473 en 01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Example Program in C 3 Example Program in Cf The example was created using Microsoft Visual Stud
16. there is PCP data available for processing The PCP_RS232_1_ReadConfirmationReceived function registered in the OnReadConfirmationReceived event see Figure 3 11 on page 3 7 is used to transfer the PCP data to a data memory for further processing fii SUNA y gt ji Called for each successfull read confirmation ji lt summary gt lt param name Sender z par atil lt param name Data z par alil private void PCP RS232 1 Beadconfitmationkeceivediobject Sender hyte Data i jii TODO insert your code here locki pepReadBuffer i _pepReadBuffer new Eyte Lata Length _pepReadBuffer Data Figure 3 15 PCP RS232 1 ReadConfirmationReceived The OnWriteConfirmationReceived event is called when the PCP device confirms a write service The Data data for the PCP RS232 1 WriteConfirmationReceived function registered in the OnWriteConfirmationReceived event see Figure 3 11 on page 3 7 can be used to determine whether the write service was successful or not ii Sular y gt ji Called for each successfull write confirmation fii Ef summer y gt lt param name Sender gt lt param gt jj lt param name Data param private void PCP RS232 1 WriteContirmationReceived ohject Sender hyte Data i jii TODO insert your code here locki pepWriteBuffer i _pepWriteBuffer new Byte Data Length _pepWriteBuffer Data l Figure 3 16 PCP RS232 1 WriteConfirmationReceived The OnDiagnostic event is
17. variables for the output data if First output terminal DO 16 public VarOutput public VarOutput public VarOutput OUT Bit O nei OUT Bit 1 fnew OUT Variable new jj Second output terminal DO i public VarOutput OUT Byted rray new if POP terminal outputs E5232 terminal public VarOutput Figure 3 7 OUT RS232 1 new Output variables Varoutput 0 Yardutput 0 Varoutput 0 VarOutput iz Varoutput 5 FD Length Word 1 FD Length Word 1 FD Length Word i 4 FD Length Word 16 FD Length Word 1 FD Length Word 1 FD _ Length Word i d FD Length Word 16 e Adapt the variable declaration for the variables for PCP communication ji Create the variables for the PCP communication CR public PCP POP RS232 1 new PCPIUESZ3Z 1 als private byte _pepReadBuffer new byte U private byte _pepWriteBuffer new byte U Figure 3 8 Variables for PCP communication IRSZ3Z2 terminal PHOENIX CONTACT Ol 1 4 Ol Ol 1 4 Ol 3 5 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG fid fid if if if ik 3 2 Settings for the Controller Class Constructor Declaration The settings for the Controller class are made in the constructor e Adapt the settings reqion Constructor declaration Fees e ee eee eee TATA RTA TAA TAA ae tif O SUNA l if Constructor jii lt summary gt public A
18. Controller HFI class which corresponds to the controller board used Remove the comment characters for the corresponding entry The entries for the other controller boards should be commented out Inthe example the FL IL 24 BK PAC bus coupler is used as the controller board O namespace HFI Demo fff lt summary gt i Summary for frm ain f f lt summary gt public class frm ain System Windows Forms Form ij Create the instance from a select controller class if TODO Please select you controller type App IBS PCI SC IT myApplication new App IBS PCI SC ITI App ETH BE DIS Doq4 myipplication new App ETH BE DIS DQA _IL 24 my pplication _FL_IL 242 App ILB ETH 24 DIl6 DIOl6 mwipplication new App ILE ETH 24 DI 16 DIO16i Figure 3 2 Integrated program libraries e In Solution Explorer open the class with the example program for your controller board For the FL IL 24 BK PAC bus coupler this is App FL IL 24 BK cs Solution Explorer Solution HFI Cem M X La Solution HFI Demo CS 1 project F HFI Demo CS Fl La References es D HFI Librarv FXI q mm 3 HFI isu Fall er 42 System 42 System Data HZ System Drawing HZ System Windows Forms es HI System XML SE App ETH BK DIS DO4 cs gage Spp FL IL 24 BK cs e E App IBS POESC L T cs SE AppdILB ETH 24 DI16 DIO16 cs AssernblyInfo cs H Es frmMain ca Solution Explorer Claes View Figure 3 3 Open
19. Controller PCP Communication Enable CR IV PCF Ready 7 PCP Error Disable CA2 Read Data CRZ M FeadDiataalid kiri h Hz e WrriteD ataDone ReadRequest Dx5fff 0x0000 ReadConfirmation 0007 0200 0024 ODDA 0000 0000 1113 0000 O000 0000 WriteRequest Ox5fff 2 DB WriteConfirmation 8082 0002 0002 0000 Figure 3 27 PCP data written e Clickon Read Data CR2 Reading the data again shows the change made by writing The first word contains the new setting 0008 EJHFI Demo c 0 x Controller PCP Communication Enable CR IV PCF Ready PCP Error Disable CA2 Read Data CR M FeadDiataalid write Data CR2 he WrriteD ataDone ReadRequest Ox5fff 0x0000 ReadConfirmation 0007 0200 0024 ODDA 0000 0000 1113 0000 O000 0000 WriteRequest Ox5fff 2 05 Writelonfirmation 5052 0002 0002 0000 FeadFequest 0Ox5fff 0Ox0000 ReadConfirmation NS 0024 ODOA 0000 0000 1113 0000 0000 0000 Figure 3 28 PCP data read again 3 16 PHOENIX CONTACT 7473_en_01 THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Additional Software 4 Additional Software Logical configuration LogicalConfiguration Via CMD Via plug and play Configuration via SVC file SvcFileConfiguration Physical configuration PhysicalConfiguration 7473_en_01 4 1 Bus Configuration Depending on the controller board used there are various options for configuring the bus Table 4 1 Bus configuration options
20. For all other controller boards the required drivers are installed automatically during installation of the HFI see Section 2 Setup for the HFI 1 6 Available Example Programs in C Table 1 3 shows which example program can be used for which controller board Table 1 3 Available example programs in Cf Example Name Supported Controller Boards HFI Demo CS sin Startup of a controller board IBS PCI SC l T with INTERBUS startup IBS PCI 104 SC T I O data exchange and PCP FL IBS SC I T communication FL IL 24 BK B PAC FL IL 24 BK PAC IL ETH BK DI8 DO4 2TX PAC HFI Demo ILB CS sin Startup of an Inline Block IO ILB ETH 24 DI16 DIO16 module with I O data exchange 1 7 Additional Documentation The Reference Manual for the HFI user interface is only available as online help This online help essentially provides an overview of all available classes For additional information please refer to the Firmware Services and Error Messages user manual IBS SYS FW G4 UME Order No 2745185 PHOENIX CONTACT 1 3 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG 1 4 PHOENIX CONTACT 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Setup for the HFI 2 Setup for the HFI The setup is available on the CD PCI DRIVER CD Order No 2985589 or at www download phoenixcontact com in the area for the supported controller board The installation program generates all
21. J PHOENIX CONTACT onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS 5 2 Accessing the Application Using Your Own Instance If the remote computer is set up then you can access the application using your own instance of Visual Studio NET The application to be debugged must be on the remote computer If not copy the relevant files to this computer The output path for the development project must correspond to the path on the remote computer Modify the output path for the development project if required The files currently in this path must be transmitted 1 1 to the remote computer It may be useful to enable the directory on the remote computer To debug an application proceed as follows within Visual Studio NET IDE e Open the project file for the application e Access the properties of the application via the Project Properties menu e Select the Debug category in the Configuration Properties folder of the Properties window e Set Enable Remote Debugging to true e For the remote computer setting enter the computer name or the IP address of the remote computer e If debugging is to be executed in mixed mode managed and unmanaged set Enable Unmanaged Debugging to true e Ensure that the output path under Configuration Properties Create Outputs corresponds to the path on the remote computer e Click OK to save the changes You can now start debugging the application e F
22. Net or select Remote Components Setup in the main menu of the installation routine Two options are available here Native Remote Debugging Installs components which enable a debugger to establish a connection exclusively for debugging native code Full Remote Debugging Installs components which enable a debugger to establish a connection for debugging Native code Managed code which is executed in the CLR Common Language Runtime Scripts VB script or JScript If SQL Server is installed on the computer components for remote SQL debugging are also installed If you want to debug C or VB code select the second option This installs all the files required for remote debugging on the system As soon as the components for remote debugging are installed set the system access rights to enable sufficient access Debugging a process from another user You require administrator rights for the computer on which the process is running This is true whether you are directly accessing a user s application or working with a web application which accesses the aspnet_wp exe process Debugging your own process You must be the administrator or a member of the Debugger Users group If you are working with your own code or process you can simply add your name to the Debugger Users group on the remote system The computer is then ready for remote debugging 7473_en_01 PHOENIX CONTACT 5 41 HFI PROG 5 2 C
23. OUT Bit 11 iddobject OUT Variable iddobject OUT Bytedrray iddobject OUT Ra2s2 1 objects to the controller AddOhject PCP Ra232 1 ControllerConnection Adding variables Creating callbacks In the following program part callbacks event controlled functions are created ji Callbacks for the controller jii Called once for each bus cycle Controller OnUpdateProcessdata jii Called once for each mailbox cycle Controller OnUpdate ailbox gt new UpdateProcessDataHandler Controller OnUpdateProcessDatal d new OpdateMailboxHandler Controller OnUpdateMailbox if Called whenever an error occurs in the controller object Controller OnDiagnostic fi Events from PCP 2 PCP BBE3Z 1 0nEnableReady PCP BBE3 1 0nReadContirmationReceived PCP RS232_ 1 OnWritelonfirmationReceived POP RS232_ 1 0nDiagnostic Figure 3 11 7473_en_01 d new DiagnosticHandler Controller Onbiagnostic new EnableReadyHandler PCP R5232_ 1 OnkEnableReady new ContirmationReceiveHandler PCP Ra232 1 ReadConftirmationReceived new ConftirmationReceiveHandler PCP RS232 1 Writelonfirmationkeceived new DiaqnosticHandler PCP RS232 1 Onbiagnostic Creating callbacks PHOENIX CONTACT 3 7 HFI PROG OnUpdateProcessData 3 8 PHOENIX CONTACT onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS 3 3 Events From the Controller Notes on Events Only register events which are required
24. THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS AUTOMATIONWORX HFI 00220 PCI Ethernet iNTERBUS INTERBUS IO DOOR lis 8 2 B Co BSESSSRSSR las S Ethernet lO Quick Start Guide UM QS EN HFI PROG Order No 2910240 Programming in High Level Language Using the HFI User Interface II TIT I II TIT jo ON INSPIRING INNOVATIONS THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS AUTOMATIONWORX Quick Start Guide THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Programming in High Level Language Using the HFI User Interface Designation UM QS EN HFI PROG Revision 01 Order No 2910240 This user manual is valid for Designation HFI HFI 7473_en_01 05 2007 Version 1 1x 2 0x PHOENIX CONTACT onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG Please Observe the Following Notes In order to ensure the safe use ofthe product described we recommend that you read this manual carefully The following notes provide information on how to use this manual User Group of This Manual The use of products described in this manual is oriented exclusively to qualified application programmers and software engineers who are familiar with the safety concepts of automation technology and applicable standards Phoenix Contact accepts no liability for erroneous handling or damage to products from Phoenix Contact or third party products resulting from di
25. called on a change in the PCP status of a PCP object The PCP RS232 1 OnDiagnostic function registered in the OnDiagnostic event see Figure 3 11 on page 3 7 displavs the current diagnostic message in a non blocking message box ii 2Sutbiar y gt jj Called whenever an error occurs in the pep object fii Ef summer y gt ri lt param neme Sender gt lt param jj lt param name Diagqnostic gt lt param private void PCP BS 3 1 Onbjagnostie object Sender Diagnosticirgs Diagnostic i jj Shows each diagnostic message Utril MessageBoxShow Sender Diagnostic ij Your diagnostic handling can he inserted here Figure 3 17 PCP RS232 1 OnDiagnostic 7473 en 01 OnEnableReady Enable Disable 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Example Program in C The OnEnableReady event is called when a connection Initiate has been established with the PCP device 3 4 Activating Deactivating the Control Program Enable Disable the Application In the following program part a method is set for activating the control program region Enable Disable the Application ffthfthitittitirr jii 2Sumtmbar y gt ti This method enables the controller and the PCP devices jii 2 summary gt public void Enablet Controller Enable Figure 3 18 Activating the control program In the following program part a method is set for deactivating the control program ii Sula
26. ccess the context menu and select Write When asked Enable read back of the current project file select No e Generate a SVC file for the bus configuration To do this right click on Parameterization Memory to access the context menu and select Write ASCII File INTERBUS Data SVC e Save the SVC file e Generate a CSV file for the code generator To do this right click on Parameterization Memory to access the context menu and select Write ASCII File Project Data CSV Select all options apart from Comment e Save the CSV file The generated CSV file is required for code generation 7473_en_01 THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Additional Software The information displayed for the variables can be entered in the variable declaration for the program Figure 4 3 shows the relationship between the data in the HFI Device Explorer A and in the example program B 3 Process Data EI x EN DIA II Me Proce oO Signal paths 6 11 16 Bit Ausgang 1 Digital O 16 La 12 32 Bt_ amp usgang_1 Digital 32 3 12 16 Bit_Eingang_1 Digital I 16 Fa 14 32 8t_Eingang_ 1 Digital 32 15 16 Bit_Eingang_1 amp nalog l 16 el 15 IB Bit Ausgang 1 Analag 0 16 region Create input wariables public War Input MODULE 3 IN public Varlnput NODULE 4 IN public YarlInput MODULE 5 IN fendregion New new New firegion Create output variables
27. continue click Mest About lt Back Next gt Exit Figure 4 9 Select path e Open the created application with your development system You can add your application program to the generated INTERBUS program part To create your application refer to the documentation for the development system used 4 10 PHOENIX CONTACT 7473_en_01 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Additional Software 4 6 HFI Controls 4 6 1 Controls for the Application Program Predefined controls provide quick and easy access to the key functions of the HFI The controls provide user friendly diagnostic and test options e g for the Service menu in your application Just a few lines of code are required to start up or test a Controller class The available example programs illustrate clearly how the controls and the HFI can be used To use the controls in your application program insert a reference to the HFI Visu component in your project Choose Toolbox Items x NET Framework Components com Components Name Namespace Assembly Name CrystalReporty iewer CrystalDecisions Web CrystalDecisions Web 10 2 3681 fagct Controller hoenixContact HFl 5 11 1 1 0 0 ie Ao intact HFL visualization X11 1 1 0 0 gicriMessagetlient ihoenixContactHFI 5 11 1 1 0 0 fact MarInput u intact HFI W zation xii 1 1 0 0 FI Burgen PhoenixContact HFL V
28. dio 2005 NET Framework 2 0 C 2005 VB 2005 Visual Studio Express free of charge SharpDevelop free of charge It is assumed the user has experience in Microsoft Windows operating systems and the I listed Microsoft programs Example projects are available on the Internet e g at www codeproject com and www csharp com 1 4 Supported Controller Boards Table 1 3 lists all the controller boards supported by the HFI user interface Table 1 2 Supported controller boards Description Order No Controller board for PC systems with PCI bus 2725260 Controller board for PC systems with PCI 104 bus 2737494 Ethernet Inline bus coupler 2862327 Ethernet Inline bus coupler 2862314 Inline bus coupler for Ethernet with eight digital inputs and four digital IL ETH BK DI8 DO4 2TX PAC 2703981 outputs Inline Block IO module for Ethernet with 16 digital inputs and ILB ETH 24 DI16 DIO16 2TX 2832962 16 digital inputs or outputs un 2 PHOENIX CONTACT 7473_en_01 IBS PCI SC I T IBS PCI 104 SC T Other controller boards 7473_en_01 THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS General 1 5 Software Requirements In order to work with the HFI interface for these controller boards the following driver must be installed on your PC Win2000 XP PCI 205 exe or later The driver is available on the CD PCI DRIVER CD Order No 2985589 or at www download phoenixcontact com in the area for the supported controller board
29. ed parameter 5 Communication reference CR INTERBUS parameter PCP PHOENIX CONTACT If you know the data for the INTERBUS parameters enter it at the relevant points If you do not know the parameters they can be generated Use the HFI Device Explorer see HFI Device Explorer on page 4 2 or CMD see CMD on page 4 6 The user defined parameters are generally specified by the user These parameters can be used to address the modules as an overall object or to define individual objects which comprise one or more bits The HFI Code Generator see HFI Code Generator on page 4 8 can be used to generate the source code However single bit addressing is not supported here The modules are addressed as an overall object with the generated start address 7473_en_01 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Example Program in C e Adapt the variable declaration for the input variables if Create the variables for the input data if First input terminal DI 16 public VarInput public VarInput public VarInput IN Bit D nei IN Bit 1 fnew IN variable NE f Second input terminal DI 32 public VarInput IN Bytedrray new if POP terminal inputs RS232 terminal public VarInput Figure 3 6 IN RS232 1 new Input variables Yarlnput od Yarlnput od Yarlnput DO Yarlnput iz Yarlnput 5 e Adapt the variable declaration for the output variables if Create the
30. etable quality and does not make any claims as to quality guarantees or guarantees regarding the suitability for a special purpose Phoenix Contact GmbH amp Co KG accepts no liability or responsibility for errors or omis sions in the content of the technical documentation in particular data sheets installation instructions manuals etc The aforementioned limitations of liability and exemptions from liability do not apply in so far as liability must be assumed e g according to product liability law in cases of premed itation gross negligence on account of loss of life physical injury or damage to health or on account of the violation of important contractual obligations Claims for damages for the violation of important contractual obligations are however limited to contract typical pre dictable damages provided there is no premeditation or gross negligence or that liability is assumed on account of loss of life physical injury or damage to health This ruling does not imply a change in the burden of proof to the detriment of the user 7473_en_01 PHOENIX CONTACT HFI PROG PHOENIX CONTACT onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Statement of Legal Authority This manual including all illustrations contained herein is copyright protected Use of this manual by any third party is forbidden Reproduction translation and public disclosure as well as electronic and photographic archivin
31. g or alteration requires the express written consent of Phoenix Contact Violators are liable for damages Phoenix Contact reserves all rights in the event of a patent being granted in as far as this concerns software of Phoenix Contact that meets the criteria of technicity or has technical relevance Third party products are always named without reference to patent rights The existence of such rights shall not be excluded Windows 3 x Windows 95 Windows 93 Windows NT Windows 2000 and Windows XP are trademarks of the Microsoft Corporation All other product names used are trademarks of the respective organizations Internet Up to date information on Phoenix Contact products can be found on the Internet at www phoenixcontact com Make sure you always use the latest documentation It can be downloaded at www download phoenixcontact com A conversion table is available on the Internet at www download phoenixcontact com general 7000_en_00 pdf 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Table of Contents l GERCO ee ee TR S ee 1 1 1 1 Purpose of This Quick Start Guide eee eee 1 1 1 2 HFI Interface for Data Access in the Field eee 1 1 1 3 System Requirements eee eee eee eee eee 1 2 1 4 Supported Controller Boards eee eee eee 1 2 1 5 Software Requirements eee eee na nana 1 3 1 6 Available Example Programs in Cp eee 1 3 1 7 Additional Documentation
32. h the HFI Expert Mode must be activated for all controller boards If Expert Mode is not activated errors will occur during startup 3 6 PHOENIX CONTACT 7473_en_01 THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Example Program in C Please note the following 1 FL IL 24 BK PAC and FL IL 24 BK B PAC bus couplers In the program code deactivate Expert Mode false Activate it instead via the HFI Device Explorer see HFI Device Explorer on page 4 2 IL ETH BK DI8 DO4 2TX PAC bus coupler Activate Expert Mode either in the program code true default setting or via the HFI Device Explorer All other controller boards Activate Expert Mode in the program code true default setting Inthe example a FL IL 24 BK PAC is used which is why Expert Mode is deactivated in the illustrated example program code Adding variables In the following program part the variables which were created and addressed above are added to the Controller class and therefore registered ff Add input variables to the controller Controller Controller Controller Controller Controller iddobjectiIN Bit UD Add bjeet IN Bit 1 iddobjectiIN Variable Addohject IN Bytelrrar AddOhject IN BS23 1 f Add output variables to the controller Controller Controller Controller Controller Controller fi Add PCP Controller Figure 3 10 iddobject OUT Bit 0 iddobjecti
33. iables included in the CSV file The CSV file is generated either by the HFI Device Explorer or by CMD e Open the HFI Code Generator and follow the instructions grr Code Generator ioj x D_ nts _O_B_O CE y This Wizard will guide you throught the code generation process Requirement You need a CSY file exported fram CMD or the FL IO Explorer and the file needs to have the option Parameter Chanel set Please click on Mest to continue lt Back Mewt gt Exit Figure 4 5 HFI Code Generator Inthe menu select the checkboxes for the data that you require e Clock on Read CSV File gHr Code Generator Ioj x Reading the exported C5Y File from MD or the HA Derice i A Explorer a LA As a first step the COV file haz ta be read If the import process fails fone of the checkboxes below will stay unchecked please check the delimiter options OSY Settings and ensure that the file contains the Parameter Channel option Read LS File CSW Settings C tesh caw Objects read T E E 1PLP CSY Analysis MW Read RawData W Raw Data Filterable e Transform Raw Data About lt Back Hegt gt Exit Figure 4 6 Read CSV file 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Additional Software e Select the template e g VS2003 CS FL IL 24 BK e Enter the IP address e Specify whether you want to generate a
34. ing the example program for the FL IL 24 BK PAC 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Example Program in C O namespace HFI Demo public sealed class App FL IL 24 BE IDisposable i Variable Declaration Fetten ah Constructor Declaration Ft eevee eee HH Events From the Controller Fe ee eee TREAT E TATE TREAT EE Re tt Enable f Disable the Application eeeeeer ease eee eee ee eae aT t Get the PCP Data From the Application ereseree sere eae eae TT kkr Disposable Member fF ee eee eee eee eee eee TART A TATA TAT HRT AT AT ee Figure 3 4 Program parts of the example program The individual program parts are described below 7473_en_01 PHOENIX CONTACT 3 3 HFI PROG 3 4 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS 3 1 Variable Settings Variable Declaration e Inthe program adapt the variable declaration to the bus configuration The variable declarations have the following parameters ok public VarInput MODULE 3 IN new VarInput 0 PD Length Word 16 0 public VarOutput MODULE 2 OUT new VarOutp t 2 PD Length DWord 32 0 public PCP MODULE 5 new PCP MODULE 5 i 5 Figure 3 5 Parameters for input and output variables Key 1 Byte address INTERBUS parameter 2 Process data length INTERBUS parameter 3 Bit length of the process data item User defined parameter 4 Bit offset of the process data item User defin
35. io If you are using another development environment adapt the example accordingly For the example the following configuration was selected The FL IL 24 BK PAC bus coupler is connected to a PC via Ethernet The following I O terminals are connected to the bus coupler IBIL24D0O 16 IBIL24D0 32 IBIL 24 DI 16 IBIL 24 DI 32 B IL 24 RS 232 Explanations for the example program are given below as well as a description of where adaptations can or should be made e Open the example project via Start Programs Phoenix Contact DotNet Framework HFI Demo CS In Solution Explorer the References folder contains the integrated program libraries HFI Library FX11 and HFI_Visu_FX11 Solution Explorer Solution HFI Dem A X TTH Li Solution HFI Demo CS 1 project EF HF Demo CS E _ References SERAF Library Fxil a AG HFI Visu FXI a System q I System Data q ia System Drawing System Windows Forms I HZ System XML E AppETH BK DIE DO4 cs hu E AppiFL IL 24 BK cs m EB App IBS PCI SC I T cs mm 8 App LB ETH 24 DI16 DIO16 cs E AssemblyInfo cs H FE frmMain cs Solution Explorer class view Figure 3 1 Integrated program libraries e In Solution Explorer open the source code for class frmMain cs 7473_en_01 PHOENIX CONTACT 3 1 HFI PROG 3 2 PHOENIX CONTACT onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS e Select the
36. isualization HFI_Wisu_FX11 1 1 0 0 CI Custormwalidator System Web UL MobileControls System Web Mobile 2 0 0 0 O Custormwalidator System Web UL Meblontrols System Web 2 0 0 0 O DatabaseLogon ist CrystalDecisions Reporting WebContols CrustalDecisians Web 10 2 3651 O Datacrid System Windows Forms System Windows Forms 2 0 0 O Datacrid System Web UL Meblontrols System Web 2 0 0 0 BA Mt ii Hana Duarte lil Doar Cr Per Dart ke lil Da Dor nem UI nel Filter aa Clear cr Controller Browse Language Invariant Language Unvariant Country Version 1 1 0 0 Retail Figure 4 10 HFI controls PHOENIX CONTACT 4 11 HFI PROG ctrIController ctrlIBS Diag 4 12 PHOENIX CONTACT 4 6 2 Functions of the Controls Read and operate the controller Controller INTERBUS PCP Communication Process Data GtiControlleri Available Objects 1 Controller List FLIL 24 BE Name FL IL 24 BE Description E BK for Dermonstaration Watchdog Deactwated Fase oo Startup FhysicalConfiguraion 00 SVE File Name a Connection String fir2te252191 Process Data Cycle po ms Mailbox 5 ms Start Addr jo End Addr fe Start Addr jo End Addr fe Input Object Counter 3 Dutput Object Counter 3 Figure 4 11 Controls ctrIController INTERBUS diagnostics and bus handling Controller NTERBUS PCP Communication Process Data _ctilBS Diagl Diagnostic Parameter Register T BSA
37. on State Idle Export Configuration Create CSV File Figure 4 2 HFI Device Explorer 4 4 PHOENIX CONTACT 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Additional Software The information displayed for the variables can be entered in the variable declaration for the program Figure 4 3 shows the relationship between the data in the HFI Device Explorer A and in the example program B A 2 8 OLO 6 O Name _ Modul No Input Address Output Address PD Length CF PCF MODULE 1 1 0 16 MODULE 2 2 ae MODULE 3 3 U 16 KALIDLILE 4 4 2 i MODULE 5 ai E b 16 2 tregion Create input variables public YarlInput MODULE 3 IN new Varlnputi0 PD Length Word 16 0 public Varlnput MODULE 4 IN new Varlnputi PD Length DWord 32 Q0 public Varlnput OLULE 5 IN new War Input 6 PD Length Word 16 0 fendregion reqion Create output variables public VarOutput MODULE 1 OUT public VarOutput MODULE e OUT public VarOutput MODULE 5 OUT new VarOutput O PD Length Word 16 0 new Yar utput 2 PD_Length DWord 32 0 new VarOutput 6 PD Length Word 15 0 tendregion region Create PCP variables public PCP MODULE 5 new PCP MODULE 3 a endregion Figure 4 3 Variables in the HFI Device Explorer and in Visual Studio The variables can also be used to generate a CSV file This can then be further p
38. pepReadbuffer Figure 3 20 PCP data exchange with the program user interface 3 6 Closing the Application Program IDisposable Member The following program part exits the control program This ensures that all connections are aborted and all processes are exited Eregian IDisposable Member public void Dispose ij i Disableti Controller Disposel fendregion Figure 3 21 Exiting the program 7473 en 01 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Example Program in Cf 3 7 Function for Data Exchange Update the Data on the Form e Switch to the frm Main cs class The following program part implements data exchange between the control program and the program user interface Do not write directly from the events to the program user interface Form Implement data exchange using a parallel thread or a parallel timer A timer is used in the example region Update the Data on the Form eee eee A AERA AAAA TRAE HG jii tsurm0ary gt ri Update the form ii lt summary gt jj lt param neme sender gt lt param ff lt param neme e gt lt param private void tmr ainFormUpdate Ticklohject sender system Event rgs E i Show the controller state chxReady Checked myapplication Controller Ready chxError Checked my pplication Controller Error i Figure 3 22 Data exchange with the program user interface PHOENIX CONTACT 3
39. pp FL IL 24 BELJ i ji Create the controller with a name Controller new Controller FL BE FL IL 24 BET jj Settings for the controller cController Description FL IL 24 BE for De emonstaration Controller Startup ControllerStartup PhysicalConftiguration 20 50 Controller UpdatefrocesslbatalycleTime Controller UpdateMailboxTime if The Controller Configuration property contains special configurations for the controller Controller Configuration ControlCP Load false Controller Configuration DNS NameResolution Crue Controller Configuration ErrLogictivate Crue Controller Configuration ErrLogFilename ce Test log Controller Configuration Expert odeictivate false Controller Configuration GetYVersionlInflo false Controller Configuration Updatelontroller tate 100 Figure 3 9 Settings for the Controller class e Set the start behavior see also Table 4 1 Bus configuration options on page 4 1 In the example PhysicalConfiguration is selected as the start behavior e Set the process data cycle time ProcessDataCycleTime 20 ms in the example e Set the update time for the mailbox UpdateMailboxTime 50 ms in the example e Set the operating mode see also Note on ExpertModeActivate on page 3 6 If no changes are made the default values are set If you remove the comment characters this activates or changes the settings Note on ExpertModeActivate To work wit
40. r activating this operating mode 1 FLIL 24 BK PAC and FL IL 24 BK B PAC bus couplers Activate Expert Mode via the HFI Device Explorer In the program code of the HFI deactivate Expert Mode false 2 IL ETH BK DI8 DO4 2TX PAC bus coupler Activate Expert Mode via the HFI Device Explorer Or Activate Default Mode via the HFI Device Explorer and activate Expert Mode true default setting in the program code of the HFI The operating mode set via the HFI Device Explorer is stored permanently on the bus coupler For the settings in the program code of the HFI see Settings for the Controller Class Constructor Declaration on page 3 6 Hadd New Device xl Device Settings Hame Test BK IF Address ee 172 16 252 191 Initialize this mode after reading configuration Default Mode is Expert Mode PrP Mode Figure 4 1 HFI Device Explorer Add New Device Edit Device Parameter window In PnP Mode the HFI cannot be used to access the bus coupler Do not select this operating mode PHOENIX CONTACT 4 3 onlinecomponenis com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG e Read the bus configuration by clicking on Read Bus Configuration p E x Files Commands Help MODULE_1 1 MODULE 2 2 2 32 MODULE_3 3 0 16 MODULE_4 4 2 32 MODULE_5 5 6 6 16 2 Add Device Edit Device Device Control Read Bus Configuration Read Configurati
41. r y gt ji This method disables the PCP devices and the controller jii lt 2 summary gt public void Disablet ij Disable the PCP devices PCP RS232 1 Disableij ij Waiting for the disconnection from the PCP terminal System Threading Thread 5Sleep Controller UpdateMailboxTime 4 ji Disables the controller Controller Disable fendregion Figure 3 19 Deactivating the control program When deactivating the control program proceed as follows e First deactivate the PCP devices by calling the Disable method e Wait until the connections are aborted by the device Observe a duration of approximately four times the set mailbox update time UpdateMailboxTime 4 e Deactivate the Controller class PHOENIX CONTACT 3 11 HFI PROG 3 12 PHOENIX CONTACT onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS 3 5 Function for PCP Data Exchange Get the PCP Data From the Application The following program part implements PCP data exchange between the control program and the program user interface Do not write directly from the OnReadConfirmationReceived event to the program user interface Form Implement data exchange using a parallel thread or a parallel timer A timer is used in the example region Get the PCP Data from the application F jii 2Sumbar y gt jji Get the PCP Read Buffer jii Li summer y gt public Byte PCP Feadlata i et i locki _ pepReadBuffer i return
42. rocessed in the HFI Code Generator e Click on Create CSV File to create a CSV file For information on further processing in the HFI Code Generator please refer to HFI Code Generator on page 4 8 7473_en_01 PHOENIX CONTACT 4 5 HFI PROG 4 6 PHOENIX CONTACT THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS 4 4 CMD CMD IBS CMD SWT G4 E Order No 2721442 can be used to read the connected bus configuration from the supported controller boards Table 4 4 Controller boards supported by CMD Type IBS PCI SC I T FL IBS SC I T Configuration data start address and process data length can then be entered directly in your development environment or written to a CSV file To create a project refer to the documentation for CMD Proceed as follows e Start CMD e Select the desired controller board e Set the communication path e Read the bus configuration e For the assignment of process data select Auto Address Startup without System coupler startup without in the Process Data dialog box e If PCP devices are present assign names for PCP devices e Set bus startup to Startup without preprocessing Always select Activate configuration frame and Start data transmission e Execute the parameterization as Startup without preprocessing e Save the project under the desired name e Save the project to the Flash card of the PCI card To do this right click on Parameterization Memory to a
43. rom the Debug file menu select Start to start the application on the remote computer You can insert breakpoints in the code within Visual Studio NET at which the remote program will interrupt execution The code can then be executed in steps or another debugging method used in order to isolate any possible runtime problems The same approach also works for other NET programming languages such as VB NET 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS Remote Debugging 5 3 Possible Problems The Remote Debugger is an excellent tool in Visual Studio NET IDE however it can still cause problems in practice It may be impossible to receive administrator rights on the remote computer System administrators become very nervous ifthey are asked to give someone administrator rights on their own computer and are similarly reluctant when it comes to installing new applications on the computer This can cause a problem above all in a production environment 5 4 Alternative Methods If you cannot work with the Remote Debugger e g because you do not have access rights for the remote computer you must choose alternative methods One alternative to debugging or monitoring code in a production application is to record runtime errors in the event log or in a corresponding database These messages can also be sent by e mail Another option is to use the Exception Handling Application Block and the
44. sregard of information contained in this manual Explanation of Symbols Used The attention symbol refers to an operating procedure which if not carefully followed could result in damage to hardware and software or personal injury The note symbol informs you of conditions that must be strictly observed to achieve error free operation It also gives you tips and advice on the efficient use of hardware and on software optimization to save you extra work The text symbol refers to detailed sources of information manuals data sheets literature etc on the subject matter product etc This text also provides helpful information for the orientation in the manual a gt We Are Interested in Your Opinion We are constantly striving to improve the quality of our manuals Should you have any suggestions or recommendations for improvement of the contents and layout of our manuals please send us your comments PHOENIX CONTACT GmbH amp Co KG Documentation Services 32823 Blomberg Germany Phone 49 52 35 300 Fax 49 52 35 34 20 21 E mail tecdoc phoenixcontact com PHOENIX CONTACT 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFIPROG General Terms and Conditions of Use for Technical Documentation Phoenix Contact GmbH amp Co KG reserves the right to alter correct and or improve the technical documentation and the products described in the technical documentation at its own
45. ssing the Application Using Your Own Instance sse seeennnenzznnenzzzznnzzs 5 2 5 3 POS IBIEPEODIENI ee ntre Bta iei ene ti ee ada ele 5 3 5 4 Alternative Methods eee eee ana nana 5 3 7473_en_01 PHOENIX CONTACT i onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS HFI PROG ii PHOENIX CONTACT 7473_en_01 1 General 7473_en_01 onlinecomponents com THE ONLINE DISTRIBUTOR OF ELECTRONIC COMPONENTS General 1 1 Purpose of This Quick Start Guide This Quick Start Guide should enable the user to implement an application program using an HFI High Level Language Fieldbus Interface which operates all controller boards supported by Phoenix Contact The supported controller boards are listed in Supported Controller Boards on page 1 2 Section 3 Example Program in C uses an example code in C to illustrate how a high level language program can be used to access the controller boards supported by Phoenix Contact via the HFI library The available example programs see Available Example Programs in C on page 1 3 can be used as a basis and adapted to meet your specific requirements For programming in Visual Basic VB the C example programs can still be used as a basis by adapting them to VB Should you have any questions please contact Phoenix Contact Section 4 Additional Software shows how to use an existing bus configuration and additional software to integrate the I O system
Download Pdf Manuals
Related Search
Related Contents
Installation and user's guide OMI Le manuel d`utilisation ORANI-WEB - Bienvenue LOBE PUMP (1) Paying at a convenience store in FAX無料査定依頼書 FAX:079 - 280 - 4368 Ikelite 5660.01 underwater camera housing Mode d`emploi - Nord Keyboards Copyright © All rights reserved.
Failed to retrieve file