02-17-2021 08:38 AM
I also have the same problem. I want to generate a continuous digital waveform at a particular time. I write a program where the generation of such waveform is possible but I cannot control the time part. I have attached the program below. If anyone can help me out then it will be great.
Thanking you
Solved! Go to Solution.
02-17-2021 08:39 AM
Sorry here is the file. In the previous msg the file was not uploaded.
02-17-2021 09:09 AM - edited 02-17-2021 09:12 AM
Get the time in your while loop. Subtract from it the time you got when it started. OR the stop button with that time difference greater than equal to your desired run time.
02-22-2021 11:18 PM
Thank you for your reply. I have tried this but this only helps to run the program for a specific time, such as I want to run the program for 10 sec then i can do this here. But I want to run the program at a specific time lets say I want to run the program at 10:30 am specifically and want to stop the program after 30 sec. How should I do this?
02-23-2021 10:12 AM
Then you need a while loop that keeps checking the current time and looks for when it is equal to or greater than 10:30am, then that loop stops and moves on to the next step of starting the acquisition.
02-23-2021 10:24 AM
Well, it's easy. Add another while loop "on the left" of your Block Diagram. On each iteration, check the current time, let's say every second. When the current time is 10.30 am, exit the loop and measure for the required time span.
Add a button to abort the loop stopping the program without actually measuring.
This snippet is only a readable example. Actually there are better ways to wait a specific time.
For example, on my computer it would never work, since my time format is 24h.
02-28-2021 11:19 PM
But the left hand side case selector has three different condition, I only want the time start part on a specific case selector (When the case selector is at 1 I want to start the program at a specific time ) . In another case selector let’s say at 0 I will be able to generate the output by controlling start and stop manually.
03-02-2021 10:49 AM
Dear Sir,
I am attaching the program here, actually, I need to generate the digital signal at a particular time, and also the generation of the pulse will be for 10 sec or 20 sec let's say. So the first part is done smoothly according to your guidance but for the 2nd part of the programming I have modified it a little bit, you can see. But now the problem is in the 2nd part where I am subtracting the two times this gives a huge number as the string is something like 08:20:30.000 in this format. So if I want to run the program for 10 sec and if I give it when I compare the subtracted result and the given time (which is 10 sec or whatever I want ) it is not happening correctly. Can you please help me to rectify this problem?
03-03-2021 08:23 AM
I have resolved that issue. Thank you.