Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

myRIO - Problem when using on board LED

Solved!
Go to solution

Hi, 

 

So I had a look at the project you submitted and I can see why it does not work. 

 

One of the problems is that you are having a custom FPGA VI in the myRIO and you can not use the standard VIs to communicate with your custom FPGA VI. Is there any reason you want to use a custom FPGA VI or can you use the standard FPGA personality?  

 

If you want to use a custom FPGA VI you will have to write code that lights the LED when you set it. 

 

How would you like to proceed? I am happy to provide you with an example should you need help programming the FPGA. 

Message 11 of 16
(3,726 Views)

Thanks for the reply Anton!

 

Ok, so if  I use custom FPGA VI's I canno't use default FPGA personalities. So I can try either removing custom FPGA or adding functionality for LED in my FPGA vi. Does it help if I use RT Led.vi from Real time -> RT Utilities and keep the custom FPGA vi?

0 Kudos
Message 12 of 16
(3,708 Views)
Solution
Accepted by topic author JussiJii

You are correct, if you use the all custom made FPGA VI you can not use the default VI blocks because they communicate with the default FPGA personality. What you can do is to edit the default FPGA VI and add the function you need to it instead of starting with an empty VI. Or you could ad a LED switch to your custom made VI if you do not need any of the other standard functionality.

 

You can try the RT Led.vi, but I do not think it will work much better. It uses a C library and I can not see what these functions do, so there is the possibility that it might work. I would however encourage you to start with the default FPGA VI and modify it to fullfill your needs. 

 

/Anton

Message 13 of 16
(3,705 Views)

I tested with RT Led.vi and it doesn't work either. I think I will try to do logic to FPGA so that it will lit the LED. I think in this case default FPGA might not work so well. I try to do logic what will sense the change in the switch. If I do it on the RT side I probably would need to poll the state of the switch. So I actually would like to hint from the FPGA to RT about change in the switch position.

0 Kudos
Message 14 of 16
(3,684 Views)

That was what i suspected, but I think you know where to go from here, right? 

 

I would still recommend you to edit the default FPGA Vi to add functionality to it instead of writing a new FPGA Vi from scratch. You could then make use of all the default VIs and it will save you a lot of headache. 

 

I am not entirely sure that I understand what you are trying to accompish, but if you need to know the state of the switch in your RT application, you will need to do some kind of polling or reading regardless of how you implement it in the FPGA VI. 

 

/Anton

0 Kudos
Message 15 of 16
(3,681 Views)

Yes. I will manage from now on. Thank you for your help!

0 Kudos
Message 16 of 16
(3,670 Views)