01-22-2018 03:43 PM
Hello,
I am trying to create a test bench that does the following:
The problem that I'm running into is that I can't get the pulse to generate for just 50ms. Ideally I want this actual pulse generation time to be controlled from the front panel. I have done a great deal of searching and not found something that quite satisfies what I'm trying to do. My current .VI is attached. I would appreciate any guidance, and I hope I've provided a sufficient amount of information.
Thank you.
01-23-2018 05:29 PM
RakeTowel97,
What hardware are you using for this?
VanCamp
01-31-2018 11:28 AM
I am using an Analog Discovery Kit 2 to generate a signal and also as a scope
02-01-2018 04:00 PM
RakeTowel97,
I did some looking into the VI you are working off of. I assume the idea is that the simulate signal VI is meant to produce data until the elapsed time VI interrupts it after "Time Target (s)" seconds? The way the current program operates, both express VIs inside the loop must complete before the next iteration occurs. This means that the elapsed time VI will never actually interrupt the simulate signal vi - it will just wait for it to finish. The amount of data generated by the simulate signal VI is only dependant on the "samples per second" and "number of samples" parameters. In order to generate 50 ms of data, you need to know the sample rate of the device this will go to, and based on that, how many samples you need to output.
Unfortunately, these cannot be programmatically changed in the express VI, meaning this architecture will not allow you to change the time target. To do this, you will have to switch to using the "Basic Function Generator" VI instead of the "Simulate Signal" VI.
VanCamp
02-02-2018 10:55 AM
Vancamp,
thanks for taking a thorough look at my VI. You do have the right idea with how I want the code to execute. So in reality of my actual application, I'm using the Digilent FGEN Run and FGEN Configure Standard Waveform VIs. I used Simulate Signal VI for a demonstration. Your insight was very helpful though, despite this difference, as I have a better understanding of LabView now. I made that little demo VI because I thought it would simplify things and make it easier for somebody to assist me. Attached is my real VI with parts. Note: This will not open/run properly without the Digilent Waveforms LabView components installed.
It is a bit sloppy because I've been doing a lot of experimenting
02-05-2018 09:10 AM
RakeTowel97,
Same idea still applies. Whether you use the "Configure Standard Waveform VI" or the "Simulate Signal" subVI, you will need to set the sample frequency to be the same as what you wish to output, and configure the number of samples to give you 50 ms of data. I think you will still be better served by using the "Basic Function Generator" VI.
VanCamp
02-09-2018 12:03 PM
VanCamp,
I'm trying to use the Basic Function Generator VI but I cannot get it to work with the Digilent WaveForms function generator. Just as a basic test I made the attached VI and it throws up an error, and I'm not sure why. Any ideas?
02-09-2018 12:03 PM
VanCamp,
I'm trying to use the Basic Function Generator VI but I cannot get it to work with the Digilent WaveForms function generator. Just as a basic test I made the attached VI and it throws up an error, and I'm not sure why. Any ideas?
02-12-2018 04:20 PM
I don't have those Digilent VI's, so I may not be very helpful on that front. But, I would assume that you should be using the "configure arbitrary waveform" vi before using the "run" VI.
What error do you get? Does Digilent have VI's that you can use as examples of how to get a basic program working?
VanCamp