LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview LINX increment value when digital read is true

How to increment and decrement value when sensor digital read is true ?

0 Kudos
Message 1 of 5
(1,685 Views)

With such a poor description of a problem this is all i can give you.

 

AeroSoul_0-1624860279099.png

 

0 Kudos
Message 2 of 5
(1,626 Views)

Here's a little pseudo code to think about...

 

  1. Initialize pinX as Input
  2. Count = 0
  3. Read pinX
  4. IF pinX = HIGH
    1. Then Count = Count +1
  5. Goto 3
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 5
(1,617 Views)

I need to increment a value in 7 segment display when avoidance sensor detects a object and thus activate servo motor  and other avoidance to sensor decrement that value when "car" leave in car parking system.

0 Kudos
Message 4 of 5
(1,591 Views)

Hi titos,

 


@titos_sampas wrote:

I need to increment a value … when avoidance sensor detects a object and thus activate servo motor  and other avoidance to sensor decrement that value when "car" leave in car parking system.


Some pseudocode:

IF RisingEdge(AvoidanceSensor1) THEN
  value++
ENDIF
IF RisingEdge(AvoidanceSensor2) THEN
  value--
ENDIF

 


@titos_sampas wrote:

value in 7 segment display


The 7 segment display is a different "problem": here you just need to convert your "value" into the corresponding DO signals to light up the correct LEDs…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(1,579 Views)