ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating rectangular pulses

Solved!
Go to solution

Hi Guys,

 

I am quite a newbie using Labview and what I can ask may be easy.

I'd like to generate rectangular pulses for the bits I'm supposed to transmit.

The bits come from a string. In my file, I've converted the string into an int array to display it but I can't find the proper way to create rectangular pulses from the array. I've seen on the web the function rectpulse, but I don't know how to use it, there's no block rectpulse.

The results should be like this

 

Any help will be appreciated.

Cheers,

Felipe.

 

PS : when you use the file the string should be :

1

0

1

1

0

or whatever the bits.

0 Kudos
Message 1 of 9
(4,685 Views)
Solution
Accepted by glokan

Ok, I found the spike function that suits me.

Cheers,

Felipe.

 

0 Kudos
Message 2 of 9
(4,644 Views)

Hi Felipe,

 

you should provide better test data when you want to convert a string into a pulse pattern…

StringToWaveform.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 9
(4,622 Views)

Hi,

Thanks for your answer !

 

Best regards,

Felipe.

0 Kudos
Message 4 of 9
(4,615 Views)

Hi GerdW,

Sorry to bother you one more time : I tried your vi but I must have done something wrong since it doesn't work for me.

I still have my first result : but I have to admit I don't understand where you create the pulse pattern in your vi.

With many thanks and best regards,

Felipe

0 Kudos
Message 5 of 9
(4,591 Views)

Hi Felipe,

 

look more carefully at my example: which plot style did I choose?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 9
(4,574 Views)

Hi GerdW,

Got it 😉

 

The main point of this is to transmit bits so :

-Is there a general way to say to the transmiter I want a square signal ?

or - Is this mostly depending on my transmiter ?

Because the transmiter won't be a graph anymore 😉

 

I will surely need to use the DAQ Assistant, I'm still reading documentation on it.

 

With many thanks and best regards.

Felipe

 

0 Kudos
Message 7 of 9
(4,570 Views)

Hi Felipe,

 

it is just a matter of your transmitter. It's the source of your physical signal and so determines it's shape!

 

You don't need to stick with the DAQAssistent: the basic DAQmx functions are easy to use and well documented. LabVIEW comes with a lot of example VIs for each of their use cases…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 9
(4,566 Views)

Hi GerdW,

Thank you so much for your help.

Best regards,

Felipe

0 Kudos
Message 9 of 9
(4,561 Views)