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: 

Convert binary to voltage value

hi i'm using cRIO 9002.
i've seen in some posts that people when make a VI for the generation use a block (l think that it is a subVI) to convert data in volt and then they send this data to the FPGA.
Is there someone that can give me this block called Convert binary to volt?because i don't know how to do it Smiley Sad
Tnx
0 Kudos
Message 1 of 10
(7,841 Views)

Usually, you read the scale factor/gain and offset for that channel and multiply the acquired binary data with the scale factor/gain and add offset to the result of multiplication to get the voltage value.

Voltage value= (binary value* gain) + offset

0 Kudos
Message 2 of 10
(7,840 Views)
so there isn't a subVI that do this?because i've seen some VI posted by other people that show a convert data into volt.
0 Kudos
Message 3 of 10
(7,830 Views)

The VI you are referring to is part of the LabVIEW examples installed with the NI-RIO driver.

C:\Program Files\National Instruments\LabVIEW 8.0\examples\CompactRIO\Shared

This folder includes VIs to convert binary values to voltages and vica versa. In both cases you first need to read the calibration constants from the C series module that you are using, so that you can pass them into these subVIs.

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 4 of 10
(7,821 Views)

i've tried but it gives this kind of errors:

Gen-Acq_RT.vi
    - The VI expected to be at "C:\Documents and Settings\alfredo\Desktop\compact rio\labview_8\acq_8_canali\Convert to Voltage (cRIO-9215).vi" was loaded from "C:\Programmi\National Instruments\LabVIEW 8.0\examples\CompactRIO\Shared\Binary to Nominal.vi".
    - The VI expected to be at "C:\Documents and Settings\alfredo\Desktop\compact rio\labview_8\generazione\generazione_due_canali\Convert to Binary (cRIO-9263).vi" was loaded from "C:\Programmi\National Instruments\LabVIEW 8.0\examples\CompactRIO\Shared\Nominal to Binary.vi".

 

why?

0 Kudos
Message 5 of 10
(7,796 Views)
i mean i need a block like this one that i've posted in the picture.
christian i've tried to follow your suggest but i don't found them.
i've also tried this way
but i don't find as it says " \examples\FGPA\CompactRIO\cRIO-XXXX\ "
i have the folder example but i don't have the folder FPGA in the folder example.... i'm in trouble.Smiley Sad
 
0 Kudos
Message 6 of 10
(7,791 Views)

Hello Martin,

Which version of LabVIEW and NI-RIO are you using?

The difference in VIs for converting nominal to bniary values (and binary to nominal) is a result of different versions of the NI-RIO driver and LabVIEW. In LabVIEW 7.x and NI-RIO 1.x there were different VIs for each type cRIO module to perform this conversion. These are the VIs you have referenced. The VI name includes the name of the cRIO module.

Starting with LabVIEW 8 and NI-RIO 2.x, NI combined all of these different VIs into one VI for nominal to binary and one for binary to nominal conversion that work for all modules. One of the inputs of these new VIs is the type of module that you are using. These are the VIs I attached to my previous post.

If you are using LabVIEW 8.s you should use the newer VIs. If you are using LabVIEw 7.x, the older VIs should be available in the examples folder for each module type as listed in the application note you referenced.

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 7 of 10
(7,773 Views)
yes i'm using labview 8.0 so what i have to do?i'ven't understood very well Smiley Sad
0 Kudos
Message 8 of 10
(7,759 Views)

Hi martinmis,

All the things that Christian has told you are correct and I think that your problem is linked only to a "path misguiding".

The error you mentioned, said that the VI that the program needs to load has not been read from the path:

C:\Documents and Settings\alfredo\Desktop\compact rio\labview_8\acq_8_canali\Convert to Voltage (cRIO-9215).vi (which is not the default NI program path),

but instead from the path:

C:\Programmi\National Instruments\LabVIEW 8.0\examples\CompactRIO\Shared\Binary to Nominal.vi (which is the proper default NI software path).

I suspect that something similar happens when you try to find the FPGA folder.

Try to check the path. However I suggest you to install NI softwares without changing the default destination directory: all would be simpler and faster (because in so doing when an NI software needs a particular "component" it searches and immediately finds it into the right "expected" folder)

bye

carlo>

0 Kudos
Message 9 of 10
(7,666 Views)

Hi all,

 

I'm using cRIO 9024, cRIO 9113 Chassis, NI 9205, NI 9264 and NI 9237. I also have a small hydraulic tank with proporsional valve and a cylinder. By the way, I'm very new to LabVIEW but I work hard. I'm trying to study all of the tutorials on Internet.

 

I'm able to create sine-on-sine (double sine) waveform by using NI 9264. I can write the values of NI 9237 and NI 9205 to the waveform charts. All of these run in scan interface.

 

I decided to work in the FPGA interface but I'm having problems with input modules. I don't have any problem with analog output module but the values on waveform chart aren't I expected, not even close.

 

When I searched on forum, I saw that the calibration needs to be done in analog input modules but I couldn't get the exact meaning of calibration in a module. Someone said that the conversion of binary to nominal must be done. After that calibration coefficients should be entered. I think I miss a critical point about that.

 

So, I'm attaching the screenshots of my FPGA.vi and FPGA Host.vi. I've copied Binary to Nominal.vi to my project.

 

Let me remind you again, I'm very new to LabVIEW. The problem may be very easy or foolish but I'll be happy if you can show me a way.

 

Best regards,

Emre

 

 

 

Download All
0 Kudos
Message 10 of 10
(4,928 Views)