FPGA Analog Input with Scan Interface
Hi all,
I am rather new to the FPGA Module and have a question concerning analog sampling.
Before, I used a cRIO in scan mode to perform following tasks:
A state machine on the host PC performs one task after the other, e.g: output a voltage, run a stepper motor (with the NI 9512), Acquire voltage signals using the scan engine mode, logging data ; next voltage, next stepper position, next measurement, logging to the file,.... and so on.
Now, I want to perform the same task, however, with a sampling rate that exceeds the performance of the scan engine. So I think I need to jump to FPGA Mode.
The question is: Can I "mix" the measurement in FPGA while running others tasks of the state machine in scan mode? In more detail, I only "need" the FPGA Mode for the data acquisition, however, for running the stepper motor the Scan mode is perfectly fine and somewhat easier.
One idea of mine was to create a fpga-vi on the target that acquires a certain amount of voltage samples and sends it to the host. Now, could I run the state machine as I did before, just for the state "voltage measurement" refer to the fpga-vi on the target and get the data?
Thanks for any hint,
Jack
It would be best to not mix the scan engine and the FPGA. Yes, you can do hybrid mode, but it uses A LOT of your FPGA resourses. You can still use the state machine in your host, but you will just need to change the commands slightly to use the FPGA interface instead. Use a DMA FIFO to send your analog data to your host to be logged.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Similar Messages
-
Multiple fpga vi's with same interface, single RT vi
Hi everybody,
I'm using a crio system to control as experimental setup. In this setup several types of tests can be done and for each, basically the same control is done, but the returned data is different. Therefore i wrote several fpga vi's with the same controls on the interface, and a DMA fifo to transfer the data. I've also written a subvi for my RT system which reads the data from the DMA fifo and transfers it further downstream for analysis. This RT vi has to be rewritten for each FPGA vi as the FPGA vi references are incompatible. How do i make the subvi generic for all these FPGA vi's? The DMA fifo is the same, as is the type and amount of data...
looking forward to your suggestions,
Daniel LindenaarHello Daniel!
I am not sure which FPGA target you are currently using but one method to achieve what you want it to use the Up Cast method. If you use cRIO you have an example called ‘Using the Upcast Function - cRIO.lvproj’ and if you use R-Series look at the example called ‘Using the Upcast Function - R Series.lvproj’. Hope this helps and Merry Christmas!
Regards,
Jimmie Adolph
Systems Engineer Manager, National Instruments Northern Region
Bring Me The Horizon - Sempiternal -
PCI 6023E Analog Input with DAQmx
Hello everybody,
I have some problems with a PCI 6023E Card. I`m using Lab View 7.1 on Windows 2000.
When i start the MAX (Devices and.../NI-DAQmx - Devices.../PCI-6023E) and try to open the "Testpanel"
i get the following message:
Lab View: An exeption occurred within the external code
called by a Call Library Node. This might have corrupted
Lab Views memory. Save any work to a new location and
restart Lab View.
VI "BlockatContainerState2.vi" was stopped at node
0xA10 of Sub VI "DAQmxsorry i had a problem thats the rest of the message
Sub VI "DAQmx Assistant_DAQmx Create AI Channel (sub).vi"
i get the same message when i try to use the DAQmx Assistant for
analog Input measurements in Lab View.
I hope you can help me
best regards
Chris -
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 -
Trig an analog input with NI6115 through digital data sent by NI6534
Hello,
I have 2 NI cards: NI6534 (master), NI6115 (slave)
I have succeeded to do the following point:
The slave wait a trigger given by a generated pattern data through NI6534 to start an analog acquisition
(I noted that the start of the analog acquisition is delayed by 100 ns, is that normal?)
Now I want to delay the analog acquisition (let's say by exactly 5.0 microseconds)
Any idea how to do that
LorangerLoranger,
The delay you are seeing is expected. When using a trigger pulse to "trigger" acquisition on another card, there will be a small delay. Usually the card will actually "trigger" within 1-2 ticks of the timebase clock after the trigger pulse is received over the RTSI line. 2 ticks of the timebase on the NI6115 (timebase of 20MHz) corresponds to 100ns.
In regards to delaying the analog input aquisition; this is what I would suggest. I would have the trigger from the NI6534 go to a counter on the NI6115. You could program the counter to generate a delayed pulse (5 us) when the trigger from the 6534 is received. The output of the counter could then be used to trigger the analog input acquisition. This should work for you. I hope this helps.
Todd
D.
National Instruments
Applications Engineer -
How to read 2 analog inputs with VISA
Hello everyone! I want to read two analog inputs using VISA serial communication from the arduino. I'm currently able to read one of the input but how do I read two analog inputs on labview?
Hi lamela,
again I have to ask: HOW does the string look like? Is it so hard to provide an exact example of your received string???
I think the string is showing one value from the two inputs
Are you sure or are you guessing? How can we tell what you might "think" when you aren't able to provide examples?
You wrote you send values from the Arduino using the command "println(value1, value2)", but now you "think" you only receive ""value1" in LabVIEW?
Get your data communications clear! (And learn to provide meaningful examples!)
Edit after your edit:
my code to serial print two inputs: Serial.println(Voltage, Current);
Even if I print separately: Serial.println(Voltage);
Serial.println(Current);
The first command is completely different then the second part! In the first you should receive two values in one line, in the 2nd one you receive one value per line: You need to adapt your string parsing to these strings!
Again: send both values in one line. Use the LF as termchar. Separate the values by some separator char like comma. Check the received string for validity. Use some error checking in your VI. -
Can not get analog input with SCC-SG04
I have used the wizard and wrote a simple AI input channel loop with a digital readout. The voltage doesn't change.
Well, I guess I'm not sure what all you have tried or how you have things set or configured. I would first try verifying the input through the test panels in MAX. Make sure you have your DAQ card set to NRSE mode, make sure you have your SC termination equipment set as the "Accessory" to the DAQ card under it's properties, double check your connections, then see if you can read the voltage through the MAX test panels. After you can read the voltage there, then you can try using a program. I hope this helps!
Russell -
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 KBcustomise your front panel with advanced picture creation metods
Attachments:
SUF.ctl 20 KB -
Dv video time stamp with analog input
Hi,
I have a dv video which I want to time stamp with a analog input. For the video, which is dv brought into the computer with ieee1394, LabView calls up a C++ program which then stores the video. Simultaneously, in the program which calls up the C++, an analog signal is also stored (seperately). I know it sounds tricky as well as messy but this is the best we've been able to work out, given the uncorroperative nature of LabView with dv camera. Does anyone have suggections for time stamping these two signals so that I know exactly where in the video the analog signal occurs? The PCI board we use is the NI 6014, which I know is timestamp capable, but I dont know if it can stamp the video feed since it doesnt come in through the NI card.
All thanks in advance for any help!
DanielDaniel,
Does your DV camera have any sort of timing or triggering signals? Without these, it will be virtually impossible to correlate measurements. It is cetainly possible to accurately time an analog input with your DAQ card, but correlating these to the digital video would be extremely difficult. Is this video streaming in real time? Or are you reading it off of an already-recorded tape? If this video is streaming in real time, with an acquisition started in software, I would suggest attempting to start the software DV reading at the same time as your DAQ task. If you do have an external signal that can trigger the video acquisition, then I would suggest using that same signal to start your analog acquisition.
Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments -
I want to trigger an analog input with a pulse generate
by gating counter 0 with the Analog Output UPDATE* signal.
any suggestion?
Thanks,
ErinResponse-For what it is worth this isn't a very straight forward thing to
achieve with LabVIEW VIs. I have been trying to do the same thing for a
month now with no luck. If it is any consolation, NI tech support hasn't
provided any working solution to this either. If I get it figured out in
a few days I'll try to remember to write back.
Try using the analog scan clock to trigger the analog read instead of the
traditional "triggering" schemes in the LabVIEW documentation. Their terminology
is misleading. Per LabVIEW the term "trigger" relates to the oscilloscope
concept where you specify voltage level and edge-transition to recognize
a waveform in order to high-speed sample the incoming waveform.
In the embedded system the term "trigger" refers a specifi
c point in time
(defined as an "event") usually represented by a signal transition (rising
or falling edge) at which you want something done such as read an analog
input or save a counter value. In microcontrollers this is generally handled
with a specialized hardware port called an input capture which is designed
to automatically recognized signal transitions and simultaneously fire off
an interrupt (read as "trigger") that can be used to start your unique action.
LabVIEW documentation doesn't seem to have a clue about this concept. Perhaps
you know all this already. Hope it helped in some manner anyway.
Frank
"Erin Ryan" wrote:
>>I want to trigger an analog input with a pulse generate>by gating counter
0 with the Analog Output UPDATE* signal.>>any suggestion?>>Thanks,>Erin -
How do I get a 100 V 100 Hz signal into a NI PCI-6111 analog input?
I have a 100 volt 100 Hz signal that I want to bring in on NI PCI-6111 analog input (+/- 5V input). Is there some small off the shelf transformer or other type of signal conditioning I should use? Basically I just need to time stamp other analog inputs with this one coming on.
The PCI-6111 has a built in attenuator to allow up to 42V inputs. In order to read 100 volts you will have to use some sort an external attenuator. National Instruments offers several different modules and terminal blocks in the SCXI form that would accomplish this.
I would recommend reading through this KB for more information.
http://digital.ni.com/public.nsf/websearch/38AEFF122C8D732F8625629800519927?OpenDocument
I hope this helps.
Joshua -
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 -
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. -
Synchroniz​ing two counter frequency inputs with multiple analog inputs
Hello all,
I'm fairly new to LabVIEW and I'm trying to collect data from multiple sources with synchronized timing on the acquisition but I'm having trouble figuring it out. My problem is that I've got two counter frequency inputs, one optical tachometer reading one pulse per revolution, and a max machinery flow meter with a k factor of 12000. I can't seem to figure out how to sync the timing with my multiple analog inputs. I've been attempting to get the tachometer to sync with the analog inputs first by following the example linked here. (https://decibel.ni.com/content/docs/DOC-10785) So far each time I run it I either get a timeout error on the DAQmx read or a "Multiple sample clock pulses were detected" error (see attached image). It seems if I slow the sampling rate way down to say 10 hz and ensure that the tachometer signal is over 800-1000 RPM (13-17 Hz) before starting the VI then the program will run without errors until the RPM drops below that threshold then the "Multiple sample clock pulses" error occurs. The code is attached below.
Does anyone know of a more effective way of syncing counter frequency inputs with analog inputs? I'd like to have a VI that can show 0 RPM (and eventually 0 flow as well, but I think I need to figure out the timing of one counter before I add another as it seems I can't have two counters in the same task). Any help on this would be greatly appreciated.
LabVIEW version 13.0
cDAQ-9178 Chassis with NI 9401 for the two counter inputs and NI 9205 for the analog inputs.
Thanks!
Richard
Solved!
Go to Solution.
Attachments:
SimpleDAQ.vi 44 KB
LV_Error.JPG 31 KBMaybe third times the charm?
So I've finally got a good handle on why the VI is having problems at low RPM though I'm somewhat embarassed how long it took me to do that
Because I have the counter time synced to my Analog input task if it doesn't see at least two pulses between the two clock pulses set by the analog input task I get the -201314 "Multiple sample clock pulses" error. This seems fine at first as it just sets a minimum RPM that I can measure and it's well below the area I'm interested in so no problems there. I tried a simple error handler that would clear the error when it happend assuming the loop would keep iterating until the RPM went above that minimum at which point I would get a signal again. This is not the case, the read function just continues to spit out the -201314 error even after the RPM is back in the readable range. So then I tried adding two case structures so that when the error occured it would stop the task, clear the error, and then start the task again on the next loop iteration (Code Attached). This also doesn't work as the error shows up again on the stop task and then AGAIN on the start task on the next loop iteration. It seems this error is not actually being cleared and once it happens it stays with the task regardless of what the error cluster is carrying.
Anyone have any ideas? The only solution I can think of is to just clear all tasks and recreate them each loop iteration until the RPM is readable again but that strikes me as a horribly clunky solution.
Richard
Attachments:
SimpleDAQ_1_Start Stop.vi 48 KB -
LV7.1
DAQmx
PCI-6036E
SC-2345
Windows 2000
Greetings.
I am simply trying to synchronize AI readings with readings from one Counter.
I am trying to perform buffered analog input synchronized with buffered counter acquisition.
I'd like the AI acquistion to trigger the Counter acquistion.
I'm currently setting the Sample Clock Source for the CI Cnt Edges Task to "Dev1/ai/SampleClock" but when I try and set the source for the "DAQmx Trigger" I can't seem to select one that works. I assumed that the source should be the "Dev1/ai/StartTrigger" but that produces and error as does selecting any of the PFI's.
I'm new to DAQmx and didn't have any luck with the examples or what's been previously posted.
Thanks for your help.
Attachments:
Initialization.jpg 84 KBGentlemen-
All of your initial help was great. I had some noise on my counter lines so switched from an E-Series card to a PCI-6259 M-series card in order to use the counter digital filters.
Now I can't get a corellated buffered counter and buffered analog input acquistion to work. This same code worked fine on an E-series card but it doesn't on the M-series.
I verified that the source and gate of the counter are working properly using the test panel and a external function generator.
But when I run the attached code I get no data out of the "Counter 1D U32 NSamples", only an error saying that the timeout of the function was reached and no count data became available. Am I missing the specification of a another clock or something?
The counters also work fine using the M-series example code "Count Digital Events (M-Series DAQmx) but this is not a buffered acquisition.
Any help would be greatly appreciated.
Steve
Attachments:
Sample_Code.jpg 136 KB
Maybe you are looking for
-
Return nothing when run Open Purchase order report(by Buyer)
We implement iPro/PO in Oracle. I finished the PO setup. But now user report that they are not able to generate any output for a particular Buyer when they run the Open Purchase Orders Report(by Buyer) report in the PO module. Even I leave the parame
-
Error V1 322 u2013 Delete Reason for rejection
Hi, I have the following error when I trying to delete the reason for rejection in sales order position: Error in building the index of the table XMVERF_POS / 0000396002 / 000010 Number message V1322 Internal Error Where 0000396002 is the sale order
-
Unable to connect Firefox can't establish a connection to the server at www.facebook.com. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection
-
How to customize AR Statement Generation program
Hi, Our client needs some additional attributes in the AR Statement generation program. The program is a Spawned program and internally calls an RDF ( ARXSGPO.rdf ) How can we customize the program(spawn type) to include some additional fields in the
-
Can somebody easily get your password?
well, I am using skype since very long, a few days back somebody threat me to hack my password, and now today he get my skype's password easily and change the email address too, I logged in my skype on only 2 computers and both are completly asecured