14.07.2013 Views

5.6 Mesure étendue MEASA, MEAWA, MEAC (à partir de SW 4

5.6 Mesure étendue MEASA, MEAWA, MEAC (à partir de SW 4

5.6 Mesure étendue MEASA, MEAWA, MEAC (à partir de SW 4

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Programmation CN flexible 12.97<br />

<br />

840 D<br />

NCU 571<br />

840 D<br />

NCU 572<br />

NCU 573<br />

FM-NC 810D<br />

<br />

Cette fonctionnalité permet d’extraire une chaîne<br />

partielle <strong>de</strong> caractères d’une chaîne <strong>de</strong> caractères.<br />

Pour ce faire, on précise l’indice du premier caractère<br />

et, le cas échéant, la longueur désirée. Si l’information<br />

<strong>de</strong> longueur n’est pas précisée, c'est toute la chaîne<br />

<strong>de</strong> caractères restante qui est prise en compte.<br />

STRING_ERG = SUBSTR (STRING,INT) Type <strong>de</strong> résultat : INT<br />

STRING_ERG = SUBSTR (STRING,INT, INT) Type <strong>de</strong> résultat : INT<br />

<br />

Dans le premier cas, la chaîne partielle <strong>de</strong><br />

caractères est restituée <strong>à</strong> <strong>partir</strong> <strong>de</strong> la position définie<br />

par le premier paramètre et jusqu’<strong>à</strong> la fin <strong>de</strong> la<br />

chaîne <strong>de</strong> caractères.<br />

Dans le second cas, la chaîne restituée est limitée<br />

<strong>à</strong> la longueur indiquée par le troisième paramètre.<br />

Si la position <strong>de</strong> départ se trouve après la fin <strong>de</strong> la<br />

chaîne, il y aura restitution d'une chaîne <strong>de</strong><br />

blancs (" ").<br />

Si la position <strong>de</strong> départ ou la longueur est négative, il<br />

y aura déclenchement d'une alarme.<br />

Exemple :<br />

DEF STRING [29] ERG<br />

ERG = SUBSTR ("ACQUITTEMENT:<br />

10 <strong>à</strong> 99", 10, 2)<br />

;ainsi : ERG == "10"<br />

© Siemens AG 1997 All rights reserved.<br />

1-50 SINUMERIK 840D/810D/FM-NC Manuel <strong>de</strong> programmation Notions complémentaires (PGA) - Edition 12.97

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!