FlexLogger

cancel
Showing results for 
Search instead for 
Did you mean: 

Two signals in one characteristic

Solved!
Go to solution

Hello everyone,

 

I have a question about displaying two signals as one characteristic curve in the diagram in FlexLogger. I have a damper with two limit switches. If the damper is completely closed, signal 1 is high. If the damper is completely open, signal 2 is high. The time in between is the opening or closing time of the flap. According to the standard, the two signals should be displayed as in the attached picture. Is this possible with Flexlogger? Is it possible to link the signals and display them in this way?

 

Many thanks in advance

zarlex

flap.JPG

0 Kudos
Message 1 of 7
(320 Views)
Solution
Accepted by topic author zarlex

I'm not sure if I completely understand the curve, but you could create a formula channel that combines the two signals. Go to "Add channels" in the toolbar and select Calculation>>Arithmetic formula and try something like this (it takes two digital channels and produces an analog result):

('Digital Signal 1' ? 1 : 0) + ('Digital Signal 2' ? 2 : 0)

 

Hope this helps,

Brad

 

Message 2 of 7
(297 Views)

Hello Brad,


Thank you for your reply. It has helped me a lot. To get my diagram I have now used the following formula: ('Digital Signal 1' ? 1 : 0) + ('Digital Signal 2' ? 2 : 1). This is because both signals can be low at the same time when opening or closing the flap, but they can never both be high at the same time.

 

Many thanks and best regards
Zarlex

0 Kudos
Message 3 of 7
(278 Views)

('Digital Signal 1' ? 1 : 0) + ('Digital Signal 2' ? 2 : 0)

What does this formula say>

Where can I find syntax for this formula and others?

 

0 Kudos
Message 4 of 7
(259 Views)

This formula:
('Digital Signal 1' ? 1 : 0) + ('Digital Signal 2' ? 2 : 0)

Uses the ternary operator:https://en.wikipedia.org/wiki/Ternary_conditional_operator

The list of supported operators you can use for a formula in FlexLogger is here:
https://www.ni.com/docs/en-US/bundle/flexlogger/page/calculation-formula-options.html

The formula means:
If "Digital Signal 1" is True use 1, else use 0

to add to

If "Digital Signal 2" is True use 2, else 0.


When Signal 1 is True and Signal 2 is False, it will equal 1.

When Signal 1 is False and Signal 2 is True, it will equal 2.

If they are both true, it equals 3 and if they are both false, it equal 0.

Hope this helps,

Brad

Message 5 of 7
(252 Views)

Thank you for the lesson.  I will be looking Ing into it more.   I will also post these links onto my r/FlexLogger reddit channel.

0 Kudos
Message 6 of 7
(233 Views)

Correction... r/FlexLoggerNI

0 Kudos
Message 7 of 7
(220 Views)