From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

EXE Program Failing After Few Seconds

Solved!
Go to solution

Hi, I am trying to create an exe file that uses I/O with a cRIO. I have successfully created the Main Vi that uses the fpga open function and my I/O works great for about 10 seconds when all of a sudden all of my front panel boolean LEDs flash and then none of my I/O works anymore unless I close the EXE and reopen it. I am not really sure what is going on whether coms become lost or if the code is overflowing or something. There are no error messages when this happens so there's not much debugging I can do with it I suppose. I'll share my Main Vi and the Vi with all my fpga logic. It's quite messy I am sure but bear with me. RunBench is the Main.

 

PS the Main does indeed have a while loop around everything except the message part in the beginning, I took it out in hopes it would fix the failing part. Also I am going to add a close button going to the loop stop condition once I get it working as desired.

Download All
0 Kudos
Message 1 of 11
(2,646 Views)

@MGardner5 wrote:

PS the Main does indeed have a while loop around everything except the message part in the beginning, I took it out in hopes it would fix the failing part.

If you added a loop, show us the code with the loop. Are you closing the FPGA reference inside or after the loop?

0 Kudos
Message 2 of 11
(2,608 Views)

I have updated the file. Here it is. I am entering the loop, opening the reference and closing it outside of the loop after the loop exit statement becomes set. The code runs for about 10 seconds without me exiting it or anything. I have digital outputs powering relays, I can hear them turn on with the code and then I hear them turn off when the program quits on me. The front panel hasn't frozen or anything and remains interactive. The fpga bitfile code has a while loop around that as well.

0 Kudos
Message 3 of 11
(2,599 Views)
Solution
Accepted by topic author MGardner5

Shouldn't you also open the reference before the loop? (Instead of with every iteration?)

Can you add an indicator to the various error wires inside the loop. What do they say?

Where do you define the loop rate?

 

0 Kudos
Message 4 of 11
(2,588 Views)
Solution
Accepted by topic author MGardner5

It looks like you are opening the FPGA repeatedly inside the loop, but only closing it once after the loop.

 

I believe that will cause a memory leak.

 

Move the FPGA Open BEFORE the while loop.

0 Kudos
Message 5 of 11
(2,586 Views)

I have moved the open reference but I'm not sure what's going on. My 14V power supply powering my Digital I/O module is acting really weird now whenever the the cRIO is powered. It puts out rated voltage N/C but drops down to 7 V when it's connected. Could it be possible my flyback diodes for my relays ruined my wimpy 1 amp supply? I really hope it isn't my module that is fried, that would really ruin my day. It seems I still have functionality with those digital outputs without a load which is a good sign I suppose. I guess I should find a new power supply. My original issue seems to be solved as it has been running now for about a minute. But I can't really test too much with this power issue.

0 Kudos
Message 6 of 11
(2,561 Views)

What is the current rating on your power supply?

 

What is the current rating for your digital I/O channels?


What is the amp load from your relays?

 

Are you sure the flyback diodes are wired the correct way?

 

Are you sure you are using DC relays and not AC relays?

 

0 Kudos
Message 7 of 11
(2,533 Views)

1 amp max from the supply. Each relay draws 40mA of DC current. Only 6 max of the relays will be powered at one time. The data sheet says it can .25 A^2 per module. I have flyback diodes on all my relays and I tested each of them with a bench supply before I wired it to my 9375. None of the DO channels are shorted. I'm going to continue testing each trace of these relay boards.

 

But my original post has been solved so this new issue is entirely different and is Hardware related.

0 Kudos
Message 8 of 11
(2,465 Views)

Issue Resolved

0 Kudos
Message 9 of 11
(2,445 Views)

What did you find out the issue was with the hardware side of the relay connections?

0 Kudos
Message 10 of 11
(2,441 Views)