From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I transfer data through FIFO in two different myRIO FPGA Targets?

Hi Community,
         

           I am making a three-phase inverter and I need 16 discrete pulses for each phase which I'm generating through arrays with Single-Cycle Timed Loop (SCTL) and taking as output from digital pins to feed the inverter. For a second phase, these 16 pulse sequence which I have generated, I displace them by 120 degrees using array indexing and give them to another 16 digital output pins. So in order to drive three phases simultaneously, I need 48 digital output pins which I can't get through a single myRIO FPGA device (short of 8 digital pins). Then I thought to drive two phases on one myRIO FPGA and the third phase on another myRIO FPGA target.

 

But in order to operate the three-phase inverter properly (means all the three phases must displace by 120 degrees), the two myRIO FPGA targets must start at the same time and should remain in synchronization with each other. I have tried many ways to make the two FPGA targets synchronize with each other including using a digital pin for triggering the other myRIO to start at the same time through a digital button.

 

But the problem I faced was that the three phases started at the same time but within elapse of time, one phase (which is on other myRIO FPGA) gets unsynchronized with the other two phases (which are on the same myRIO). The two phases which are running through the same myRIO remain 120 degrees displaced but the other phase which is on the other myRIO travels and doesn't remain 120 degrees displaced with the other two phases.

 

I have invested so much time in order to make it synchronize but didn't find a way. Now, I'm thinking to use the 16 pulses (which I'm giving to the second phase) and feed them to another myRIO and displace them by 120 degrees using FIFO to feed the third phase of the inverter.

 

Is it possible to transfer data between two myRIO FPGA targets through FIFO? And if yes, how should I do for this application? Any other thing which I can do to make it operational?

 

I'm very desperate and my brain is hurting. Hoping to find the kind response. Thanks in anticipation.

 

Ahmad

 

0 Kudos
Message 1 of 12
(2,854 Views)

Hi Ahmad,

 

when you already used a "digital" pin to signal a trigger from one myRIO to the other, then why can't you use the very same connection to send information on the "zero degree" or "start of next rotation"? This way your 2nd myRIO can synchronize to each full rotation…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(2,830 Views)

Hi GerdW,

     The second myRIO has its only pulse sequence. I was just able to start the two myRIOs together through the trigger signal but after some time, the second one gets unsynchronized.

Ahmad

0 Kudos
Message 3 of 12
(2,825 Views)

Hi Ahmad,

 

so you solved the problem of "starting two myRIO DO pulse generators at the same trigger signal input".

The next/new problem is "start/synchronize the 2nd myRIO pulse generator whenever it gets triggered by the 1st myRIO"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 12
(2,820 Views)

Hi GerdW,

      I have tried to do this but the synchronization didn't happen. 

0 Kudos
Message 5 of 12
(2,813 Views)

Hi Ahmad,

 

Did you create any code to synchronize the 2nd myrio???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 12
(2,809 Views)

HI GerdW,

      I was thinking that even though these two myRIOs started at the same time but the second myRIO is getting unsynchronized because maybe these two myRIOs are not running on the exact same clock. I wanted to drive the second myRIO with the clock exported by the first myRIO. Then I came to know that myRIO can't import the external clock.

 

So, I did it the other way. I exported the toggling digital high and low output through SCTL from one myRIO and tried to give it to the digital input of the second myRIO and then ran the pulse sequence on it through the transition of that toggling input. But the same un-synchronization occurred after some time.

0 Kudos
Message 7 of 12
(2,804 Views)

Hi Ahmad,

 

you need to implement some code to keep both myRIOs synchronized…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 12
(2,795 Views)

Hi GerdW,

First of all thanks for bearing with me. You are saying that I need to implement some code for synchronizing but how should I? What should I do? Some are saying that myRIOs are not designed for the syncing purposes. That's where I'm lagging. I don't know how to implement the syncing? Do you have any idea?

 

With gratitude,
Ahmad.

0 Kudos
Message 9 of 12
(2,777 Views)

Hi Ahmad,

 

maybe you need to implement something like a PLL when you want to keep your 2nd myRIO in phase with your 1st one?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 12
(2,771 Views)