0% found this document useful (0 votes)
92 views1 page

P1 PDF

This program controls a smart camera. It sets a boolean variable "CamaraInteligente" to true if input "S1" is true. It stores the encoder value in an array, incrementing the array index "n" each time. Once "n" reaches 20, it resets to 1 to start storing values from the beginning of the array again.

Uploaded by

Felipe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views1 page

P1 PDF

This program controls a smart camera. It sets a boolean variable "CamaraInteligente" to true if input "S1" is true. It stores the encoder value in an array, incrementing the array index "n" each time. Once "n" reaches 20, it resets to 1 to start storing values from the beginning of the array again.

Uploaded by

Felipe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

POU: POU_1

1 PROGRAM POU_1
2 VAR
3 S1 : BOOL ;
4 CamaraInteligente : BOOL ;
5 ValorEncoder : INT ;
6 n : INT ;
7 END_VAR
8

1 IF S1 THEN
2 CamaraInteligente := TRUE ;
3 GVL . ValorActual [ n ] := ValorEncoder ;
4 n := n + 1 ;
5 IF n >= 20 THEN
6 n := 1 ;
7 END_IF
8 END_IF
9
10

Ejemplo.project
Page 1 of 1
24/09/2020 1:26 p. m.

You might also like