background image

Files, constants and structures

CP1413plus manual

5-8

Rev. 00/07

unsigned short connectionnumber;

unsigned short Kennung;

// parameter identifier

unsigned short DB;

// module number

unsigned short DW;

// data word number

unsigned short Len;

// length of data

}S5_PARAMS;

typedef struct {

unsigned short Auftragsnummer;

// task number.

short Offset;

// Offset from base tile

unsigned short Auftragsart;

// defines from task types

short Benutzt;

// use the connection automatically from start

}S5_ANSCHALTUNG;

typedef struct _S5_VERBINDUNGSDATEN {

char Verbindungsname[32];

// ASCII connection name

S5_ANSCHALTUNG S5Params;

// task no, ..

CONNECT_PARAMS CrParams;

// TSAP, NSAP, ..

}S5_VERBINDUNGSDATEN;

typedef struct _S5_VERBINDUNGSDATEN_KARTE {

char Verbindungsname[32];

// ASCII connection name

S5_ANSCHALTUNG S5Params;

// task no, ..

CONNECT_PARAMS CrParams;

// TSAP, NSAP, ..

unsigned short Karte;

// 0 = adapter 1

}S5_VERBINDUNGSDATEN_KARTE;

typedef struct _CP_REVISION {

unsigned short cb;

// length of the structure in bytes

unsigned short SerNo;

// serial number of the CP

unsigned short KachelNo;

// number of the selected tile

unsigned short KachelRev;

// Revision of the tile driver

unsigned short H1Rev;

// Revision of the H1 driver

unsigned short IpRev;

// Revision of the TCP/IP driver

unsigned short TermRev;

// Revision of the terminal

unsigned char StationAdr[6];

// Ethernet ROM station address

}CP_REVISION;

#pragma pack()

// Prototypes: access functions for .DLL or .LIB

#ifdef __cplusplus

extern "C" {

#endif

unsigned short WENTRY_C S5SetStationAddress(unsigned char W_POINTER address);

unsigned short WENTRY_C S5SetStationAdressCard(unsigned char W_POINTER address,unsigned short card);

unsigned short WENTRY_C S5StartConnection(H1_CONNECT_PARAMS W_POINTER cr);

unsigned short WENTRY_C S5StartConnectionCard(H1_CONNECT_PARAMS_LINE W_POINTER cr);

unsigned short WENTRY_C S5StopConnection(unsigned short connectionnumber);

unsigned short WENTRY_C S5StopConnectionAll(void);

unsigned

short

WENTRY_C

S5ReadFromPLC(S5_PARAMS

W_POINTER

s5,unsigned

short

memorylen,void

W_POINTER

memory,unsigned

short

W_POINTER s5error);

unsigned short WENTRY_C S5StarRead(S5_PARAMS W_POINTER s5);

unsigned short WENTRY_C S5CheckRead(unsigned short memorylen,void W_POINTER memory,unsigned short W_POINTER s5error,unsigned
short connectionnumber);

unsigned short WENTRY_C S5WriteToPLC(S5_PARAMS W_POINTER s5,void W_POINTER data,unsigned short W_POINTER s5error);

unsigned short WENTRY_C S5StartWrite(S5_PARAMS W_POINTER s5,void W_POINTER data);

unsigned short WENTRY_C S5CheckWrite(unsigned short W_POINTER s5error,unsigned short connectionnumber);

unsigned

short

WENTRY_C

S5FetchPassiv(unsigned

short

connectionnumber,short(WENTRY_C

*RetCall)(short

DB,short

DW,short

Type,short Len,short W_POINTER S5Err,void W_POINTER W_POINTER Data),void W_POINTER W_POINTER retptr);

unsigned

short

WENTRY_C

S5WritePassiv(unsigned

short

connectionnumber,short(WENTRY_C

*RetCall)(short

DB,short

DW,short

Typ,short Len,short W_POINTER Err,void W_POINTER W_POINTER Data),void W_POINTER W_POINTER retptr);

#if !defined(OS2_FUNCTIONS_INCLUDED) | !defined(WIN95_FUNCTIONS_INCLUDED) | !defined(NT_FUNCTIONS_INCLUDED)

unsigned short WENTRY_C S5SetVector(unsigned short vector);

#endif

Summary of Contents for CP 1413plus

Page 1: ...Subject to change to cater for technical progress Manual CP 1413plus Order No VIPA SSN HB83E Rev 00 07...

Page 2: ...jkjlj...

Page 3: ...sert the VIPA driver diskette 1 into drive A and enter the following command for MS DOS A TYPE README TXT If you should be using Windows you can use NOTEPAD to view the file Copyright 2000 VIPA Gesell...

Page 4: ...e preparation and installation of the respective hardware Chapter 3 VIPA Network module CP1413plus This chapter contains a technical description of the VIPA ethernet adapter CP1413plus for personal co...

Page 5: ...rnet 2 7 2 3 Thick ethernet cable networks 2 8 2 3 1 Thick ethernet cable network layout 2 10 2 3 2 Regulations and specifications 2 11 2 3 3 Technical data thick ethernet 2 13 2 4 Combining thin thic...

Page 6: ...2 Layer 7 interface definition 5 7 5 2 3 Definition of calling codes for drivers 5 10 5 2 4 Definition of call types 5 12 6 EXAMPLES 6 1 6 1 Simple H1 transmission example 6 1 6 2 PLC reception exampl...

Page 7: ...notes on programming 7 7 7 6 2 H1 Layer 4 programming interface 7 21 7 6 3 PLC Layer 7 software interface 7 55 7 6 4 PLC Net file functions 7 85 7 6 5 Files constants and structures 7 97 Appendix A 1...

Page 8: ...Contents CP1413plus manual iv Rev 00 07...

Page 9: ...ically sensitive modules 1 1 1 1 2 Shipping electrostatically sensitive modules 1 2 1 1 3 Tests and modifications to electrostatically sensitive modules 1 2 1 2 General 1 3 1 3 Operation 1 4 1 4 Const...

Page 10: ......

Page 11: ...n human perception It is possible that an electrostatic discharge occurs if a person who has built up an electrostatic charge handles electrostatically sensitive modules The resulting voltages may dam...

Page 12: ...a module please ensure that the conductive enclosure is not in contact with or shorting the battery terminals 1 1 3 Tests and modifications to electrostatically sensitive modules When tests are perfo...

Page 13: ...wo types of VIPA network modules Fig 1 1 CP1413plus for the PCI Bus PCI Bus board Z nyx board Order No VIPA SSN BG88 Locator Board description chapter 3 1 Hardware installation chapter 3 1 3 Software...

Page 14: ...s also possible to operate multiple networking protocols in parallel You are provided with a simple menu controlled configuration program to configure connection parameters and other system related se...

Page 15: ...n interface this application level support is functionally independent of the operating system MS DOS C interface as a library C source code Windows 3 11 Windows NT and Windows 95 language independent...

Page 16: ...Special features CP1413plus manual 1 6 Rev 00 07...

Page 17: ...8 2 3 1 Thick ethernet cable network layout 2 10 2 3 2 Regulations and specifications 2 11 2 3 3 Technical data thick ethernet 2 13 2 4 Combining thin thick ethernet cable in networks 2 14 2 4 1 Combi...

Page 18: ......

Page 19: ...ment and the number of stations that may be connected to it is limited It is possible to extend a network segment by linking multiple segments via repeaters A repeater increases the physical topology...

Page 20: ...is much like a pipe The cable has markings at a distance of 2 5 m which indicate the positions where a connection to the cable may be attached These two types of network cable can be employed to produ...

Page 21: ...interconnect two thin ethernet network cables Where two portions of a thin ethernet network must be linked these connectors have a distinct advantage over T pieces You may obtain these BNC connectors...

Page 22: ...Thin ethernet cable networks CP1413plus manual 2 4 Rev 00 07 PCI adapter ISA adapter Fig 2 2 Thin ethernet network hardware...

Page 23: ...mary Restrictions Maximum number of network segments 5 3 coaxial segments with network stations and 2 interconnecting segments without network stations Maximum length of a network segment 185 m Maximu...

Page 24: ...oaxial cable as every connector introduces losses When it becomes necessary to extend existing segments of coaxial cable you should always use preconfigured cables Please note that the maximum length...

Page 25: ...e cable are determined These should never exceed 7 of the injected amplitude of the original signal The reflection coefficient can be checked by means of a reflectometer The overall loop resistance of...

Page 26: ...g is connected to the network adapter located in a station The AUI socket is connected to the external transceiver Thick ethernet cable The thick ethernet cable consists of a 50 Ohm coaxial cable with...

Page 27: ...CP1413plus manual Network planning Rev 00 07 2 9 PCI adapter ISA adapter Fig 2 4 thick ethernet network hardware...

Page 28: ...ions Maximum number of network segments 5 3 coaxial segments with network stations and 2 interconnecting segments without network stations Maximum length of a network segment 500 m Maximum total lengt...

Page 29: ...gth of any part may thus be calculated as follows TSL 2n 1 23 4 m N 0 1 2 3 Wherever possible the network should consist of a homogeneous segments of coaxial cable as every connector introduces losses...

Page 30: ...requencies between 10 kHz and 30 MHz and 5 V m at frequencies between 30 MHz and 1 GHz Once a coaxial cable segment and all its components have been installed it is essential that the worst case refle...

Page 31: ...Thickness of the dielectric 1 99 mm Thickness of the screen 1 06 mm 0 089 mm Screening effectiveness 92 Thickness of the outer insulator 1 25 mm 0 089 mm Outside diameter for polyvinylchloride PVC 10...

Page 32: ...k ethernet cable via a repeat It is possible to combine a maximum of five unlike network segments using four repeaters in this manner It as also possible to use thin and thick ethernet cables within t...

Page 33: ...is determined by the physical limitations of the thick ethernet cable You may use the following equation to calculate the maximum length of the thin ethernet cable in a combination network 500 3 28 m...

Page 34: ...figuration The Hub is the central element that provides the facilities required to implement an ethernet network using twisted pair cable Every station is connected directly to the hub to form the eth...

Page 35: ...nual Network planning Rev 00 07 2 17 PCI adapter ISA adapter Twisted Pair plug Twisted Pair cable 1 2 3 4 5 6 Tx Rx Tx Rx Tx Rx Tx Rx Tx Rx Tx Rx Power supply Star coupler Hub Fig 2 9 Twisted pair net...

Page 36: ...ions applicable to the proposed system How many network stations PLC IPC PC transceiver possible bridges should be connected to the network What is the distance between the different stations on the n...

Page 37: ...ing the interfacing of industrial communication networks MAP and of office networks TOP to Wide Area Networks WAN ECMA European Computer Manufacturers Association generates the different standards for...

Page 38: ...Standards and specifications CP1413plus manual 2 20 Rev 00 07...

Page 39: ...rties 3 2 3 1 2 Shipment 3 2 3 1 3 Hardware installation 3 4 3 1 4 Software installation 3 7 3 2 3COM ISA bus adapter 3 30 3 2 1 Properties 3 30 3 2 2 Shipment 3 30 3 2 3 Hardware installation 3 32 3...

Page 40: ......

Page 41: ...tion of adapter Chapter 3 1 Hardware installation Chapter 3 1 3 Software installation Chapter 3 1 4 This adapter is plug and play compatible i e it is recognized by the system and installed without an...

Page 42: ...ect Media Type automatic recognition of the connector that is connected to the network Adapter has a BNC socket 10 Base 2 an AUI 10 Base 5 socket and a RJ 45 Phone Jack 10 Base T 32 Bit PCI bus Networ...

Page 43: ...NT DLL OS2 DLL WIN DLL WIN95 DLL As of version 2 6 the files required for the different operating systems are compressed into a separate archive on the disk Common files that are used by all operatin...

Page 44: ...witch your computer off Remove the power cable 2 Remove the covers from your computer according to the manufacturers instructions 3 Remove one of the metal covers from a slot at the rear of your PC 4...

Page 45: ...etwork adapter Rev 00 07 3 5 3 1 3 2 Network cabling 3 1 3 2 1 Thin ethernet network Fig 3 2 PCI adapter connection to a thin ethernet network 3 1 3 2 2 Thick ethernet network Fig 3 3 PCI adapter conn...

Page 46: ...Z nyx PCI bus adapter CP1413plus manual 3 6 Rev 00 07 3 1 3 2 3 UTP network Fig 3 4 PCI adapter connection to a twisted pair network...

Page 47: ...installations MS DOS installation Version A H1 under MS DOS without additional protocols H1 under MS DOS with Windows 3 1 without workgroups without additional protocols Version B H1 under MS DOS with...

Page 48: ...py the files from the directory H1_DOS VAR_A located on the disk SW83Z 1 2 to your hard disk C into the directory H1_DOS xcopy a h1_dos var_a c h1_dos Step 4 Add the following lines to your C CONFIG S...

Page 49: ...T NIF H1PROT_NIF DRIVERNAME H1PROT BINDINGS ZX312_NIF example for a station address own station address NETADDRESS I0020D582FFFF MAXVERBINDUNGEN 10 MAXSENDEBUFFER 10 MAXACKBUFFER 10 MSDOSVEKTOR 0X7D Z...

Page 50: ...st please start the Network Setup program in the program group Network The chronological sequence of operations is shown below Please select the following items in Network Setup Network Install Micros...

Page 51: ...os zx312 dos device c h1_dos h1prot dos Modify any existing LASTDRIVE entry to read LASTDRIVE P Step 7 Check that the following line exists in your C AUTOEXEC BAT file C WINDOWS net start If the entry...

Page 52: ...that Windows for Workgroups also starts without error messages Note The installation assumes that WINDOWS is located on your C drive in a directory C WINDOWS If this is not true all references to WIN...

Page 53: ...C you must please start the Network Setup program in the program group Network The chronological sequence of operations is shown below Please select the following items in Network Setup Network Instal...

Page 54: ...dishlp sys device c h1_dos msipx sys device c h1_dos h1prot dos Modify any existing LASTDRIVE entry to read LASTDRIVE P Step 7 Check that the following lines exist in the file C AUTOEXEC BAT C WINDOWS...

Page 55: ...and make sure that all programs are loaded without error messages Make sure that Windows for Workgroups also starts without error messages Note The installation assumes that WINDOWS is located on your...

Page 56: ...ou must please install the ZNYX ZX312 V PCI Ethernet Driver adapter Step 4 Restart the PC The network should operate correctly You can check the network function by transmitting a message to another u...

Page 57: ...c h1_dos protocol net c net protocol ini Subsequently you must please modify the NETADDRESS parameter in the section H1PROT_NIF of the file C NET PROTOCOL INI if you wish to change your own network a...

Page 58: ...LAN Requester 4 0 Novell IPX Install the IBM LAN Requester and Novell NetWare according to the instructions provided by the respective manufacturer Install the ZNYX ZX312 V PCI Ethernet Driver networ...

Page 59: ...SW82Z disk 1 1 The description of this program is available from the Getting Started section of the Z NYX manual The adapters must be have different I O base addresses and interrupt request levels Ste...

Page 60: ...ddress is unique Extract from C H1_DOS PROTOCOL INI PROT_MAN DRIVERNAME PROTMAN IBMLXCFG ZX312_NIF ZX312 NIF ZX3122_NIF ZX3122 NIF H1PROT_NIF H1PROT NIF H1PROT_NIF DRIVERNAME H1PROT BINDINGS ZX312_NIF...

Page 61: ...the files from the directories H1_OS2 MACS H1_OS2 PROTOCOL H1_OS2 TOOLS and H1_OS2 VAR_A of the disk SW83Z 1 2 into the directory H1_OS2 on hard disk C xcopy a h1_os2 MACS c h1_os2 xcopy a h1_os2 PRO...

Page 62: ...H1PROT_NIF DRIVERNAME H1PROT BINDINGS ZX312_NIF Example for a station address own station address NETADDRESS I00001C011010 MAXVERBINDUNGEN 32 MAXSENDEBUFFER 32 MAXACKBUFFER 64 ZX312_NIF DRIVERNAME ZX...

Page 63: ...Adapters Other adapters select Insert the disk SW83Z 1 2 A H1_OS2 MACS enter The files will be copied In the window Network Adapters VIPA CP 1413plus Znyx ZX312 V PCI Ethernet Driver select Add In th...

Page 64: ...ady done so Set the Protocols parameter to IBM NetWare Requester Support Step 4 Once you have rebooted your PC and if the network operates properly you can start the install program located in the dir...

Page 65: ...PA H1 Protokoll Please select this protocol Step 4 If you have installed a number of network adapters and some of these are not VIPA CP1413plus adapters you must remove the link between the H1 protoco...

Page 66: ...sure that all programs are loaded without error messages Note If the parameter cr fehler contains 13 decimal H1_NO_ADAPTER you should change the Bind parameter in the H1 protocol selection of the NT...

Page 67: ...Chapter 3 2 3 contains the description of the hardware installation Step 2 Start Windows Select Settings on the Start menu Select Control Panel and the window Control Panel will be displayed Execute...

Page 68: ...l driver First you must enter the network adapter Select Adapter and click on Add Step 4 Select Znyx from the list of manufacturers The list of adapters will then display all adapters that are availab...

Page 69: ...Disk Click on Browse in the window Install From Disk In the window Open select the file H1PROT INF from the directory A H1_WIN95 and click OK The window Install From Disk now shows A H1_WIN95 Click O...

Page 70: ...ected to the network Network management software is installed when the driver is installed 16 Bit AT Bus The adapter carries a BNC 10 Base 2 an AUI 10 Base 5 and an RJ 45 Phone Jack 10 Base T Socket f...

Page 71: ...A SOURCE DOS NT DLL OS2 DLL WIN DLL WIN95 DLL As of version 2 6 the files required for the different operating systems are compressed into a separate archive on the disk Common files that are used by...

Page 72: ...e the following 1 Switch your computer off Remove the power cable 2 Remove the covers from your computer according to the manufacturers instructions 3 Remove one of the metal covers from a slot at the...

Page 73: ...y find further information in the text files located on the disk From the Install menu select the Configure Adapter F4 function The following panel will be displayed All parameters may be accessed ind...

Page 74: ...390h Trans 220h 2A0h 320h 3A0h Netwo 230h 2B0h 330h 3B0h Maxim 240h 2C0h 340h 3C0h Plug 250h 2D0h 350h 3D0h 260h 2E0h 360h 3E0h 270h 2F0h 370h OK Cancel Auto Configure Modify File Options OK Cancel EN...

Page 75: ...uration and Diagnostic Program Version 3 0 Quit Install Test View Select F1 Help Adapter Configuration Boot PROM I O B Inter Size Base Address Boot Disabled Trans 8 KBytes Netwo 16 KBytes Maxim 32 KBy...

Page 76: ...Address 340h Interrup Network Driver Optimization Boot PRO Transcei Optimize the network driver for a Network Maximum DOS Client Plug and Windows or OS 2 Client Server OK Cancel Auto Configure Modify...

Page 77: ...3 10 1 Thin ethernet network Fig 3 6 Selecting On board Coax BNC Configuration and Diagnostic Program Version 3 0 Quit Install Test View Select F1 Help Adapter Configuration EtherLink III Adapter Con...

Page 78: ...anual 3 38 Rev 00 07 3 2 3 10 2 Thick ethernet network Fig 3 7 Selecting External AUI DIX 3 2 3 10 3 UTP network Fig 3 8 Selecting On board TP RJ 45 When you tick Auto Select the adapter will determin...

Page 79: ...ation MS DOS installation Version A H1 under MS DOS without additional protocols H1 under MS DOS with Windows 3 1 without Workgroups without additional protocols Version B H1 under MS DOS with Windows...

Page 80: ...Step 3 Copy the files located in the subdirectory H1_DOS VAR_A of the disk SW83C 1 2 to the hard disk C into the subdirectory H1_DOS xcopy a h1_dos var_a c h1_dos Step 4 Add the following lines to the...

Page 81: ...OTMAN IBMLXCFG ELNK3_NIF ELNK3 NIF H1PROT_NIF H1PROT NIF H1PROT_NIF DRIVERNAME H1PROT BINDINGS ELNK3_NIF Sample a station address own station address NETADDRESS I0020D582FFFF MAXVERBINDUNGEN 10 MAXSEN...

Page 82: ...st please start the program Network Setup in the Network group of WfW The chronological sequence of operations required to configure the network in Windows for Workgroups are depicted below Please sel...

Page 83: ...the following line C WINDOWS net start If this line is not present add it to the beginning of the file Step 8 Append the contents of the file C H1_DOS PROTOCOL INI to the file C WINDOWS PROTOCOL INI...

Page 84: ...kgroups Note This installation requires that WINDOWS is installed on the C drive in the directory C WINDOWS If not all references to WINDOWS must be changed in the configuration section The configurat...

Page 85: ...on you must please start the program Network Setup in the Network group of WfW The chronological sequence of operations required to configure the network in Windows for Workgroups are depicted below P...

Page 86: ...sts change it to read LASTDRIVE P Step 7 Check that the C AUTOEXEC BAT file contains the following lines C WINDOWS net start C H1_DOS MSIPX NETX If any one of these lines are not present add them to t...

Page 87: ...address is unique Step 9 Restart the PC and make sure that all programs are loaded without error messages Also check for errors during the start up of Windows for Workgroups Note This installation re...

Page 88: ...IBM Install the 3Com Etherlink III network adapter to provide the ethernet interface Step 4 Please restart your PC The network should start and run correctly To test the operation of the network you c...

Page 89: ...protocol ini Subsequently you must please change the NETADDRESS setting in the section H1PROT_NIF of the file C WINDOWS PROTOCOL INI if you wish to change your own network address Plese ensure that th...

Page 90: ...components H1 under MS DOS IBM LAN Requester 4 0 Novell IPX Install the IBM LAN Requester and Novell NetWare according to the manufacturers instructions Install the 3Com Etherlink III network adapter...

Page 91: ...3c5x9cfg exe from the disk SW82C disk 1 1 The adapters must have different I O base addresses and interrupt request levels Example Adapter 1 I O base address 0x340 Interrupt Request 10 Adapter 2 I O...

Page 92: ...unique Excerpt from C H1_DOS PROTOCOL INI PROT_MAN DRIVERNAME PROTMAN IBMLXCFG ELNK3_NIF ELNK3 NIF ELNK32_NIF ELNK32 NIF H1PROT_NIF H1PROT NIF H1PROT_NIF DRIVERNAME H1PROT BINDINGS ELNK3_NIF ELNK32_N...

Page 93: ...the following steps refer to OS 2 Step 3 Copy the files from the subdirectories H1_OS2 MACS H1_OS2 PROTOCOL H1_OS2 TOOLS and H1_OS2 VAR_A located on the disk SW83C 1 2 into the subdirectory H1_OS2 on...

Page 94: ...IF DRIVERNAME H1PROT BINDINGS ELNK3_NIF Example for a station address own station address NETADDRESS I00001C011010 MAXVERBINDUNGEN 32 MAXSENDEBUFFER 32 MAXACKBUFFER 64 ELNK3_NIF DRIVERNAME ELNK3 IOADD...

Page 95: ...following procedure In the window Network Adapters Other adapters select Insert the disk SW83C 1 2 A H1_OS2 MACS enter the files will be copied In the window Network Adapters VIPA CP 1413plus 3Com Eth...

Page 96: ...NetWare Requester Support setting for Protocols Step 4 Once you have restarted the PC and verified that the network is operating properly execute the install program located in the directory ibmcom Us...

Page 97: ...Setup select the 3COM Ethernetlink from the list Enter the correct Address and Interrupt Step 3 Install the H1_Prot driver as follows 1 Copy the driver h1prot sys from the directory H1_NT of the disk...

Page 98: ...C driver for the network adapter Step 2 Insert the H1 driver disk into drive A and select Other Protocol from the options Another panel will be displayed Step 3 Select A H1_NT The disk will be read an...

Page 99: ...ion Step 1 Refer to chapter 3 2 3 for hardware installation instructions Step 2 Start Windows Go to Settings on the Start Menu Select the Control Panel The Control Panel window will be displayed Execu...

Page 100: ...e VIPA H1 protocol driver First you must specify what network adapter you will use Select Adapter and click on Add Step 4 Select 3Com as the manufacturer A list containing all available adapters made...

Page 101: ...Browse in the Install From Disk window In the window Open select the file H1PROT INF from the directory A H1_WIN95 and click on OK The window Copy From Disk now contains the entry A H1_WIN95 Click on...

Page 102: ...ng station has not accepted any data 2 RECEIVE active The size of the send buffer is 1100 byte The system will slow down if the pool of send buffers has been exhausted As it is normal for all connecti...

Page 103: ...local station address The station address of some network adapters can not be changed after the system has been started In this case the station address must be specified here Default ROM adapter addr...

Page 104: ...Entry into protocol file H1PROT_NIF CP1413plus manual 3 64 Rev 00 07...

Page 105: ...net address 4 10 4 2 H1 Layer 4 program interface 4 11 4 2 1 General information on the H1 program interface 4 11 4 2 2 General H1 Layer 4 functions 4 13 4 2 3 Specific H1 Layer 4 functions 4 29 4 3 P...

Page 106: ......

Page 107: ...tLineCharacteristics H1ListDefinedConnections H1GetStationAddress H1GetStationAddressCard H1SetStationAddress H1SetStationAddressCard H1GetStandardvalues H1SetStandardvalues H1SetVector H1SendData H1S...

Page 108: ...5GetConnectionCard S5PutConnectionparameter S5WriteConnectionCard S5ListConnections S5ListNetConnections S5SetVector S5SetStationaddress S5SetStationaddressCard H1ReadParameter H1WriteParameter S5GetP...

Page 109: ...tations overlap 3 EthernetRemoteTsap 22334455 2 to 16 bytes 4 EthernetPriority Prio2 5 EthernetLineType Normal Active e Normal Passive is also possible depending on the type of connection 6 optional E...

Page 110: ...PLC side You must specify parameters for 2 tasks 1 SEND H1SendData H1StartSend H1CheckSend in the file net net Connection_3 EthernetLineType Normal Active or Normal Passive in the sequence used when c...

Page 111: ...neType Normal Active Fetch Passive Read Write Yes FB SendAll absolute FB ReceiveAll absol Tab 4 5 Procedure read DB from PLC Layer 7 write DB to PLC PC side CP function PLC side WRITE S5WriteToPLC S5S...

Page 112: ...on the network when the connection is not used very often as the line does not have to be supervised as the connection is terminated after each send operation Please note that the data transfer rate...

Page 113: ...rk have no provisions for the NSAP Remote TSAP The remote TSAP determines the connection address of the other system Before a connection can be established the own TSAP must correspond to the remote T...

Page 114: ...valid or incorrect H1_NO_SLOT The maximum number of connections has already been started Please terminate existing connections before you start another connection H1_WAIT_CONNECT This is not a true er...

Page 115: ...en terminated Please use blocking as soon as you want to transfer more than 1024 bytes Set bit 15 in the task number to initiate blocking H1_NO_ADAPTER This may be caused by one of the following adapt...

Page 116: ...hernet address 6 bytes has the following components byte 1 2 3 0x00 0x20 0xD5 VIPA network designator byte 4 5 6 these 3 bytes are located on the CP1413plus Z nyx adapter Fig 4 1 The ethernet end addr...

Page 117: ...nt systems or to a single system Any connection that is no longer required should be terminated MS DOS The MS DOS based access functions are available as med and large memory model from a library for...

Page 118: ...s H1LibWin lib S5APWin lib These libraries were tested with MSC 6 0A and VisualC 1 5 The connection parameters determine the type of connection These parameters are provided in a central connection fi...

Page 119: ...tation of the respective operating system for a list of possible return values On a PC user programs may access layer 4 tasks directly The file H1DEF H contains a listing of all the functions 4 2 2 1...

Page 120: ...WinNT are terminated Parameters None Return value 0 H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER Note This function must be the last one that is executed Once this function has completed the driver can only...

Page 121: ...hort variable that contains the decimal version number of the H1 driver Example a return containing 124 indicates version 1 24 Return value 0 H1_NO_DRIVER H1_NO_ADAPTER Note The version number is defi...

Page 122: ...executed Possible values that may be returned by cr Fehler 0 H1_BAD_CR_PARAMS H1_WAIT_CONNECT H1_NO_SLOT H1_NO_DRIVER H1_NO_ADAPTER Return value 0 The operating system has detected an error 0 The cr F...

Page 123: ...ion number and the adapter number must have been previously assigned Possible values returned by cr Fehler 0 H1_WAIT_CONNECT H1_BAD_CR_PARAMS H1_NO_SLOT H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER Return v...

Page 124: ...function Parameters connection number The connection number of a valid connection Return value 0 H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER Note When this function has been executed the connection number...

Page 125: ...must assign a value to the Vnr parameter Possible values returned by rec Fehler 0 H1_WAIT_CONNECT H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER Return value 0 The operating system has detected an error 0 Th...

Page 126: ...e parameters You must assign a value to the Vnr parameter Possible values returned by val Fehler 0 H1_WAIT_CONNECT H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER Return value 0 The operating system has detect...

Page 127: ...Own sequence number unsigned short DestSequNummer Destination sequence number DestReference If DestReference is 0 the connection was not established OwnSequNummer contains the number of telegrams that...

Page 128: ...containing the current station parameters Byte 0 1 length of station address Byte 2 7 current station name Byte 8 13 ROM station address Return value 0 H1_NO_DRIVER H1_NO_ADAPTER Note The station par...

Page 129: ...nly a single adapter Parameters address Pointer to a memory location containing the current station parameters Byte 0 1 length of station address Byte 2 7 current station name Byte 8 13 ROM station ad...

Page 130: ...The station address is independent of other protocols e g IPX if the setting Protokollieren Ja log protocol yes has been specified On some LAN s the MAC driver may not be set to operate in promiscous...

Page 131: ...Parameters address Pointer to a memory location containing the modified station parame ters The remaining 6 bytes contain the station address For an H1 environment the highest byte may not contain a b...

Page 132: ...m values Parameters init Pointer to a memory location containing the system values Return value 0 H1_NO_DRIVER H1_NO_ADAPTER Note These settings apply to all connections If you decide to modify H1 sys...

Page 133: ...ssued quickly when this timer has expired TimeoutCrLangsam A new CR will be issued slowly when this timer has expired TimeoutSend When this timer expires the flag cannot send data is valid TimeoutRec...

Page 134: ...be changed if the system can not operate with the default value Parameters Vector From 78h 7Fh default 7Ah Return value alter Vector H1_NO_DRIVER H1_NO_ADAPTER Note This function is only available for...

Page 135: ...be set in the last telegram of a blocked transmission Possible return values from send Fehler 0 H1_WAIT_CONNECT H1_BAD_LINE H1_WAIT_SEND H1_NO_DRIVER H1_NO_ADAPTER Return value 0 The operating system...

Page 136: ...in the respective values Ensure that the buffer at the end of the structure is large enough If the telegram should form part of a blocked transmission bit 15 in the element Vnr must be set On the rece...

Page 137: ...A is entered into the Fehler element Bit 15 may not be set in the last telegram of a blocked transmission Possible return values from send Fehler 0 H1_WAIT_CONNECT H1_BAD_LINE H1_WAIT_SEND H1_NO_DRIVE...

Page 138: ...ntains one of the values mentioned above Note This function is normally executed in singletasking systems It starts a send operation You may not mix the H1SendData and H1StartSend H1CheckSend tasks fo...

Page 139: ...H1_BAD_LINE N ret 0 N cr Fehler 0 Y Y Analyse error code returned by operating system Y cr Fehler H1_BAD_LINE N N Y N Analyse error code returned by operating system Bad connection number or connectio...

Page 140: ...VER H1_NO_ADAPTER Return value 0 The operating system has detected an error 0 The rec Fehler element contains one of the values mentioned above Note This function is normally used in multitasking syst...

Page 141: ...NO_DRIVER H1_NO_ADAPTER H1_ALREADY_RUNNING Return value 0 The operating system has detected an error 0 The rec Fehler element contains one of the values mentioned above Note This function is normally...

Page 142: ...LREADY_RUNNING Return value 0 The operating system has detected an error 0 The rec Fehler element contains one of the values mentioned above Note This function is normally executed in singletasking sy...

Page 143: ...H1_NO_DRIVER H1_NO_ADAPTER H1_ALREADY_RUNNING Return value 0 The operating system has detected an error 0 The rec Fehler element contains one of the values mentioned above Note This function is norma...

Page 144: ...urn value 0 The operating system has detected an error 0 The rec Fehler element contains one of the values mentioned above Note This function is normally executed in singletasking systems You may not...

Page 145: ...urned by rec Fehler 0 H1_WAIT_CONNECT H1_BLOCKED_DATA H1_BAD_LINE H1_WAIT_DATA H1_NO_DRIVER H1_NO_ADAPTER H1_NO_REQUEST Return value 0 The operating system has detected an error 0 The rec Fehler eleme...

Page 146: ...N ret 0 cr Fehler 0 Y N Analyse error code returned by operating system Y cr Fehler H1_BAD_LINE N N Y N Analyse error code returned by operating system read again Y N H1StoppeVerbindung H1DriverClose...

Page 147: ...program interface does not depend on the operating system i e all PLC functions ate available irrespective of the type of operating system Before a station becomes accessible you must first establish...

Page 148: ...se parameters are read by means of S5GetConnectionParameter The value Vnr is set if the function completes without error This represents the connection number However this number will only be returned...

Page 149: ...ters These parameters are read by means of S5GetConnectionParameterCard The value Vnr is set if the function completes without error This represents the connection number However this number will only...

Page 150: ...be executed even if the connection has never truly existed When this function completes all the internal memory locations in the library and in the drivers are released Parameter connectionnumber Here...

Page 151: ...the revision levels of installed drivers match or exceed a minimum level It is possible that some functions contained in this description are not implemented fully if they have an earlier revision le...

Page 152: ...file functions where the filename is not explicitly specified retrieve the new file name from this location Return value 0 OK name was saved 1 File name too long Note The specified path must exist If...

Page 153: ...file The standard parameter file is the file Net net which defaults to the root directory of drive C The name and path of the file may be changed You can do this as follows 1 Declare the variable CON...

Page 154: ...It is also possible to use another text editor that does not write control characters to the data is located in a pure text file Chapter 5 contains the exact format of this file Parameters s5data is a...

Page 155: ...VIPA CP143 plus QP It is also possible to use another text editor that does not write control characters to the data is located in a pure text file Chapter 5 contains the exact format of this file Par...

Page 156: ...n uses the same file as previously described for S5GetConnectionParameter Parameters s5data is a pointer to the structure S5_VERBINDUNGSDATEN All elements must contain the required values Return value...

Page 157: ...uses the same file as previously described for S5GetConnectionParameterCard Parameters s5data is a pointer to the structure S5_VERBINDUNGSDATEN_KARTE All elements must contain the required values Retu...

Page 158: ...st be at least as long as specified by speicherlen Return value 0 OK The connection names are located in the memory area each one separated from the previous entry by a null and a single byte Bit 0 a...

Page 159: ...tion mem is a pointer to the memory location This area of memory must have a minimum length of speicherlen Return value 0 OK The connection names are located in the memory area each one separated from...

Page 160: ...This function changes the MS DOS vector This value should only be changed if the system can not operate with the default Parameters Vector range 78h 7Fh default 7Ah Return value old Vector H1_NO_DRIV...

Page 161: ...sions occur on the network The station address is independent of other protocols e g IPX if the setting Protokollieren Ja log protocol yes has been specified On some LAN s the MAC driver may not be se...

Page 162: ...the system contains only a single adapter Parameters address Pointer to a memory location containing the modified station parame ters The remaining 6 bytes contain the station address For an H1 envir...

Page 163: ...pecified Net file Parameters netfile name of Net file vname name of the respective connection cr structure where parameters are saved Return value 0 OK The data is located in the structure TEXT_NO_NET...

Page 164: ...ecord of H1 parameters to the specified Net file Parameters netfile Name of the Net file vname Name of the respective connection cr Structur which is used to transfer the parameters All parameters mus...

Page 165: ...Parameter netfile Name of the Net file vname Name of the respective connection s5 Structure where retrieved parameters are stored Return value 0 OK The data has been entered into the structure TEXT_N...

Page 166: ...1 parameters into the specified Net file Parameter netfile Name of the Net file vname Name of the respective connection s5 Structur which is used to transfer the parameters All parameters must have be...

Page 167: ...enough to accommodate all values that must be retrieved otherwise the function must be executed more than once to read all data When S5StartRead is executed again any data that was previously retriev...

Page 168: ...rameter s s5 Pointer to a structure of the type S5_PARAMS The values Kennung DB DW and Len must contain valid entries The structure s5 must contain a valid connection number that was started by means...

Page 169: ...sed if the function S5StartRead is repeated speicher is a pointer to the area where retrieved data must be stored This must have a minimum length of speicherlen s5Fehler is a pointer to an integer var...

Page 170: ...PLC Layer 7 program interface CP1413plus manual 4 64 Rev 00 07 4 3 4 1 4 Flowchart Read from the PLC Fig 4 4 Flowchart Read from the PLC...

Page 171: ...nter to the data area which contains the values that must be sent The length of this storage space is determined by the specifications contained in s5 s5Fehler is a pointer to an integer variable If t...

Page 172: ...that was started by means of the function S5StartConnection and that has not yet been terminated by the S5StopConnection function data is the pointer to the data area which contains the values that m...

Page 173: ...received Parameters s5Fehler is a pointer to an integer variable If the function returns a value of 0 then s5Fehler contains the error code received from the remote station Some of the possible error...

Page 174: ...S5 Fehler 0 Y S5 Fehler H1_BAD_LINE N ret 0 N cr Fehler 0 Y Y Analyse error returned by operating system Enter correct parameter N cr Fehler H1_WAIT_CONNECT Y N Y N Analyse error returned by operating...

Page 175: ...remote station contains error In this case the function S5FetchPassiv is terminated with an error 1 If the return call function returns 0 the answer is transferred to the fetch operation Here the erro...

Page 176: ...from the remote station contains errors In this case the function S5WritePassiv is terminated with an error 1 If the return call function returns 0 the answer is transferred to the fetch operation He...

Page 177: ...ilable DB not present 3 PLC area too small 4 QVZ error occurred in PLC 5 error in display word ANZW 6 invalid ORG format 7 no data buffers available 8 no unused transport connections 9 error at the re...

Page 178: ...PLC Layer 7 program interface CP1413plus manual 4 72 Rev 00 07...

Page 179: ...1 Parameter file description 5 1 5 2 Constants and structures 5 4 5 2 1 H1 protocol driver definitions 5 4 5 2 2 Layer 7 interface definition 5 7 5 2 3 Definition of calling codes for drivers 5 10 5...

Page 180: ......

Page 181: ...f letters and numbers and it must be followed immediately by the equals sign Depending on the type of setting the value may consist of a string or a string enclosed in inverted commas Most sections co...

Page 182: ...ntry is in HEX Example EthernetEigenerTSAP 2020202030202031 EthernetFremderTSAP Remote TSAP The length of a TSAP can be from 2 to 16 digits The entry is in HEX Example EthernetFremderTSAP 202020203020...

Page 183: ...re the Express priorities These can accept up to 16 bytes of data Prio2 Prio3 are the normal priorities and Prio4 is the lowest priority Example EthernetPriorit t Prio2 EthernetMulticastkreis This con...

Page 184: ...has not yet been sent define H1_INTERNAL_ERROR 8 should not occur define H1_NO_REQUEST 9 you have polled a task that does not exist define H1_NO_DRIVER 10 a call to the H1 driver has been detected bu...

Page 185: ...TimeoutLive when this timer expires the connection is flagged as bad unsigned short TimeoutRetrySend when this timer expires the connection is flagged as bad unsigned short TimeoutNewSend when this ti...

Page 186: ...nsigned short WENTRY_C H1StartConnect H1_CONNECT_PARAMS W_POINTER cr unsigned short WENTRY_C H1StartConnectCard H1_CONNECT_PARAMS_LINE W_POINTER cr unsigned short WENTRY_C H1StopConnect unsigned short...

Page 187: ...a pack 1 typedef struct short s5 S5 unsigned char Headerlen 0x10 char KennungOpcode 1 char LenKennungOpcode 3 char Opcode Send 3 4 acknowledgement union struct char OrgBlock Send 3 acknowledgement F c...

Page 188: ...char W_POINTER address unsigned short WENTRY_C S5SetStationAdressCard unsigned char W_POINTER address unsigned short card unsigned short WENTRY_C S5StartConnection H1_CONNECT_PARAMS W_POINTER cr unsig...

Page 189: ...C H1GetLineCatacteristics char W_POINTER netfile char W_POINTER vname H1_CONNECT_PARAMS_LINE W_POINTER cr unsigned short WENTRY_C S5GetConnectionParameters char W_POINTER netfile char W_POINTER vname...

Page 190: ...H1_DISCONNECT_REQUEST 2144 Pointer to connectionnumber define H1_SEND_DATA 2152 Pointer to H1_SENDPARAMS define H1_RECEIVE_DATA 2160 Pointer to H1_RECPARAMS define H1_GET_LINEPARAMS 2168 Pointer to H1...

Page 191: ...to H1_CONNECTPARAMS define H1_START_SEND 0x36 Pointer to H1_SENDPARAMS define H1_START_RECEIVE 0x37 Pointer to H1_RECPARAMS define H1_CHECK_SEND 0x38 Pointer to H1_SENDPARAMS define H1_CHECK_RECEIVE 0...

Page 192: ...define WENTRY_C __stdcall define W_POINTER elif defined OS2_FUNCTIONS_INCLUDED if defined OS2_32BIT if defined __BORLANDC__ define WENTRY_C pascal elif defined __IBMC__ defined __IBMCPP__ define WENTR...

Page 193: ...1 6 2 PLC reception example using a parameter file 6 3 6 2 1 Source listing 6 3 6 2 2 Source diagrams 6 5 6 2 3 The respective PLC program 6 8 6 2 4 The respective CP143plus parameter settings 6 9 6...

Page 194: ......

Page 195: ...1 pragma optimize on int main int argn char argv int num err H1_CONNECT_PARAMS cr H1_SENDPARAMS sp printf H1 Testprogram C VIPA W Krings n if argn 1 num atoi argv 1 if num Vector printf Softint X pres...

Page 196: ...ntf Send started err d n err delay for num 0 num 10 num delay H1CheckSend sp if sp Fehler printf Data was sent n break else printf Check send err d n sp Fehler else printf No connection err d n sp Feh...

Page 197: ...ptr int num err H1_CONNECT_PARAMS cr S5_VERBINDUNGSDATEN s5daten S5_PARAMS s5 int s5fehler printf H1 AP Library test program C WKS n s send else AP read n if argn 1 num atoi argv 1 if num Vector print...

Page 198: ...nction started err d n err delay for num 0 num 10 num delay if err S5PollRead 100 names s5fehler cr Vnr printf PLC data available AP Err d daten X n s5fehler names break else delay printf Read was pol...

Page 199: ...void H1StopConnecten void CrParameterVorbesetzen H1_CONNECT_PARAMS_LINE cr cr CrParams Priority PRIORITY_2 cr CrParams ConnectType NORMAL_LINE cr CrParams LenDestAddr 6 cr Karte 0 Karte 1 cr CrParams...

Page 200: ...ntf Connection started err d n cr Fehler tf rive time ref H1 D r n act ref rv n ref 3 wait a max of 3 s ot a vail if cr Fehler able then else or I sp Vnr cr Vnr prin nter sp DataLen 100 tf rupt memset...

Page 201: ...CR e rrup rror t ve if POLLMODUS POLL mode or wait er ctor then else r d er while act ref Wait no longer than the preset tim err H n r d e 1ReadDa err n ta rp err time act printf Read r if err H1Start...

Page 202: ...0 00002 00004 00006 SPA FB 126 NAME SEND A SSNR KY 0 0 SSNR tile 0 A NR KY 0 0 ANZW MW 180 PAFE MB 198 00012 00014 00016 SPA FB 127 NAME REC A SSNR KY 0 0 SSNR tile 0 A NR KY 0 0 ANZW MW 184 PAFE MB...

Page 203: ...131313131313131 corresponds to the remote TSAP of Net net Task type FetchPass Task number 82 Tile offset 0 Priority Prio2 Ethernet task type Normal Passiv Multicast circuit number 0 Automatic start Ye...

Page 204: ...P 3131313131313131 EthernetFremderTSAP 3131313131313131 EthernetStartParameter EthernetLeitungsart Normal Aktiv EthernetPriorit t Prio2 EthernetMulticastkreis 0 Aktive connection for Write Test Verbin...

Page 205: ...of SSN BG85C 3COM adapter for ISA Bus 7 3 7 5 Installation of the H1 driver V3 xx for Windows NT 4 0 7 4 7 5 1 Installation of SSN BG88 Z NYX adapter for PCI Bus 7 4 7 5 2 Installation of SSN BG85C 3...

Page 206: ...ksdjfk...

Page 207: ...1 driver must be uninstalled before the new H1 driver V 3 xx can be installed under Windows NT 7 2 Uninstalling older Windows NT drivers If an earlier version of the H1 driver is installed on your sys...

Page 208: ...in group Select Network in the control panel A dialogue box containing the current configuration is displayed click on Network adapter and then on Add to install the new network adapter Select the fol...

Page 209: ...l A dialogue box containing the current configuration is displayed Click on Network adapter and then on Add to install the new network adapter Select the following driver from the displayed list 3COM...

Page 210: ...bourhood icon Click on Properties in the menu This displays a menu with tabs for the various settings Click on the Network adapter tab and then on Add to install the new network adapter A list of avai...

Page 211: ...This displays a menu with tabs for the various settings Click on the Network adapter tab and then on Add to install the new network adapter A list of available drivers will be displayed Select the fo...

Page 212: ...w shown above Parameter Filter Here you can specify which messages should be rejected by the filter The default setting for both VIPA PC network adapters is Promiscuous Mode Promiscuous Mode operation...

Page 213: ...ndungenOverlapped H1HoleStationsAdresse H1SetzeStationsAdresse H1HoleStandardwerte H1SetzeStandardwerte H1SendeDaten H1SendeDatenEx H1StarteSenden H1StarteSendenOverlapped H1StarteSendenExOverlapped H...

Page 214: ...seAusSPS S5LeseAusSPSOverlapped S5StarteLesen S5StarteLesenOverlapped S5AbfrageLesen S5AbfrageLesenOverlapped S5SchreibeInSPS S5SchreibeInSPSOverlapped S5StartSchreiben S5StartSchreibenOverlapped S5Ab...

Page 215: ...sult for checking overlapped functions The programming conditions shown below must be met before you can use any one of these functions H1StarteVerbindungOverlapped H1StoppeVerbindungOverlapped H1Stop...

Page 216: ...d functions Once the function call has been initiated the application program jumps to the respective function in the DLL passing amongst others the parameters UserFctCall UserFct and Timeout_ms to th...

Page 217: ...or Priority ConnectType LenDestAddr etc that are only provided as examples and should be adapted to the respective application Entering the connection PC Side CP function PLC side in structure CONNECT...

Page 218: ..._LINE H1 connection Send FB Send FB Control alternative FB SendAll cyclic Tab 7 2 Procedure PLC transmits data to the PC Layer 4 PC transfers data to the PLC PC side CP function PLC side SEND H1SendeD...

Page 219: ...ageSenden in structure CONNECT_PARAMS ConnectType NORMAL_LINE ACTIVE_LINE H1 connection Main connection Receive Multi connection Send FB Receive FB Control alternative FB ReceiveAll cyclic RECEIVE H1L...

Page 220: ...NORMAL_LINE AKTIVE_LINE Fetch Passive FB SendAll cyclic FB ReceiveAll cyclic Tab 7 5 Procedure read data from PLC Layer 7 PC transfers data into the PLC Write PC side CP function PLC side WRITE S5Schr...

Page 221: ...ctType NORMAL_LINE PASSIV_LINE Write active FB Send FB SendAll cyclic FB ReceiveAll cyclic Tab 7 7 Procedure PLC transfers data to PC Layer 7 PLC reads data from PC PC side CP function PLC side FETCH...

Page 222: ...AMS H1 Parameter Priority This parameter is included to provide compatibility with the NET NET file functions Any values in this parameter are ignored ConnectType Here you must specify the type of con...

Page 223: ...define the length of the TSAP of the destination system The length of a TSAP can be from 0 to 16 bytes A length of 0 specifies that no TSAP is to be used DestTSAP TSAP Transport Service Access Point...

Page 224: ...st be used for any future function calls that relate to this connection The connection number may be released by the function H1StoppeVerbindung Fehler Fehler error may contain an error message as des...

Page 225: ...as never opened the respective connection no longer exists H1_WAIT_DATA No data was received as yet You can determine the status of a connection by means of H1AbfrageLesen H1_WAIT_SEND Data has not be...

Page 226: ...ss 6 bytes consists of the following bytes 1 2 3 0x00 0x20 0xD5 VIPA network identifier bytes 4 5 6 these 3 bytes are located on the CP1413plus Z NYX adapter Fig 7 3 The ethernet end address of the Z...

Page 227: ...to exchange data with the destination system It is possible to establish multiple connections to different or even to the same system When one of these connections is no longer required it should be t...

Page 228: ...an application program running on the PC All required structures are specified in the file H1DEF H Do not use any other structures VIPA reserves the right to change this file if system expansions or e...

Page 229: ...se function releases any allocated resources All the connections established for the current task are terminated Parameters none Returns 0 H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER Note This must be the...

Page 230: ...ameters version a pointer to an unsigned short variable that contains the version number of the H1 driver in BCD code Example a return of 304 indicates version 3 04 Return 0 H1_No_SLOT H1_NO_DRIVER H1...

Page 231: ...RIVER H1_NO_ADAPTER Returns 0 an operating system error has occurred 0 the cr Fehler element contains one of the above values Note If this function was completed successfully and without an error a co...

Page 232: ...by cr Fehler 0 H1_BAD_CR_PARAMS H1_NO_SLOT H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER ov a pointer to a structure of the type OVERLAPPED You must first create an event The event is enabled when the conne...

Page 233: ...ber in the most significant word and the connection reference in the least significant word Returns 0 H1_NO_SLOT H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER Note The connection number is not available any...

Page 234: ...number in the most significant word and the connection number in the least significant word ov pointer to a structure of the type OVERLAPPED You must have created an event previously The event will be...

Page 235: ...H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER Note All connection numbers that have been established will become invalid when this function has completed The driver must have been opened by means of H1Drive...

Page 236: ...arameters ov pointer to a structure of the type OVERLAPPED You must have created an event previously The event will be issued when the connection has been closed successfully The function H1GetOverlap...

Page 237: ...ry area that contains the station parameters Byte 0 1 length of the station address Byte 2 7 current station address Byte 8 13 ROM station address nKarte adapter number 0 3 default 0 This is a default...

Page 238: ...ation addresses must never be duplicated This would cause collisions on the network The station address can only be altered if the MAC driver H1 driver is set to operate in promiscuous mode For Window...

Page 239: ...arameters init pointer to a memory area containing the system values nKarte adapter number 0 3 default 0 This is a default parameter that may not be required Returns 0 H1_NO_SLOT H1_NO_DRIVER H1_NO_AD...

Page 240: ...ion operates with both old and new parameters H1 system values Window sizes MaxCredit Maximum window size Permanently 0 MinCredit Minimum window size Permanently 0 Default settings for requests Persis...

Page 241: ...f 10 milliseconds Default 600 6 seconds Parameter for transport acknowledgements ACK s FlowControlWindowTimeout multiples of 10 milliseconds Default 1000 InactivityMaxCount maximum value default 3 Rep...

Page 242: ...sets H1_BLOCKED_DATA in the element Fehler Bit 15 must never be set in the last message of a blocked transmission Possible values returned by send Fehler are 0 H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER...

Page 243: ...ure containing transmit parameters The parameters Vnr DataLen and SendLen 0 must be specified The buffer located at the end of the structure must have a length of sizeof H1_SENDPARAMS DataLen Blocked...

Page 244: ...in the element Fehler Bit 15 must never be set in the last message of a blocked transmission Possible values returned by send Fehler are 0 H1_BAD_LINE H1_WAIT_SEND H1_NO_DRIVER H1_NO_ADAPTER H1_NOT_S...

Page 245: ...must have a length of sizeof H1_SENDPARAMS DataLen Bit 15 of element Vnr must be set if the message must form a part of a blocked transmission On the receiving side this bit sets H1_BLOCKED_DATA in th...

Page 246: ...The parameters Vnr DataLen and SendLen 0 must be specified The buffer located at the end of the structure must have a length of sizeof H1_SENDPARAMS DataLen Blocked data messages are not permitted Po...

Page 247: ...es below 0 H1_BAD_LINE H1_WAIT_SEND H1_NO_DRIVER H1_NO_ADAPTER H1_NOT_SUPPORTED Note You may use the H1StarteSendenOverlapped function instead of the pair of functions H1StarteSenden H1AbfrageSenden I...

Page 248: ...H1_BAD_LINE N ret 0 N cr Fehler 0 Y Y Analyse error code returned by operating system Y cr Fehler H1_BAD_LINE N N Y N Analyse error code returned by operating system Bad connection number or connecti...

Page 249: ...s to the caller when data was received successfully or when a timeout has occurred Where large quantities of data are received resulting in the H1_BLOCKED_DATA message you must ensure that H1LeseDaten...

Page 250: ...H1Rec H1_RECPARAMS malloc sizeof H1_RECPARAMS RECLEN H1Rec Vnr H1ConnectParams Vnr Connection number H1Rec DataLen RECVLEN Size of the data packet RecLen H1Rec RecLen 0 reset H1Rec Fehler H1_WAIT_DAT...

Page 251: ...VER H1_NO_ADAPTER H1_NOT_SUPPORTED Returns 0 An error has occurred in the operating system 0 The rec Fehler element contains one of the above values Note This function only returns to the caller when...

Page 252: ...n H1AbfrageLesen must be called again Where large quantities of data are received resulting in the H1_BLOCKED_DATA message you must ensure that H1LeseDaten is called repeatedly until all data has been...

Page 253: ...H1ConnectParams Vnr Connection number H1Rec DataLen RECLEN Size of data packet RecLen H1Rec RecLen 0 reset H1Rec Fehler H1_WAIT_DATA while ret H1Rec DataLen H1Rec Fehler Condition DataLen the data act...

Page 254: ...GetOverlappedResult Parameters rec pointer to a structure containing receive parameters The parameters Vnr DataLen and SendLen 0 must be specified The buffer located at the end of the structure must h...

Page 255: ...e rec Fehler element contains one of the above values Note This function initiates a read task The result of the function can be checked by means of H1AbfrageLesenEx You may use the H1StarteLesenExOve...

Page 256: ...and SendLen 0 must be specified The buffer located at the end of the structure must have a length of sizeof H1_RECPARAMS DataLen Possible values returned by rec Fehler are 0 H1_BLOCKED_DATA H1_BAD_LI...

Page 257: ...by rec Fehler 0 H1_BLOCKED_DATA H1_BAD_LINE H1_WAIT_DATA H1_NO_DRIVER H1_NO_ADAPTER H1_NOT_SUPPORTED Returns 0 An error has occurred in the operating system 0 The rec Fehler element contains one of th...

Page 258: ...RECPARAMS DataLen Possible values returned by rec Fehler 0 H1_BLOCKED_DATA H1_BAD_LINE H1_WAIT_DATA H1_NO_DRIVER H1_NO_ADAPTER H1_NOT_SUPPORTED Returns 0 An error has occurred in the operating system...

Page 259: ...f the type OVERLAPPED This is a structure that is used for Overlapped functions The completion of the above functions can be checked by means of a call to the function H1GetOverlappedResult LpNumberOf...

Page 260: ...0 cr Fehler 0 Y N Analyse error code returned by operating system Y cr Fehler H1_BAD_LINE N N Y N Analyse error code returned by operating system read again Y N H1StoppeVerbindung H1DriverClose END ST...

Page 261: ...Connections that are no longer required should be closed You must configure the passive tasks SendAll and RecAll before communications between PLC and PC can be established The PLC functions S5StarteL...

Page 262: ...structure containing connection parameters The value Vnr is set if the function completes without error This represents the connection number However this number will only be returned if all drivers...

Page 263: ...All internal memory locations in the library and in the drivers are released when this function completes Parameters vnr Here you must supply a valid connection number of a connection that was starte...

Page 264: ...inate all connections include S5ACCESS H USHORT WENTRY_C S5StoppeVerbindungen void The S5StoppeVerbindungen function is used to terminate all established connections Parameters none Returns 0 H1_BAD_L...

Page 265: ...mum revision level of the installed drivers is matched or exceeded You can retrieve the revision level of the H1 driver by means of cprev H1Rev It is possible that some functions contained in this des...

Page 266: ...s Byte 2 7 current station address Byte 8 13 ROM station address fixed nKarte adapter number 0 3 Default 0 This parameter has a default value and may be ignored when the function is called Returns 0 H...

Page 267: ...is possible that collisions occur on the network It is only possible to modify the station address when the MAC driver H1 driver is set to operate in promiscous mode In windows NT this mode can be sel...

Page 268: ...oc sizeof S5_PARAMS RECVLEN The function was completed properly if it returns 0 otherwise the return value contains the H1 error If the returned value is 0 you can access the data as follows PLCData 0...

Page 269: ...n was completed properly if it returns 0 otherwise the return value contains the H1 error If the returned value is 0 you can access the data as follows PLCData 0 UCHAR s5 sizeof S5_PARAMS 0 PLCData 1...

Page 270: ...Programming CP1413plus manual 7 64 Rev 00 07 Returns 0 H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER See also S5StarteLesenOverlapped S5AbfrageLesenOverlapped...

Page 271: ...ameters s5 pointer to a structure of the type S5_PARAMS The values Kennung DB DW and Len of the s5 structure must contain valid entries s5 must contain a valid connection number which was returned by...

Page 272: ...by the function S5StarteVerbindung You must allocate the required amount of memory after the s5 structure s5 malloc sizeof S5_PARAMS RECVLEN If the returned value is 0 you can poll for data by means o...

Page 273: ...g DB DW and Len of the s5 structure must contain valid entries s5 must contain a valid connection number which was returned by the function S5StarteVerbindung The function will either return a 0 or an...

Page 274: ...number which was returned by the function S5StarteVerbindung The function will either return a 0 or an H1 error If the returned value is 0 you can access the received data as follows PLCData 0 UCHAR...

Page 275: ...CP1413plus manual H1 Driver V3 xx for Windows NT Rev 00 07 7 69 Returns 0 H1_BAD_LINE H1_WAIT_DATA H1_NO_DRIVER See also S5LeseAusSPS S5StarteLesen...

Page 276: ...Programming CP1413plus manual 7 70 Rev 00 07 Flowchart Read from PLC Fig 7 7 Flowchart Read from PLC...

Page 277: ...S5_PARAMS SENDLEN Write data can be supplied as follows memcpy UCHAR s5 sizeof S5_PARAMS PCData SENDLEN The function will either return a 0 or an H1 error Tab 7 9 contains an overview of the H1 errors...

Page 278: ...5 structure s5 malloc sizeof S5_PARAMS SENDLEN Write data can be supplied as follows memcpy UCHAR s5 sizeof S5_PARAMS PCData SENDLEN The function will either return a 0 or an H1 error Tab 7 9 contains...

Page 279: ...CP1413plus manual H1 Driver V3 xx for Windows NT Rev 00 07 7 73 Returns 0 H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER See also S5StarteVerbindung S5StartSchreiben S5StoppeVerbindung S5AbfrageSchreiben...

Page 280: ...quired amount of memory for received data after the s5 structure s5 malloc sizeof S5_PARAMS SENDLEN Write data can be supplied as follows memcpy UCHAR s5 sizeof S5_PARAMS PCData SENDLEN The function w...

Page 281: ...tructure s5 malloc sizeof S5_PARAMS SENDLEN Write data can be supplied as follows memcpy UCHAR s5 sizeof S5_PARAMS PCData SENDLEN The function will either return a 0 or an H1 error Tab 7 9 contains an...

Page 282: ...Programming CP1413plus manual 7 76 Rev 00 07 Returns 0 H1_BAD_LINE H1_NO_DRIVER H1_NO_ADAPTER See also S5StarteVerbindung S5SchreibeInSPS S5AbfrageSchreiben S5StoppeVerbindung...

Page 283: ...ter to a structure of the type S5_PARAMS The values Kennung DB DW and Len of the s5 structure must contain valid entries s5 must contain a valid connection number which was returned by the function S5...

Page 284: ...by the function S5StarteVerbindung The function will either return a 0 or an H1 error Tab 7 9 contains an overview of the H1 errors and their description Any S5 errors returned by the other station ar...

Page 285: ...Fehler 0 Y S5 Fehler H1_BAD_LINE N ret 0 N cr Fehler 0 Y Y Analyse error returned by operating system Enter correct parameter N cr Fehler H1_WAIT_CONNECT Y N Y N Analyse error returned by operating s...

Page 286: ...The function will either return a 0 or an H1 error Tab 7 9 contains an overview of the H1 errors and their description UserFctCall pointer to the call back function Once the request has been received...

Page 287: ...e consisting of a valid pointer to an s5 structure This structure may contain the same address as the received structure or another address that you have reallocated Reallocation is one way of dynamic...

Page 288: ...nce the amount has become available The function will either return a 0 or an H1 error Tab 7 9 contains an overview of the H1 errors and their description UserFctCall pointer to the call back function...

Page 289: ...e consisting of a valid pointer to an s5 structure This structure may contain the same address as the received structure or another address that you have reallocated Reallocation is one way of dynamic...

Page 290: ...ot available DB not present 3 PLC area too small 4 QVZ error occurred in PLC 5 error in display word ANZW 6 invalid ORG format 7 no data buffers available 8 no unused transport connections 9 error at...

Page 291: ...ilename and path All Net file functions that do not refer to a specific filename will use this new filename Returns 0 OK name was accepted 1 filename too long Note The specified path must exist but th...

Page 292: ...ard parameter file Net net is the standard parameter file and it is located in the root directory of drive C The name and path of this file can be changed at any time To do this proceed as follows 1 S...

Page 293: ...tor to create and to modify this file Chapter 7 6 5 1 describes the format of this file Parameters s5daten a pointer to the structure S5_CONNECTIONDATA The element Connectionname must contain a valid...

Page 294: ...u may use an ASCII editor to create and to modify this file Chapter 7 6 5 1 describes the format of this file Parameter s5daten a pointer to the structure S5_CONNECTIONDATA The element Connectionname...

Page 295: ...ngsparameter This function uses the same file as described for S5HoleVerbindungsparameter Parameters s5daten is a pointer to the structure S5_CONNECTIONDATA All elements must contain valid settings Re...

Page 296: ...ungsparamsKarte This function uses the same file as described for S5HoleVerbindungsparameter Parameters s5daten is a pointer to the structure S5_CONNECTIONDATA_ ADAPTER All elements must contain valid...

Page 297: ...The allocated length must equal or exceed the setting in len Returns 0 OK memory now contains the connection names separated by null terminators and a byte Bit 0 the connection is in use if this is se...

Page 298: ...h of the memory area used for the transfer mem is the pointer to the memory area The allocated length must equal or exceed the setting in len Returns 0 OK memory now contains the connection names sepa...

Page 299: ...ters netfile the name of the Net file vname the name of the respective connection cr the structure where the parameters should be saved Returns 0 OK data is located in the structure TEXT_NO_NET_FILE C...

Page 300: ...specified Net file Parameters netfile the name of the Net file vname the name of the respective connection cr the structure where the parameters should be saved All parameters must contain valid entr...

Page 301: ...eters netfile the name of the Net file vname the name of the respective connection s5 the structure where the parameters should be saved Returns 0 OK data is located in the structure TEXT_NO_NET_FILE...

Page 302: ...specified Net file Parameter netfile the name of the Net file vname the name of the respective connection s5 the structure where the parameters should be saved All parameters must contain valid entri...

Page 303: ...parameter It may contain a real number a string of characters or a string of characters enclosed in quotation marks Most sections have a number of different parameters You may also include comments in...

Page 304: ...rameters depends on the destination system This entry is a HEX number Example EthernetStartParameter 20303436h EthernetLeitungsart Ethernet line type Defines the type of operation Accepted values are...

Page 305: ...8 Supplement Please find here the current product description which was not ready for print earlier...

Page 306: ......

Page 307: ...r having to mesh with it Features Supports the Plug and Play technology this means that it is fully integrated in the system without the user having to mesh with it Auto Select Media Type means the au...

Page 308: ...attention to the following Hints 1 Turn off the computer and remove the power cable 2 Remove the cover of the computer according to the instructions of the manufacturer 3 Remove the metal Slot covers...

Page 309: ...r the installation The data can be obtained from your system administrator Network access user name password Computer name Workgroup name Main server First local network The letters are ordered in acc...

Page 310: ...n in the network Go to the Windows 95 Start Men to the Men point Einstellungen Select here the Systemsteuerung The window Systemsteuerung will open In this window call up the programm Netzwerk The dia...

Page 311: ...sk SW88C Disk 1 3 und click Diskette Select the disk drive and click OK The driver list from 3COM will be displayed In the manufacturer list select the following card and click OK 3COM EtherLink XL CO...

Page 312: ...nual 6 Rev 00 07 Installation under Windows NT Start Windows NT and select under Start Einstellung Systemsteuerung Netzwerk The following window will open Insert the disk SW88C Disk 1 3 and select the...

Page 313: ...l be opened Click Diskette The following dialogue window will open with the spezified driver Select the driver and confirm with OK All necessary data will now be transfered to the PC Start the PC anew...

Page 314: ...ion of the H1 driver under Windows NT the delivered disk SSN SW83N Disk 1 1 is necessary Select under Start Einstellung Systemsteuerung Netzwerk The following window will open Insert the disk SSN SW83...

Page 315: ...ard from VIPA Rev 00 07 9 A selection list will be opened Click on disk All necessary data will now be transfered to the PC Start the PC anew Do not forget to remove the disk from the drive The H1 dri...

Page 316: ...ernet Interface AUI IEEE 802 3i BNC RJ 45 PC Interface 32 Bit PCI Bus Rev 2 0 Protection type IP00 according to DIN 40050 Ambient Conditions Operating temperature 0 C 70 C Storage temperature 40 C 70...

Page 317: ...Appendix A Technical data A 1 B Abbreviations B 1 C List of figures C 1 D Index D 1...

Page 318: ...dfgdfgfdg...

Page 319: ...erface AUI IEEE 802 3 BNC RJ 45 PC interface 32 Bit PCI Bus Rev 2 0 Protection class IP00 as per DIN 40050 Permissible environmental conditions Operating temperature 0 C 50 C Storage temperature 40 C...

Page 320: ...Bit ISA Bus I O Base 200h 3E0h in 10h Schritten EISA Interrupt Request 3 4 5 7 9 10 11 12 15 Plug and Play Yes Protection class IP00 as per DIN 40050 Permissible environmental conditions Operating te...

Page 321: ...ccess with Collision Detect D DA Destination Address DC Disconnect Confirm DISC Disconnect DLC Data Link Control DM Disconnect Mode DR Disconnect Request DSP Domain Specific Part which station has bee...

Page 322: ...ect RNR Receiver Not Ready RR Receive Ready S SA Source Address SABME Set Asynchronous Balanced Mode Extended SAP Service Access Points SFD Start Frame Delimiter SP Segmentation Permitted T TCP Transm...

Page 323: ...connection to a thick ethernet network 3 5 Fig 3 4 PCI adapter connection to a twisted pair network 3 6 Fig 3 5 Installation of the 3Com adapter 3 32 Fig 3 6 Selecting On board Coax BNC 3 37 Fig 3 7 S...

Page 324: ...List of figures CP1413plus manual C 2 Rev 00 07...

Page 325: ...estination address 4 6 7 17 DestTSAP external 7 17 Determine station address 7 31 7 60 Determine the version of the driver 7 24 Determining the driver version 4 15 Determining the ethernet address 4 1...

Page 326: ...ng 7 27 7 30 H1StoppeVerbindungen 7 29 H1StoppeVerbindungOverlapped 7 28 H1TestConnection 4 19 4 21 H1WriteParameter 4 58 Hub 2 16 I Initiate connection 4 16 Initiate connections for multiple adapters...

Page 327: ...9 Send expedited data 4 30 Set MS DOS entry Vector 4 28 Set NET NET filename 7 85 Set NET NET file name 4 46 Set station address 4 24 4 55 7 32 7 61 Set station address for multiple adapters 4 25 4 56...

Page 328: ...ex CP1413plus manual D 4 Rev 00 07 hardware installation 3 4 network cabling 3 5 software installation 3 7 MS DOS 3 8 OS 2 3 21 Windows NT 3 25 7 4 Z nyx adapter guide 3 1 Z nyx board locator 1 3 M St...

Reviews: