07-01-2010 01:29 AM
Hello,
I have the following program:
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
Solved! Go to Solution.
07-01-2010 03:05 AM
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:
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:
Best regards,
MHa
07-01-2010 03:45 AM
Variant 2 - based on DASYLab standard modules, but a lot of things todo.
See the blue rectangle area from Worksheet.
The Module Aktion00 set any useful "Dummy" action. Important is that with the finish from action the Global Variable 1 would be increased.
Initialization with start from Worksheet for the used Global Variable 1
Global Variable 1 > 2.5 -> Then we reset to 0.
Best regards,
MHa
07-01-2010 04:57 AM
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
07-01-2010 08:00 AM
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.
07-02-2010 02:12 AM
Hello cj,
Thank for your advice, I will check it.
Best regards,
Arter