LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Myrio Analog output setting at the powerup

Solved!
Go to solution

Hello,

I would need the analog outputs of connectors A, B, C, of my myrio 1900, to be set to 5V as soon as the myrio is powered.

This is because, in the Dc / Dc control that I have implemented an input voltage, to the dc / dc itself, of 0V generates an output of 5V and vice versa, an input voltage of 5V generates an output of 0V.

Obviously this analogue output voltage will then have to vary according to the VI which will acquire and control the temperatures of the instrument.

 

Does anyone know how to tell me how to do it?

 

Thank you

David

0 Kudos
Message 1 of 5
(1,738 Views)

In order for the myRIO to do anything (including set its DAC output to any voltage, including 0 V), it needs to be powered up.  When that happens, the D/A channels all reset to 0 V, mainly because the FPGA inputs to the D/A circuitry initially has 0 (corresponding to 0 V).

 

If you quickly get in there and set up the FPGA to put 2047 for the MXP D/A outputs, and 1023 for the MSP D/A output (± 10 V), you should get +5V for all three of these D/A lines.  You cannot get +5V for the Audio Out (which is ±2.5 V).

 

Bob Schor 

0 Kudos
Message 2 of 5
(1,710 Views)

Hi Bob,

 

I know that is possible start a custom program at the powerup of myRIO,which is probably what you mean by "f you quickly get in there and set up the FPGA", but I don't know how to do it.

In few words how can I program the FPGA to set the Analog lines to 5V(4095) at the power up , and then once started the RT VI make sure that the outputs reach the values set in the RT Vi?

 

 

thanks

David

 

0 Kudos
Message 3 of 5
(1,700 Views)

@David15 wrote:

Hi Bob,

 

I know that is possible start a custom program at the powerup of myRIO,which is probably what you mean by "f you quickly get in there and set up the FPGA", but I don't know how to do it.

In few words how can I program the FPGA to set the Analog lines to 5V(4095) at the power up , and then once started the RT VI make sure that the outputs reach the values set in the RT Vi?


I think you can't. The myRIO is not designed for industrial control and while it can be used in such setups it does not support such advanced features. Its hardware is initialized to a predefined state on powerup/reset and that's it. Configurable power-up states is typically an advanced feature only available on higher end hardware meant specifically for industrial applications and similar.

 

What you can do is design a hardware interface circuit that uses an additional digital signal from the myRIO as enable signal and generates the desired default state as long as that enable signal is not on. That is anyhow in most cases the best and recommended solution if your external hardware uses non standard idle states (requiring +5V on input in idle state definitely isn't exactly a sign of a robust industrial control capable hardware either). And maybe your hardware already has such an enable pin and you just haven't discovered it?

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 4 of 5
(1,693 Views)
Solution
Accepted by topic author David15

Following on what @rolfk just said (and thinking about my own experience with a myRIO running a deployed Executable that, when it starts running, starts the FPGA which initializes the I/O ports I'm using), the boot-up process on (my) myRIO takes about 40 seconds, from the time the USB music plays until my Executable starts to run (I know when that is because I programmed a "blinking light" ID code to remind me which version of the FPGA I was running).

 

One solution that I've seen (now that I think about it) is a "Protector" consisting of "gating" chips between the myRIO I/O lines and the outside world, controlled by a single TTL input (from one of the DIO ports on the myRIO.  When not being driven to +5 (i.e. when the myRIO is off), this chip puts all the other "buffer chips" in a "safe configuration" (in your case, this might mean holding them at +5 V).  So if the myRIO is off, but the Protector is on, all the I/O lines (but one) are in a "safe" state (for your configuration).  When you power up the myRIO, you first configure all of the I/O lines except the one that goes to the Protector (so the myRIO is not connected to the outside world, but all the outward-facing Ports are in a "safe-to-the-outside" configuration).  Once your code is ready to "connect", meaning you've programmed the myRIO to put all its outward-facing lines in the proper "safe" state, you fire up the "Connect-me-to-the-outside-world" DIO port and your are Good to Go.

 

Or at least that's what our Circuit Designers assure me is happening ...

 

Bob Schor

0 Kudos
Message 5 of 5
(1,675 Views)