LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Repeat each value produced by a Pt by Pt vi

Hi, I have a vi that produces PRBS pattern values (pseudorandom binary sequence). I would like to repeat every value that is output n times (change the clock frequency to >1). I'm using a counter and a true/false switch to do that (left top in the picture), but it feels clumsy and is very slow. Does anyone have an idea how to do it better?

I'm attaching the snippet and the vi (it needs to be embedded in a simple while loop to work).

snip1.png

The false case is empty except for the output wire being fed back to itself through the delay node.

0 Kudos
Message 1 of 5
(1,403 Views)

What do you mean by its slow? How much do you target and what is the actual execution time?

 

The implementation is simple and straight forward, it would definitely limited by OS' performance

 

If you're planning to generate this PRBS sequence as an HW signal, best to implement this on an FPGA or raw logic chips to get the best performance.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 5
(1,398 Views)

So this is a part of a large simulation (in fact I have an FPGA board generating it!) and when this module is switched off, it runs at about 7 kHz on my laptop. When  I switch it on, it drops to 600 Hz. 

 

Inspired by your question, I tested the speed with the repetition module and without it, and the speed is the same, so I guess the PRBS generation itself is responsible for the performance drop.

0 Kudos
Message 3 of 5
(1,396 Views)

Could you please provide a block diagram representation of how this VI fits into your whole simulation system?

 

If it is running on FPGA, it will run as per the Clock rate and should not be affected. I would personally not rely on Windows for tightly timed simulation.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 5
(1,368 Views)

The block diagram wouldn't fit on the page 😉 it's very large and complex. It's a part of a coupled nonlinear equations solving program, where the PRBS signal modulates the phase of one of the terms in one nonlinear equation. So every iteration of the while loop, a new sample from the PRBS block is generated and fed into the NLE solver block. The program is allowed to run as fast as possible, that's why I know what's the impact of switching the PRBS block on - I measure the simulation speed as defined by while loop iterations per second.

0 Kudos
Message 5 of 5
(1,330 Views)