4. Avec le terminal CPX sur Ethernet
Exemple
STEP
"" Set user name and mail host
IF
NOP
THEN
CMP 30
WITH V1
WITH V10
WITH V11
IF
FU32
= V0
THEN
NOP
STEP
"" Send e–mail
IF
NOP
THEN
CMP 30
WITH V2
WITH V12
WITH V13
WITH V14
WITH V2
IF
FU32
= V0
THEN
NOP
STEP
"" Wait until E–mail is sent
IF
NOP
THEN
CMP 30
WITH V0
WITH V20
IF
FU32
= V0
THEN
LOAD FU34
TO FW34
LOAD FU35
TO FW35
4−20
Dans la section suivante du programme, sont d'abord spéci
fiés le nom de l'utilisateur et le mailhost puis un e−mail est
envoyé :
'E–MAIL module
"1:set name and mail host
"string#10: user name
"string#11: mail host
'Parameter 1
'E–MAIL module
"2 send mail
"string#12: Target address
"string#13: Re:
"string#14: Mail text
"Number of strings with mail text (here 2)
'Parameter 1
'E–MAIL module
"0:Status interrogation
"string#20: Reply from mail host
'Parameter 2
'Parameter 3
'SMTP fault code
'Parameter 4
'SMTP additional fault code
Festo P.BE−CPX−FEC−FR fr 0404NH