Lenze PLC Designer PLC Designer (R2-x) Manuel d'utilisateur Page 513

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 844
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 512
L-force | PLC Designer
Operands in PLC Designer
DMS 3.2 EN 02/2011 TD29 511
See in the following examples for such a bitaccess on a variable resp. a structure
variable:
Declaration in global variables list for both examples:
Variable enable defines which bit should be accessed:
VAR_GLOBAL CONSTANT
enable:int:=2;
END_VAR
Example 1, Bitaccess on an integer variable:
Declaration in POU:
VAR
xxx:int;
END_VAR
Bitaccess:
xxx.enable:=true; -> the third bit in variable xxx will be set TRUE
Example 2, Bitaccess on an integer structure component:
Declaration of structure stru1:
TYPE stru1 :
STRUCT
bvar:BOOL;
rvar:REAL;
wvar:WORD;
{bitaccess enable 42 'Start drive'}
END_STRUCT
END_TYPE
Vue de la page 512
1 2 ... 508 509 510 511 512 513 514 515 516 517 518 ... 843 844

Commentaires sur ces manuels

Pas de commentaire