background image

Saia-Burgess 

Controls Ltd.

Manual Modem PCDxx7 Serie│Doc. 26/793; Ed. E2│30.04.2005 

Example: Starting an application

5

5-3

Initialization of the Driver

In our case we are taking the string message for the selected modem.

intern_70

BYTE

B#16#B

! DO NOT EDIT !

OK_STRING

STRING[7]

‚OK‘

Configurable

intern_71

BYTE

B#16#1

! DO NOT EDIT !

OK_NUM

STRING[7]

‚0$R‘

! DO NOT EDIT !

intern_72

BYTE

B#16#1

! DO NOT EDIT !

CONNECT

STRING[7]

‚CONNECT‘

Configurable

intern_73

BYTE

B#16#2

! DO NOT EDIT !

RING

STRING[7]

‚RING‘

Configurable

intern_74

BYTE

B#16#3

! DO NOT EDIT !

NO_CARRIER

STRING[7]

‚NO CARR‘

Configurable

intern_75

BYTE

B#16#4

! DO NOT EDIT !

ERROR

STRING[7]

‚ERROR‘

Configurable

intern_76

BYTE

B#16#5

! DO NOT EDIT !

ERROR_NUM

STRING[7]

‚4$R‘

! DO NOT EDIT !

intern_77

BYTE

B#16#5

! DO NOT EDIT !

NO_DIAL_TONE

STRING[7]

‚NO DIAL‘

Configurable

intern_78

BYTE

B#16#7

! DO NOT EDIT !

BUSY

STRING[7]

‚BUSY‘

Configurable

intern_79

BYTE

B#16#8

! DO NOT EDIT !

NO_ANSWER

STRING[7]

‚NO ANSW‘

Configurable

intern_710

BYTE

B#16#9

! DO NOT EDIT !

BLACK_LISTED

STRING[7]

‚BLACK‘

Configurable

Intern_711

BYTE

B#16#A

! DO NOT EDIT !

 

DO NOT EDIT, system parameters

5.1.4  Initialize DB

When all the parameters of the DB100 have been set, you need now to initialize the 

DB, 

this is very important.

1. 

In the menu View of the editor, select the option “Data view“.

2. 

In the menu Edit, select the function “Initialize Data Block“.

Is this done, you can save your DB and close it.

5.2 

Initialization of the Driver

In our example, all the modem functions including the modem driver  are used in the 

FC1. To insure a proper use of the modem, it’s necessary that the modem Driver 

function is called every cycle after the initialization of it.

Usually we initialize the modem and its Driver after the POWER ON. If the POWER 

ON of the PCD and the modem is done in the same time, then the initialization of the 

modem should be delayed a little bit, to be sure that the modem is in order to answer. 

Содержание PCD 7 Series

Страница 1: ...Document No 26 793 Edition E2 30 04 2005 Manual Modem PCD xx7 Serie...

Страница 2: ...the receiving 3 1 3 1 2 Receiving process 3 1 3 2 Make an Outgoing call 3 1 3 2 1 Starting call process 3 1 3 2 2 Function 3 2 4 Protocols 4 1 Con guration DB 4 1 4 2 Enabling protocol 4 3 4 2 1 Func...

Страница 3: ...ameters DB_TAP 8 2 8 3 TAP function 8 3 8 3 1 Integration to the application 8 4 9 Appendix 9 1 Appendix 1 Initialization strings 9 1 9 2 Appendix 2 Error Codes 9 2 9 2 1 Error returned by the Modem D...

Страница 4: ...003 Published Edition 26 793 E2 30 04 2005 New Chapter 8 SMS TAP function 0 2 Trademarks SAIA and SAIA PCD are registered trademarks of SAIA Burgess Electronics AG STEP SIMATIC S7 300 S7 400 and Sieme...

Страница 5: ...tion block FB Modem DRIVER which handles the command sent to the modem and the answer received from the mo dem It controls the modem status and allows the other telecommunication function to proceed T...

Страница 6: ...to this only the serial interface 1 of the PCD PCD2 F120 or interface 2 e g 4 PCD7 F522 as one RS232 can be use for the modem communication The number of all the function and data block in the modem...

Страница 7: ...alog modem PCD2 T813 or PCD2 T813z42 This DB_Modem is divided in two parts 1 The rst part is reserved for internal use of the Modem Driver the eld in the DB is called reserve and it s the UDT100 Do no...

Страница 8: ...buffer The input buffer is use by the modem DRIVER but also by the other function which will access to the serial port like the protocol functions Make sure it s large enough for the amount of data y...

Страница 9: ...the command to disconnect from the phone line The string has to start with AT and be nish with R MODE_COMMAND String to switch from transparent mode to modem command mode DIAL_PREFIX This is the diali...

Страница 10: ...se is very important usually in upper case be sure to write it correctly e g For the ERROR answer the eld ERROR of the structure Modem_message will contain ERROR Description of the parameters and thei...

Страница 11: ...INT IN The number of the DB_Modem see chapter 2 1 TIMER_N TIMER IN The number of a TIMER reserved for the modem func tion The driver needs internally a TIMER This TIMER can t be used by the user anymo...

Страница 12: ...h out error the Driver is going in a WAITING status Otherwise if an error appended the Driver will not be ready and an error code will be issued On this status the Driver is waiting for an incoming ca...

Страница 13: ...h the serial line For this reason it is possible now to use the serial line with any other kind of protocol The Driver is just watching the status of the DCD signal When the DCD signal disappears it m...

Страница 14: ...rom the calling function is reset The Driver goes in the GET DISCONNECTED status The GET DISCONNECTED status in the rst step recon gure the serial COM port 1 Then switch the modem in command mode and...

Страница 15: ...em will answer after the number of RING signals set in the register You can set this value in the initialization string command chapter 2 1 2 The para meter will be S0 0 for no answer or S0 3 for answ...

Страница 16: ...connect TIMER_N2 TIMER IN The number of a TIMER reserved for the modem call function the call function needs internally this TIMER This TIMER can t be use by the S7 program anymore ERROR BOOL OUT 1 i...

Страница 17: ...n an error The output ERROR will be set to 1 and the STATUS will contain the cause of the unsuccessful call The ERROR output and STATUS will be reset when the CALL_REQ input is 0 Successful If the cal...

Страница 18: ...with it a DB which contains the parameters required In order to understand clearly the use of the enabling protocol function you should be in possession of the protocol documentation manual no 26 794...

Страница 19: ...Man 26 794 TRY_CONNECT 0 255 Depending on the chosen protocol see Man 26 794 TRY_SEND 0 255 Depending on the chosen protocol see Man 26 794 FIXED_LENGTH 1 1024 Only for the xed length ASCII driver the...

Страница 20: ...re due to an incorrect value in the parameter of the DB_PROTOCOL 4 2 1 Function When a rising edge is detected on the input ENABLE_PROTOCOL the function will initialize the serial COM port 1 with the...

Страница 21: ...number can be changed UDT100 DB_Modem_sub_type the number can be changed but you also need to edit the DB100 and to change the UDT number in it FC701 Modem_Calling function the number can be changed...

Страница 22: ...e INIT_COMMAND Also it s betterif no echo are issued from the modem This is the parameter E0 in the INIT_COMMAND The application speci c parameter are the DIAL_NUMBER it s were you de ne the list of t...

Страница 23: ...Con gurable intern_79 BYTE B 16 8 DO NOT EDIT NO_ANSWER STRING 7 NO ANSW Con gurable intern_710 BYTE B 16 9 DO NOT EDIT BLACK_LISTED STRING 7 BLACK Con gurable Intern_711 BYTE B 16 A DO NOT EDIT DO NO...

Страница 24: ...lling and getting connected with other subscriber we need to integrate the calling function into the project This is done very easily with the FC701 The FC can be called every cycle It does not affect...

Страница 25: ...ol As soon the connection is completed the Driver signals it by setting the bit M50 2 to 1 and as it is an outgoing call the bit M50 3 stay at 0 5 4 Switching the protocol 5 4 1 Con guration To use a...

Страница 26: ...nly for outgoing calls Then it s possible to en able a different protocol for incoming calls PROTOCOL_DB which contains the protocol con guration parameters DB_DRIVER which is the DB_MODEM containing...

Страница 27: ...ion and the other area contains the information about the application The SMS function also need to access the sub function of the FC700 Modem Driver sub function The synchronization between the Modem...

Страница 28: ...ype Description BAUD_RATE DINT 1 BAUD RATE to communicate with the SMS center DATA_BIT INT 1 Number of data bits STOP_BIT INT 1 Number of stop bits PARITY_MODE INT 1 Parity bit mode INTERFACE_TYPE INT...

Страница 29: ...successful transmission or on the output ERROR and Status if an error has been detected in the SMS con guration or mes sage If after a delay of 30 seconds the SMS Center didn t answer to our request t...

Страница 30: ...d rate sup ported by the SMSC 1 Integrate in your project the SMS function FC800 DB800 and UDT800 2 Con gure the DB_SMS see 6 2 2 and 6 2 3 3 In Data Blocks prepare the SMS message in a string format...

Страница 31: ...stablish the connection with the Page Center and then the Pager function can be called The Pager function is associated with a Pager Data Block The Data Block is divided in two areas One is reserved f...

Страница 32: ...re that the protocol is UCP Phone numbers for ISDN modems Country Provider Phone number Note Type Switzerland Swisscom 074 090 0103 V 110 ISDN Switzerland Swisscom 074 090 0108 X 75 ISDN 7 2 2 Pager s...

Страница 33: ...unction This function will interface the PCD to the Page Center Sending the Message and receive back the answer for acknowledge or error In order to work correctly the PCD need the connection to be es...

Страница 34: ..._SEND is reset Status INT OUT Error code of the operation output the code until the Req_SEND is reset 7 3 1 Integration to the application Integrate in your project the modem driver library see chapte...

Страница 35: ...c 26 793 Ed E2 30 04 2005 Sending Pager Messages 7 7 5 Pager function Call of the function No incoming call Connection established Pointer to the message Message type Use the return signals to disconn...

Страница 36: ...nter and then the TAP function can be called Modem DRIVER DB_Modem MODEM Calling FUNCTION TAP function FC801 SERIAL COM 1 S7 user application DCD DTR TAP DB DB810 Modem DRIVER sub function FC700 Modem...

Страница 37: ...Austria 0900 664 914 9600 7E1 Make sure that the protocol is TAP Phone numbers for ISDN modem Country Provider Phone numbe Protocol Baudrate Comm settings Germany DeTeMobil 0171 25 21 001 X 75 1200 8N...

Страница 38: ...age and receive back the answer for acknowledge or error In order to work correctly the PCD needs the connection to be established with the TAP Center The connection is done with the Calling Function...

Страница 39: ...UT Error code of the operation output the code until the Req_SEND is reset 1 The total length of SMS_Message and SMS_Recipient_num can be 250 charac ters Some TAP centre allows a maximum length of 160...

Страница 40: ...ss Controls Ltd Manual Modem PCDxx7 Serie Doc 26 793 Ed E2 30 04 2005 Sending SMS 8 8 5 TAP functions Call of the function Use the return signals to disconnect You can nd a similar examples in the mod...

Страница 41: ...ommand INIT_COMMAND_1 AT FE0V1S0 1 D2B10 Z R 2th init command INIT_COMMAND_2 AT W R Hangup command ATH R Break mode MODE_COMMAND ZVZ 20 Parameter Description First init command S0 x Set Auto answer Mo...

Страница 42: ...arameter RCVBuffer and the SENDBuffer different from the rst call of the SFC Error in Receiving Error number Description 396 Length too long compare to the buffer size 401 Invalid com port 402 COM por...

Страница 43: ...uest in the 30 seconds 1 1 Check sum error internal 2 1 Syntax Error 3 1 Operation not supported by the system 4 1 Operation not allowed at this moment 5 1 Call barring active 6 1 Recipient number inv...

Страница 44: ...at this moment 6 1 Recipient number invalid 24 1 Message too long 9 3 Appendix 3 Pager character set For numeric messages some special characters are allowed the following table shows the allowed char...

Страница 45: ...ly for the SAIA Burgess PCD Classic serie x x 7 Explanations beside this sign are valid only for the SAIA Burgess PCD xx7 serie 9 4 2 Product and documentation concept The SAIA PCD product range is ri...

Страница 46: ...support ch Please read also our Controls News published on internet side http www controls news ch P documentation P preliminary describes new or extensively redeveloped prod ucts After extensive inte...

Страница 47: ...turn also contribute his share to the reliable operation of an installation He is therefore responsible for ensuring that controller use conforms to the technical data and that no excessive stresses...

Страница 48: ...been developed by SBC itself and are marketed as embedded controls With full technical knowledge of all system elements and with quality oriented busi ness processes SBC is equipped to provide unique...

Страница 49: ...sse 18 CH 3280 Murten Switzerland Telephone 41 26 672 71 11 Telefax 41 26 672 74 99 E mail pcd saia burgess com Homepage www saia burgess com Support www sbc support ch Saia Burgess Controls Kft Liget...

Отзывы: