LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use a packet communication based unidirectional link into bidirectional link?

We have an amazing unidirectional link example program from here: Packet-based Digital Link - NI Community

 

I must convert this into bidirectional link (not full duplex, just TDM based half duplex). The SDR (SDR1) transmits 1 packet, then shifts to being a receiver. Parallelly, another SDR (SDR2) receives packet from SDR1 and then transmits the same packet back to SDR1. SDR1 receives the packet and the loop continues. The receiver always operates in time loop. For 500msec, if SDR1 does not receive anything, it jumps from being receiver to transmitter. But if SDR2 does not receive anything within 500msecs, then it jumps back to being receiver. 

 

This is illustrated in diagram as shown.

 

TxRx.drawio.png

 

How do you propose I do it? Normally, I would just remove the while loop on transmitter in SDR1 and work from thereon but I can't just remove the while loop in the receiver part because lot of operation are handled through the shift register. Maybe there is a smarter way of doing it?

0 Kudos
Message 1 of 2
(520 Views)

UPDATE: I was able to run a bidirectional link by opening Tx VI in SDR1 and Rx VI in SDR2 for each cycle. At the end of the cycle, I close the respective VIs running on each SDRs and open Rx VI on SDR1 and Tx VI on SDR2. This works well, but there is long delay between closing one VI and reopening other VI in each USRPs. How do I overcome this delay? How to overcome any delay cause while opening and closing each VIs?

 

What do you think is causing this delay? How else can we build a bidirectional link between two USRPs?

0 Kudos
Message 2 of 2
(456 Views)