Scanning of analog inputs in PXI 7831R FPGA
Hi all,
I am new to Labview FPGA Module. I am using Labview 7.1.1 and Labview FPGA Module 1.1 . I am using PXI 7831R FPGA Card.
I developed a program which is used to scan analog Inputs with given scan rate for given scan duration. I gave input as pulse signal with 1Sec period and 2 V amplitude.
If I scan one analog Input with 10ms scan rate for 1000ms scan duration I am getting correct values. But if I use 2 or more analong signals to scan at the same time then I am getting Multiple of periods. And also If I increase or decrease scan rate I am getting strange values. Could any body please check my code and help me.
Thanks in Advance.
Regards,
Sashi
Attachments:
AnlogIn_FPGA.zip 247 KB
customise your front panel with advanced picture creation metods
Attachments:
SUF.ctl 20 KB
Similar Messages
-
Accessing the 40MHz clock on the PXI-7831R FPGA Module
How do you access the 40MHz clock on the PXI-7831R FPGA Module?
I'm trying to the FPGA to do RS-422 communication with UART and HDLC protocols. I want to divide the clock signal to generate the necessary baud rates. I've downloaded the FPGA serial examples as a start, but I'm looking for a direct connection to the 40MHz signal.
I'm Using LabVIEW 7.1 and FPGA Module 1.1 with the LabVIEW Embedded Project Structure.settlesj,
If you are looking to have access to a 40MHz digital signal, it is possible to generate and acquire one using 7831R and LabVIEW FPGA module. To do this you would need to take advantage of the different compile speeds available with the FPGA module. The available compile clock frequencys are: 40MHz, 80MHz, 120MHz, 160MHz, 200MHz
For example to generate a 40MHz pulse train you could compile with 80MHz clock frequency (2 clock pulses are needed for a square wave period).
You will have to be careful when generating code because compiling with a clock frequency higher than the default one (40MHz) could give compile errors in some cases. These errors could happen more frequently if the code is more complex and needs more time to be executed.
I have attached an example program that generates a 40 MHz signal on a digital line. From there you could divide down the clock rate to which ever specified baud rates you needed. As a side not the LabVIEW FPGA 8.0 Module added the ability to derive additional clocks from FPGA base clocks in a LabVIEW project. Hope this helps.
Steven B.
Attachments:
Test40MHz.zip 57 KB -
Does the PXI-7831R FPGA have onboard anti-aliasing filters for AI?
Dear Forums,
Apologies for the simple question but the docs do not speak to this question explicitly:
Do the analog input lines on the 7831R FPGA module have any kind of on-board anti-aliasing?
Thanks,
Casimir
Solved!
Go to Solution.No
Stu McFarlane
Viewpoint Systems, Inc. -
Problem with the analog input acquisition in labview fpga 8.5.1 and CRIO
Hello all,
I am using NI CRIO 9104 RT controller with 9014 FPGA chassis.I am using an Analog input module 9205.My problem is with the acquisition.I am using a
function generator which generates some sine wave of -1 to 1 ,5hz to125khz sine signal and i have connected to 9205 in rse mode.In FPGA vi i had placed the I/O node and placed an indicator(data type FXP).If i connect the i/o node to a chart or graph,i am not able to see the output.?How this problem can bbe solved
Next i had placed a FIFO in DMA transfer mode of depth 1023 which will accept the U32 datatype,so i did some manipulation as mentioned in a tutorial.
Now in RT VI i am reading the same data from the buffer in U32 and doing the reverse manipulation i am able to view the data.Now the problem is ..if i am
increasing the frequency of the input signal,the data is completly lost ?How can i overcome this problem...
thanks in advance,
srikrishna.J
Analysis Engineer,
NeurofocusDifficult to see where is the problem ....
Be sure you are doing a good RT system by grabing reference design examples
Don't forget to specify the DMA FIFO size in the RT code
Doesn't matter the size of the DMA size under the FPGA project explorer.
Upload your code, You will get answers...
Mathieu -
13MHz synchronous serial PXI-7831R FPGA
Hi,
Have a requirement to emulate a slave synchronous serial interface (similar to SPI) at a rate of 13Mbps. Does this seem feasible using a RIO PXI-7831R?jimhar8 hello.
I am not very familiar with the slave synchronous serial interface, however, take a look at the following links that talk about implementing SPI.
Reading an SPI Interface with Compact RIO
SPI Communication in LabVIEW FPGA
Efosa O.
NIAE -
How can I display an analog input to PXI-5105 out on LabVIEW?
Hi ALL,
I am very very new to LabVIEW and I just started to fiddle around with it. I am running LabVIEW 2010 SP1 version on Windows 7 OS. I also have NI PXIe-1073 chassis with PXIe-6361 and PXI-5105 modules and the chassis is connected to my PC via PCI. I was getting myself acquainted with the devices and was trying to see some analog signals to one of the channels on the PXI-5105 module in a graph in LabVIEW.
I would appreciate your helps.
Solved!
Go to Solution.Hello Henokview!
I would like you to read through these tutorials to understand the programming steps of NI-SCOPE and NI-DAQmx. After reading these links below you will be able to understand how to connect output from a readfunction to a graph or chart.
DAQmx
http://www.ni.com/white-paper/5434/en
NI-SCOPE
http://www.ni.com/white-paper/3382/en
Best regards
Jonas
Best Regards
Jonas Mäki
Applications Engineering
National Instruments -
7831R Analog Input Noise Problems
Hi,
I am running a data logging application which samples the analog inputs of my 7831R FPGA card with a sample rate of 10KHz. I am interested in how noisy the PXI system itself is, so I shorten AI0+ and AI0- together, hook both of them up to A0GND through a 10K resistor (all done in the SCB-68 breakout box which is connected to the FPGA card through a SH68-C68-S cable) and log data from the analog input.
The data log shows about 12 counts of noise in the system. That's about 3.5 bit. Is there any way I can reduce the noise?
Thanks,
ChrisHi Pete,
You are right in saying that the 7831R boards should acquire data much faster than 10KHz. Infact you can take a look at the actual specs from the data sheet http://sine.ni.com/nips/cds/view/p/lang/en/nid/14757 as well as the product manual. However, I am concerned that you may be measuring the rate of acquisition on the RT VI (or any host vi) you are running as opposed measuring it in the FPGA VI.
Your time critical loop may be running at 228 ticks of the 40 MHz clock but the data is buffered (at that rate) and has to be then transferred to the communication loop which then sends the data to the host vi (which may be your RT vi). Hence, the rate at which host VI receives the data will be much slower than the FPGA VI is acquiring data.
Hope this helps!
Prashanth -
PXI-7831R analog input max sampling rate?
I'm using 5 of the analog inputs on the 7831R and seem to only be able to get a max sampling rate of 10K per channel. Looking at the specs it should do at least 10 times this per channel, also the time for the A/D loop is 228 ticks of the 40MHz clock so this would suggest a higher sampling rate than just 10K. I'm missing something here... Any ideas as to what the deal is?
peteHi Pete,
You are right in saying that the 7831R boards should acquire data much faster than 10KHz. Infact you can take a look at the actual specs from the data sheet http://sine.ni.com/nips/cds/view/p/lang/en/nid/14757 as well as the product manual. However, I am concerned that you may be measuring the rate of acquisition on the RT VI (or any host vi) you are running as opposed measuring it in the FPGA VI.
Your time critical loop may be running at 228 ticks of the 40 MHz clock but the data is buffered (at that rate) and has to be then transferred to the communication loop which then sends the data to the host vi (which may be your RT vi). Hence, the rate at which host VI receives the data will be much slower than the FPGA VI is acquiring data.
Hope this helps!
Prashanth -
PXI-6230 analog input trigger setup
Hi,
Can anyone point me in the right direction of how to configure the PXI-6230 card to implement 3 of the analog input channels as a digital input trigger? The input to each channel is TTL pulses. I want to have a trigger event on every pulse from any of the three inputs. I'm using LabVIEW 8.5. Any help is appreciated. Thanks.Hey HarveryL,
I'm not sure it is possible to do this. Can you give me some more details on your application, and why you want to use the analog inputs as a digital trigger? Here is an article on how to use PXI triggers with the analog input and output, perhaps you can adapt that code to your purposes. I'll continue to look into this for you, but any more information you can provide would be appreciated. Have a great week!
John B.
Embedded Networks R&D
National Instruments
Certified LabVIEW Developer -
I have just gotten my cRIO with a analog module (9201) and a digital output module (9472).
When I place an Analog Input Module on my block diagram and double click it, I can choose from the following inputs:
Channel 0 through Channel 7
AND
Chassis Temperature
I have tried to find any documentation for this "Chassis Temperature" but so far without success.
If I read this input and feed it straight to an indicator, I get values in the range of 120 to 150.. Now, without more information, this number is rather useless. Does anyone know how to transfer this data to a temperature (either in the Celcius scale or the Fahrenheit scale)?
Thank you!
Project Engineer
LabVIEW 2009
Run LabVIEW on WinXP and Vista system.
Used LabVIEW since May 2005
Certifications: CLD and CPI certified
Currently employed.I still did not find any documentation for this "feature" but I lucked out and found the following:
in the folder: \labview 7.1\examples\FPGA\CompactRIO\cRIO-910x\
you should have a file called:
cRIO-910x support files.llb
in this there is a convert to temperature vi.
To get the raw data as a temperature, it looks like all you have to do is divide the binary data by 4 and the answer will be in Celcius.
Project Engineer
LabVIEW 2009
Run LabVIEW on WinXP and Vista system.
Used LabVIEW since May 2005
Certifications: CLD and CPI certified
Currently employed. -
Error -200072 using analog input with 3 PXI 6120 cards on realtime mx system
I have just upgraded to the mx drivers for the 6120 S series boards.
I am trying to sample 12 analog inputs at once with a pretrigger. (4 channels per board)
The error message -200072 comes up.
One board works fine, when I add the second board's channels the error occurs.
Each board shows up as A,B,C respectively in MAX and in the Labview browse menu for selecting channels.
Greg Morningstar
TakataProbably the best way to do this would simply be to use the Route Signal VI to make it to where each of your boards looks at a particular line for the trigger. You can do the same thing for the clock so that they are all sampling at the same time.
You will also want to make sure that your device is defined in MAX. Once you do that, everything should be pretty easy to implement. You might also want to look at some of the examples that show how to do RTSI. It's almost the same as you would do for a PXI system.
Otis
Training and Certification
Product Support Engineer
National Instruments -
hi, iam facing problem in synchronizing 4 ni 4472 cards input with pxi -6052e analog output. please help me out to sort out this problem
Hi achyuth,
Thank you for posting on the National Instruments forum.
I am not sure what you are trying to do. Are you trying to input and output at the
same time? Are you just trying to
synchronize all of your inputs? Do you
want them to run off the same clock? If
you could, give me some more information so I can understand your problem
better.
In the meantime, this might help you:
PXI Timing,
Triggering, and Synchronization Capabilities of E-Series Multifunction Data
Acquisition ...
PXI Timing and Synchronization
Thank You,
Nick F.
Applications Engineer -
Current acquiring with NI PXI 7831R
I am using PXI 1042 for my academic project. My objective is to acquire the leakage current of insulator for analyzing it further.
Initially we tried to use PXI 5112, but could not succeed with it as it is not possible to acquire current waveforms with PXI 5112. The value of leakage current ranges from 0 to 200mA.
My query is whether I could use PXI 7831R for acquiring the leakage current of the insulator, with the range I have mentioned above. Is there any programming or pre-configuration of PXI 7831R before starting of acquiring the current waveform. And also please clarify me about the connectors I need to use.
Thank you in advance.The analog input can acquire signals at 200 kHz. The digital inputs can acquire signals in one clock cycle of the FPGA, so the actual acquisition speed for digital depends on your specific application code, but can be as fast as 40 MHz. Processing of data also depends on the amount of code in your processing routine.
As an alternative to the onboard analog inputs, it is possible to use a faster external A/D converter and use the high speed digital interface to read the data from the external ADC.
Christian L
Christian Loew, CLA
Principal Systems Engineer, National Instruments
Please tip your answer providers with kudos.
Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense -
I am getting a -50101 error when trying to get analog input from a compact rio
I am just doing the initial setup of my compactRIO system and have been able to successfully add the cRio in Max and then into a new project. I created a very simple VI with analog input that I am trying to read into an indicator, following one of teh tutorials. The module I am reading the input from is a cRio-9201. The input is voltage. I have already added the module to teh project under the FPGA, which is under the RIO in the project tree. Any ideas what I may be missing would be greatly appreciated!
ThanksThe 9201 C Series module needs to be created under the FPGA Target
(cRIO-910x) in the LabVIEW Project. You can either discover the module
or create it by type. In case you haven't created the FPGA Target
(cRIO-910x) under the cRIO Controller (cRIO-900x), you must do that
first. You also have the option of discovering the cRIO-910x or to
create it by type. I suggest you do it through discovery, so you don't
need to manually configure the addresses.
As how to create the items, that's done through right-click on the
cRIO-900x and select New>>Targets and Devices.... It will pop up
a dialog in which you expand FPGA Target and it will discover the FPGA
Target. Similar steps are followed to create the 9201 module.
If you don't see the FPGA Target and C Series module options, then you
need to make sure NI-RIO 2.0 is installed in you computer.
JMota -
How Do I Configure the PFI Lines as input in PXI 6713 module
Hi,
I have PXI 6713 module in my PXI 1044 chassis. I have configured PXI 6713 module to geneate certain analogue signals to my board.
Board inturn process this analogue signal and responds back the status signals through a status register on the board. In my application,the status bits in status register of the board are mapped to the PFI 0:3 bits on PXI 6713 module ( pins 11,10 , 42 and 43).
My query is how do i configue the PFI lines as input in PXI 6713 module to read these status bits ??
May be below explanation could give you little bit more information w.r.to my query.
When i use NI USB - 6008 module to read the same bits , since this device has 12 digital I/O lines, i could able to read the status bits in to the last 4 digital lines by configuring the those digital lines as input.
In PXI 6713 module i have only 8 digital lines. These 8 digital lines i have used to send the digital signals to the board. I am left with no digital I/O lines. Hence i couldn't use these digital lines. I am left with only one option to use. Theya re PFI lines. Moreover the status bits in the pin out of board are mapped such that the bits can be read through the PFI lines.
I am wondering do we have any example code to use inorder to read these status bits on the board using the PFI lines.
Please let me know if you need additional information to help me out.
Thanks.
Solved!
Go to Solution.Hello There,
When using the PFI pin as an input, you can individually configure each PFI for edge or level detection and for polarity selection. This PFI information can be referenced in the DAQ Analog Output Series Manual on page 6-1 (http://www.ni.com/pdf/manuals/370735e.pdf). Unfortunately, the PXI-6713 PFI lines are only capable of timing input and output signal for AI, AO, or counter/timer functions. The option of creating static DI from the PFI lines is not available for the PXI-6713. However, some cards have this capability. Newer National Instruments products with PFI lines have the option of setting PFI lines as:
Static Digital Input
Static Digital Output
Timing Input Signal for AI, AO, DI, DO, or counter/timer functions
Timing Output Signal from AI, AO, DI, DO, or counter/timer functions
(http://digital.ni.com/public.nsf/allkb/14F20D79C649F8CD86256FBE005C2BC4)
When set as static DIO, the PFI lines are assigned to a different port (eg. PFI0-7 is Port1). More details about this can be referenced at:
http://digital.ni.com/public.nsf/allkb/DA2D3CD0B8E8EE2A8625752F007596E1
http://digital.ni.com/public.nsf/allkb/862567530005F09E8625677800577C27
Regards,
Roman Sandoval | National Instruments | RF Systems Engineer
Maybe you are looking for
-
Hi All! While entering the multiple line items in the sales order(Quotation) screen , at the 60th item the system throws following error message : System : Schedule lines of Item 000060 is not in Work are. Has anyone ever came across such message dur
-
I have an ASA configured with a server in our DMZ. It is currently configured to be accessed via the internet on port 80. That works. Now they want to initiate traffic from the DMZ to the internet. I thought the static NAT would keep the IP. Its a
-
Menu Button issue with the iPod Universal Dock with Remote
What is the status of a firmware release to address the inability of the Apple Remote to mimic the menu button on the iPod? Is it even possible to update the firmware to provide this functionality? What is the hold up? I am boycotting further hardwar
-
My Macbook Pro is getting hot pretty quickly. What are the possible causes? I have had the machine about 3 years.
-
YouTube app "unknown error" when opening a video using WI-FI
YouTube app flags an "unknown error" when i open a video. YouTube opens and searches for videos but when i open a video, it loads and ends up flagging "unknown error". I found out that it works when i use Cellular Data. Doesn't work when using WI-FI.