LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating a step function

Hi
 
I want to create step function like the this one that is done in control simulation loop. how can generate signal like this without the control simulation loop?
Thanks
0 Kudos
Message 1 of 11
(10,563 Views)
Hi suni,

don't have simulation toolkit installed, but from description the attachment may help..
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 11
(10,552 Views)
Thanks for the reply. But i want to create step function. not just a value. Thanks
0 Kudos
Message 3 of 11
(10,537 Views)
You could use the Pulse Pattern function and just chop off what you need.
Message 4 of 11
(10,530 Views)

Hi

Thanks for the reply. Could you please expain how to do this lilttle more? I could not find digital pulse pattern. Basically i need to write a labview code generate step function. This function is avilable in control design moduale under step.vi. But I could not use it because it uses simulation loop to run the step function. I think the data this simulation loop generates is only avilable inside that loop. Can somebody please help? Thanks

0 Kudos
Message 5 of 11
(10,464 Views)
What is your input to the step function? A single numeric value? If so, the step function output is 1 if the input is greater than to equal to 0 and zero otherwise. If you want an array or waveform, create an input array and apply the function above to each point.

Lynn
Message 6 of 11
(10,451 Views)
Here is a simple example using the Pulse Pattern function:



Message Edited by smercurio_fc on 08-06-2008 09:26 AM
0 Kudos
Message 7 of 11
(10,432 Views)

Hi

Thanks for the reply. That was helpfull. I wanted to add a sine wave to this pulse and i wanted to generate sine wave continously. I tried to do that using while loop. But i got output waveform with pulse added reflected continously on the signal. Here is what i have in my VI. How do i avoid that? i think pulse is always there to get added to sine wave after samples amount. i want to have start time and stop time for the impulse.

0 Kudos
Message 8 of 11
(10,406 Views)
I'm sorry, but I didn't understand what you're trying to do. The pulse generation creates an array of 128 elements. The sine wave is 100 elements. Thus, when you add the 2 signals together only the first 100 elements of the pulse get added to the sine wave. The first 100 elements are zero based on your input parameters, so the addition gives you the original sine wave. If you're continuously generating the sine wave, then how is the pulse supposed to be added to the sine wave in terms of time? Are you applying the pulse as a mask for each chunk that you get out of the sine wave generator, or are you supposed to apply it based on the time? In other words, if you're generating the chunk of the sine wave that occurs after the pulse turns on in time then the sine wave gets passed through, otherwise not.
0 Kudos
Message 9 of 11
(10,395 Views)
Thanks for the reply. i want to add single pulse which have start time and end time to sine wave.( I tne real vi i have daqmx to aquire 3 signals then i have to add a pulse to each of thease signals. i am using a sine wave as my aquired signal). i want to add this based on the time. i am generating sine wave contiously. i have to have a single pulse with certain duration. then i want to add thease two. With the pulse pattern there is no end time to pulse function. it has only a delay. therefore pulse keep adding to sine wave. that is what i think.
0 Kudos
Message 10 of 11
(10,388 Views)