DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Different signals controlled by relays...we only want to display the "choosed" signal.

Solved!
Go to solution

Hello,

 

I have the following program:

17873iD05E8B09CB9F1667

Explanation of this little program:

 

I have 3 different signals saved in variables:

 

Variable 1: the voltage that comes from the "hand control" + 1, (after formula interpreter).
Variable 2: the voltage that comes from the "hand control" + 2, (after formula interpreter).
Variable 3: the voltage that comes from the "hand control" + 3, (after formula interpreter).

 

Then these Variables are read and they can pass (are activated) randomly by switches, (this is only an example). In the real program, only one relay can be activated, NOT 2 or 3 at the same time. (This program is only a part of a main program, the control of relays come from other part of the main Program).

 

Ok, now we start the program: In the second 0 (start), the relay 01 is activated (the others not); and, for exmaple, in the second 10, the relay 02 is activated (and the relay 01 desactivated). Whit this, I want to display or "get" the following: 4,5 V from the second 0 to 9, and from the second 10 I want to get 5,5 V from the same line, (becuase this voltage will be the output from my main program", is it possible?

 

Thanks for your Help,
Arter

0 Kudos
Message 1 of 6
(7,646 Views)

Hello Arter,


Variant 1 - You can solve this application very compact and stable with Addon Module "VBScript", sale via PREMEGA GmbH -> link under http://www.premega.de/de-02/software_dasylab_vbscript_de.php  Some screen shots for mainpoints from application:

17885iFF10405913AA9887

The VB Script switch after every x sec, trigger is the Impulsgeber, and put out

0...x  -> Generator 0 output channel
x...2x -> Generator 1 output channel
2x...3x -> Generator 2 output channel
3x...4x  -> Generator 0 output channel
4x...5x -> Generator 1 output channel
...

Here the VB Script program:

17887i4A3D9224CDA446E7


Best regards,
MHa

0 Kudos
Message 2 of 6
(7,640 Views)
Solution
Accepted by topic author Arter

Variant 2 - based on DASYLab standard modules, but a lot of things todo.

See the blue rectangle area from Worksheet.

17889i1824DF3F909BE3FA
The Module Aktion00 set any useful "Dummy" action. Important is that with the finish from action the Global Variable 1 would be increased.

17891i669993D196298779

Initialization with start from Worksheet for the used Global Variable 1

17893i3B0E862708D7FF9B

Global Variable 1 > 2.5 -> Then we reset to 0.

17895i2063B8C5F48C35DB

17897iBCED56F1F91718D2

Best regards,

MHa

Message 3 of 6
(7,635 Views)

Hallo Mha,

 

Firstly thanks for your help again, its really apreciated.

 

I will take your second variant and i will put it in my program. Also I did today my program with a PID, and it give me good results...

I will compare both and then choose which is better for my project.

 

Really thanks again.

 

Einen schönen Tag,

 

Mit Freundlichen Grüßen,
Arter

0 Kudos
Message 4 of 6
(7,631 Views)

Arter,,

 

Also consider the Signal Router module in the Control Group. It offers a control input and up to 15 other inputs, and the value of the control determines which signal is on the output. You have a choice of edge controlled or actual value controlled.

 

There is an example in the Example folder called WaveFormGenerator.dsb, that uses this module with a Coded Switch.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 5 of 6
(7,622 Views)

Hello cj,

 

Thank for your advice, I will check it.

 

Best regards,

Arter

 

0 Kudos
Message 6 of 6
(7,608 Views)