06-17-2013 05:37 AM
Hi everyone!
I have a sbRIO 9606 and, as a beginner, I'm trying to implement this code (http://www.ni.com/white-paper/11197/en) using my target. I need to set a PWM in a digital output but I don't know how to do it. In the paragraph 10 it gives the instructions about adding the PWM output, but I can't see this "C Series Module" in my project.
Any tips would be appreciated.
Thanks in advance.
06-28-2013 10:56 AM
Hi Reimon05, the module that is mention in the document you have is a actual hardware module that you can connect to cRIOs and some sbRIOs. If your are just using the digital outputs of your sbRIO, you would have to write the code for the PWM.
The code for generating the PWM in LabVIEW FPGA can be really simple:
You can find more examples in LabVIEW>> Help >> Example Finder
Also the following link has a more complex example.
Generate multiple offset PWM outputs for FPGA
Best Regards
07-03-2013 04:22 AM
Hi Benjamin C!
Thank you so much for your tip.
I'll try to implement the PWM on my target.
Best Regards.
Reimon
07-03-2013 07:11 AM
Hi Benjamin!
I was following another exemple to creat a PWM, but I can't connect the output of the PWM to the output of a I/O Node.
LabView says that I can't connect an output of SubVi to the output of I/O Node.
This is my "Project window", and you can see the I/O's of the Rio Mezzanine Card.
Dou you know how I can use these I/O's in my VI?
Best Regards.
Reimon.
07-03-2013 09:40 AM
HI Reimon05 the probelm is on your subVi, you should be conecting the output of the io node to the input of the subVI, to change that terminal to an input in the subVI you need to set it as a control in the subVI so it becomes an input in the conector pane.
FOr the ones your writing ( the ones on the left of your diagram you need to change the i/o node to write not to read so your conecting a output of a subVI to the input of a IO node.
Best Regards
07-10-2013 04:47 AM
Hi Benjamin !
Well, I would like to ask another thing...
I am working with another person with the target sb-RIO 9606. We are trying to implement another aplication but we don't know how to work with "shared variables".
There is a photo of the tutorial the we are using:
Do you know how to use it? And could you tell us how ?
Regards.
Reimon
07-10-2013 09:35 AM
Hi Reimon, when is a new question of a different topic is always better to start a new tread, that makes it easier for us to make sure everything is answered. What is the problem your having with the shared variables?
Shared variables are variables that are stored inside of the projects. To create new variables you right click the target you want to host the shared variable and select new >> Variable. This will create the variable in the project. If you want to edit them, you just have to double click them or right click properties.
Once you have created the shared variable or if they are already in your project you just need to drag them to the block diagram to see them as a node, as your showing in the image.
Shared variables are a nice tool, but as with all variables over using shared variables can reduce performance in your application, and increase race conditions.
This documents should also give you more details and examples:
Developer Zone Tutorial: Using the LabVIEW Shared Variable
Local, Global and Shared Variable
Best Regards