Bonjour,
Je souhaites faire une seule vue qui gère 20 éléments d'un tableau.
Ma valeur d'index est attribuée sur ma première vue par simplement un bouton (Bt1 = 1, Bt2 = 2 etc)
Mon tableau dans le DB est un array 1..20.
Quand ma valeur d'index dans la variable Interne HMI est à 1, il prend l'élément tableau 2 dans le DB ainsi de suite.
Donc un décalage de 1. Je suppose que c'est normal mais il doit y avoir une explication qui est sans doute basic
Merci.
Edit: Je fais démarré une variable à partir de 0 ainsi c'est bon mais c'est bricole non...
Indexage Variable HMI Tia Portal V17
-
- Asservi son premier moteur
- Messages : 22
- Enregistré le : 27 déc. 2018, 23:51
- Localisation : Vendée
Re: Indexage Variable HMI Tia Portal V17
Bonsoir,
Trouvé sur un tuto (dmcinfo) concernant l'indexage et cette personne informe que:
(Je cites) 'One more helpful hint - you will find that your index on the HMI will be zero based, regardless of the way you define your array on the PLC. For example, if I defined my array (on the PLC) to be [1 .. 20], an "Index" of 0 will actually access the first element, [1], in my array.'
Donc ok, normal.
Maintenant, quelle est la cause technique exact ...
Merci.
Trouvé sur un tuto (dmcinfo) concernant l'indexage et cette personne informe que:
(Je cites) 'One more helpful hint - you will find that your index on the HMI will be zero based, regardless of the way you define your array on the PLC. For example, if I defined my array (on the PLC) to be [1 .. 20], an "Index" of 0 will actually access the first element, [1], in my array.'
Donc ok, normal.
Maintenant, quelle est la cause technique exact ...
Merci.