04-09-2024 03:50 AM - edited 04-09-2024 03:51 AM
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
Solved! Go to Solution.
04-09-2024 07:34 AM
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
04-10-2024 05:21 AM
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
04-10-2024 04:54 PM
('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?
04-10-2024 06:25 PM
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
04-11-2024 08:11 AM
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.
04-11-2024 01:41 PM
Correction... r/FlexLoggerNI