f



reading analog input and synchronize it with digital data

HelloI have to output 5 digital outputs to derive 32 LEDs in sequence. That is already taken care of. The sequence is tested and its working fine with a delay of 0.5s between the sequence.The LEDs will be attached to 32 plastic optical fibre (POF)  deformation sensor. The other end of the 32 POF will be connected to transimpedance amplifier and then to an optical meter. The optical meter has a BNC analogue output that to be taken to DAQ card.Now what I need is to read the analogue input from the optical meter (one channel only), display the value and store it in a file.The analogue input should read 32 reading corresponding to the 32 LEDs, then store the data to a measurement or excel file, and rpeat the process again.I.e. once the LED1 is flashed, I need to read its corresponding analogue value, then the 2nd and so on till the 32, and then store the 32 values in a file. And repeat the process gain after the 0.5s delay.I have done a basic labview to do this. I think I can put the two programs in one and run themHowever, I am not sure how to do the synchronization between each LED (light time) and the analogue reading value of it. Can you offer any help?Attached is the labview program done in version 7.1.


5 digital output lines for the LEDs.vi:
http://forums.ni.com/attachments/ni/170/264539/1/5 digital output lines for the LEDs.vi


read AI.vi:
http://forums.ni.com/attachments/ni/170/264539/2/read AI.vi
0
x9561 (148438)
8/9/2007 4:40:06 PM
comp.lang.labview 35210 articles. 1 followers. vasusachin24 (1) is leader. Post Follow

7 Replies
724 Views

Similar Articles

[PageSpeed] 1

Hello Love,
I'd just like to clarify exactly what you want to achieve.
At the moment you are powering 32 LEDs from 5 DIO lines from you NI DAQ card. Are you powering multiple LEDs from a single line or are they multiplexed in some way?
Every 500ms you want to drive the 5 digital signal to the LEDs and at the same time read the single analogue signal from your sensor. Is this correct?
Also what NI DAQ card are you using?
Cheers
Tom | NIUK
0
x9561 (148438)
8/10/2007 9:40:06 AM
Hi Tom,

 

The 5 DIO is deriving 2 decoders each handling 16 LEDs, so 4 lines addresses the decoders and the 5th as selector to enable the 32 LEDs in sequence.

 

It is not necessarily the time will be 500ms, it will be either, 100ms or 10ms or in between these two values.

 

I have 6024E and 6071E.

 

Cheers

 

Love
0
x9561 (148438)
8/10/2007 10:10:07 AM
Hello Love,
With the NI PCI-6071E your best bet would be to generate a clock a pulse width of your choice (500, 50 or 10ms) and then use this signal as your timing source for the other DAQmx tasks (the digital output and the analogue input.)
Examples of how to generate a clock, and how to use external clock timing for Analogue and Digital tasks can be found the LabVIEW Example Finder under Hardware Input & Output >> DAQmx.
Cheers
Tom | NIUK
 
 
0
x9561 (148438)
8/10/2007 10:40:05 AM
Hi Tom,
Thanks for your support.
Could you plz point out to a certain example, and how I can link it to my program.
Thanks
 
 Message Edited by Love Electronics on 08-10-2007  05:25 AM
0
x9561 (148438)
8/10/2007 10:40:06 AM
Hello, 
Using an external line to clock an Analogue Input task:
Hardware Input & Output >> DAQmx >> Analogue Measurements >> Voltage >> Acq&Graph Voltage - Ext Clk.vi
Using an external line to clock an Digital Output task:
Hardware Input & Output >> DAQmx >> Digital Generation >> Write Dig Channel - Ext Clk.vi
To generate a clock:
Hardware Input & Output >> DAQmx >>Generating Digital Pulses >> Gen Dig Pulse Train - Continuous.vi.
Cheers
Tom | NIUK
0
x9561 (148438)
8/10/2007 12:10:08 PM
Hi Kevin,

 

Thanks for the tips, but I am kinda lost here. I am not expert in Labview so you could imagine. 

 

How to do a ?software timing for your Analog input?. What I understand from the E series issue is that it depend on the speed and memory of the PC.

 

I qoute: ?That being the case, I would make sure the software timing delay comes between the digital output and the analog input.? Does this mean to connect the delay of the DIO sequence to the AI input as well.

 

Thanks
0
x9561 (148438)
8/12/2007 5:10:06 AM
If you configure a DAQmx analog input task without calling DAQmx Timing to identify a hardware timing signal, then the task will be "software timed."  In other words, each time you make a software call to DAQmx Read, the board will immediately sample all the AI channels and return this data to you.
With regard to sequencing, I meant something along the following lines.  You'll have a repetive loop.  Inside this loop, you'd first generate your digital output pattern.  Next you would wait for some short finite time to give your sensors a chance to fully respond.  Then you'd take your next analog sample.  Having finished this, your loop can progress to the next iteration and change the digital output pattern immediately.
-Kevin P.
0
x9561 (148438)
8/13/2007 5:10:12 PM
Reply:

Similar Artilces:

synchronize delayed digital output with analog input
Hello everybody, we are students studying biology and have been working with Labview 8.2 for the last 2 month. Now, we have been assigned a more difficult task, for which we would like to hear your advice. We apologize in advance for our bad english. We are going to acquirie analog data from 16 different channels, using a pci-6143 card. In addition, we want to activate our external stimulation device using a digital output 24bit  1D boolean array. This action is supposed to happen after a certain amount of analog measurements, e.g. 2000 time steps. To receive the most exact data, w...

synchronize analogue inputs with digital inputs
Dear fellows   I am using NI-DAQ, PCI-MIO-16E-4 (new name is 6040-E, I guess) with LabView 7.0. I am working on neuro-physiological signal acquisition. I have 16 analogue input channels and one digital input channel. Digital input is acquiring a TTL level signal that is a reference to the onset of a particular event. I want to synchronise both analogue and digital signals.   Any suggestion?   Nabeel Nabeel, have a look on following KB: http://digital.ni.com/public.nsf/websearch/851A80A7AB2885E086256F4D000610E6?OpenDocument (it's similar with DI) regards...

How do I read input data on a TDS 210 using Labview 5.1
I am trying to read the data from the TDS 210 scope and see the data on the screen. How do I do this? Hello, I have the same model of that scope here at the lab.There can be two ways you can do this one is using the Wavestar software from Tek and yes, using LabVIEW. Common to this is the use of a Serial Interface (or GPIB if you wish) that has to be purchased separately from Tektronics, also a null modem and serial cable (DB9) with your version you have to code it using VXI drivers or low level serial VI component library. Read exactly the string command formatting of your Tek manual and sen...

synchronize 3 analog outputs and 4 analog inputs
hi,   i have an NI PCI-6259 M series DAQ card and need to somehow generate 3 AO voltage waveforms of different frequencies (about MHz- 100KHz frequencies) which are synchronised and then also aquire the waveform, after undergoing some kind of intereference, through 4 voltage AIs.i also need to start the AI data aquisition clock in synchronisation with the AOs.does anyone have any vi's that could help?i have managed to synchronise 1 AI and 1 AO, but when i try 1 AI and 2 AO's, an error comes up because i am using the write waveform function for both A...

Film digitizers that convert an analog film image to digital data which IOD represents?
A Film digitizers that convert an single analog film image to digital data, creates Secondary Capture Images. Which IOD is used? SC Image IOD or Multi-frame Grayscale Byte SC Image IOD? ...

Can I change the voltage range of an analog input (FP-AI-102 Input Module) in LabView?
Hello, in my application I use a FieldPoint AI-102 analog input module which is controlled by LabView. Is it possible to change the voltage range of the inputs in Labview or can I only change them in the "Measurement and Automation Explorer"? Thanks. Michi M. Look at the high and low limit controls at the analog input functions. You can recieve help using 'cntrl + H' ...

Keithley 617 lag in Labview VI's reading of data + repeats same data every 100 pnts
Please help. Ive been struggling with this for months now, before i found this site. No one in this studpi dept is able to help me. I have the VI's, if you want to see them, i can email them. I have the Keithley 617 reading data from a photomultiplier tube (PMT) and it is interfaced with a GPIB card to a 500 mhz pentium computer with Labview on it. I modified the two VI's given to me (one spits data in an array with up to 100 points per cycle and one reads data one by one, up to 14 bytes). My coding modifications is good i think, as people here who know more about Labview than i ...

Read Input Data Problem
Hello, I have a data file with 2 rows, the first one should be the time vector. When I want to read this in scicos by using the "read input data"-block, scicos only takes the first row as block output and ignores the second row. Does anyone know, what the problem is? Thanks Shaun Ryder wrote: > Hello, > > I have a data file with 2 rows, the first one should be the time > vector. When I want to read this in scicos by using the "read input > data"-block, scicos only takes the first row as block output and > ignores the second row. Does anyone know, what the problem is? > If you have two signals in a file, they should be in column format. The file is read line after line so you cannot read all the time instants before even starting to read the first value of your signal. Cheers Ramine ...

How to synchronize counters and analog input
Hello! This is my first post and I am still trying to familiarize myself Labview. I have an application in which I am reading the velocity of two rotating shafts and an analog input simultaneously. The intent is to execute this VI in a test vehicle. The users will be able to view the waveform chart data and can then choose to record the data. I am using a DaqCard 6036E PCMCIA card with a SC-2345 signal conditioning board.   All three channels are declared in MAX as NI-DAQmx globals. The two counter channels will display and update correctly, but I cannot seem to get the an...

Digital versus analog input
Many LCD monitors have both analog D-SUB and digital DVI input ports. Is the image quality any better with digital input? Hamad bin Turki Salami wrote: >Many LCD monitors have both analog D-SUB and >digital DVI input ports. Is the image quality >any better with digital input? You really think your the first person to ask this question? Try google. "Hamad bin Turki Salami" <HamTurkiSalami@Spam.aol.hotnet.ibm.net> wrote in message news:pan.2005.11.16.07.34.01.110307@Spam.aol.hotnet.ibm.net... > Many LCD monitors have both analog D-SUB and > digital DVI...

serial port reading the data but not displaying the read data in MATLAB
Scenario: i am currently doing a project on transmission of digital video images using matlab. what i need to do is to transmit the image data through the serial port of the computer. i have decompsed the image into individual pixels and i have written a matlab program for trnasmitting the image data. till this point i was sucessful. problem: my radio transmitter which connected to the serial port of the computer is transmitting the data the radio receiver connected to the serial of the another computer and is controlled by MATLAB. though my radio receiver is receiving the data matlab is reading the data but is not displaying the 'READ DATA' through the serial port. i am using the fscanf(obj) function for reading the data of the serial port. and can anyone tell me what is the purpose of 'terminator' is matlab. can anyone solve the problem. and please reply as soon as possible Raghu, The terminator is used to indicate the end of an ASCII string. Basically, FSCANF looks for the terminator to tell it when it has received a complete string and can attempt to process it. I suspect that you are sending binary data over the serial port. If so, it would be better to use the FREAD command. -Dave Tarkowski On Wed, 21 Apr 2004 01:41:31 +0000 (UTC), Raghu Nandan wrote: > > Scenario: i am currently doing a project on transmission of digital > video images using matlab. what i need to do is to transmit the image > data through the serial port of t...

Reading Analog input from IDL
Any suggestions how to access live analog signals from IDL? I'm thinking of buying an NI-USB-6210 or similar, but how do I read the signals (through a library in a DLL I guess -- I have very little experience in doing this from IDL)? Any limitations on version (I'm running IDL 6.4, but I can upgrade if necessary) Other suggestions for hardware are also welcome. Requirements: must run on Windows XP, USB connection, resolution>=12 bit , sample rate ~100 samples/s, +- 1 V range, price preferred less than 1000 Euro Thanks Stefan You will almost certainly need to write a DLM to interface the vendor-suppl= ied libraries to IDL. Writing a DLM can be a bit daunting, but is explained= really well in Ronn Kling's book. You don't need the latest version of IDL= for the DLM, but the DLM you write needs to be compiled for the specific v= ersion of IDL being used. You can compile DLMs using the free version of Mi= crosoft Visual Studio. I've written code for the DataTranslation ADC units (which more than meet y= our requirements), but their SDK is a bit complicated because they use the = same framework to support a wide range of products. I don't know if the NI = SDK is better or worse for integration into a DLM, but their main advantage= is the Labview interface. Good luck- On Friday, November 2, 2012 2:23:34 AM UTC-6, Stefan Fuglsang wrote: > Any suggestions how to access live analog signals from IDL? >=20 > I&...

Synchronizing analog and digital i/o
We're using LabView 6.0 and a PCI-MIO-16E-4 to run our electrophysiology experiments, and have a moderately tricky set of requirements. What we have so far: four analog inputs and two analog outputs to monitor and control two recording electrodes. We need tight synchronization (within << 1 msec) between input and output so that we can properly correlate the timing of responses with the timing of stimuli during each presentation (which are no more than a few seconds long). We do this by using the Clock Config AIs to have our output side set the scan clock (via the AO update signal ...

Data Acquisition Digital Input
Hello, I want to use the analog and digital inputs from my NIDAQ-card simultaneously. But I don't find any function like "getdata" (which is for analoginput) for digital-input. I need the digitalsignal as continuous as the analogsignal. Do anybody know how I can manage it? Thank you very much. Andrea Hi there, Currently, Data Acquisition Toolbox only supports static digital I/O using PUTVALUE and GETVALUE. There is no mechanism for accessing hardware clocked digital IO. All the best, -Rob -- ----- Rob Purser Senior Team Lead, Connectivity Products The MathWorks rob.pu...

Digital versus analog input
Many LCD monitors have both analog D-SUB and digital DVI input ports. Is the image quality any better with digital input? Hamad bin Turki Salami wrote: >Many LCD monitors have both analog D-SUB and >digital DVI input ports. Is the image quality >any better with digital input? You really think your the first person to ask this question? Try google. "Hamad bin Turki Salami" <HamTurkiSalami@Spam.aol.hotnet.ibm.net> wrote in message news:pan.2005.11.16.07.34.01.110307@Spam.aol.hotnet.ibm.net... > Many LCD monitors have both analog D-SUB and > digital DVI...

Method to record "Time wave form and FFT graph result data" of analog input voltage signal (It is input for 100 seconds) in the Excel form file.
Please teach the method of recording "Time wave form and FFT graph result data (Every time)" of the analog input voltage signal (It is input for 100 seconds) in the Excel form file. &nbsp; Vi in the stage is appended while I do the programming. &nbsp; waveform&FFT.vi: http://forums.ni.com/attachments/ni/170/162010/1/waveform&FFT.vi Please teach the method of recording "Time-domain wave form and FFT power spectrum graph result data (Every time)" of the analog input voltage signal (It is input for 100 seconds) in the Excel form file. &nbsp; Vi in the stage is appended while I do the programming. &nbsp; waveform&FFT.vi: http://forums.ni.com/attachments/ni/170/162012/1/waveform&FFT.vi If you are looking at saving the value part ( Y and maginitue arrays)&nbsp;of waveform and power spectrum, here is a simple way to do it. Just extract the values from both clusters and write to a file Look at attached VI Regards Dev &nbsp; waveform&FFT_mod.vi: http://forums.ni.com/attachments/ni/170/162015/1/waveform&FFT_mod.vi Thank you very much but, my labVIEW version is 6.1.&nbsp; &nbsp; So,If you can, please send the sample of 6.1 version&nbsp;,or,&nbsp;&nbsp;block diagram&nbsp;picture. &nbsp; I'm&nbsp;college student. Now,I use labVIEW for my reserch. Thank you very much for your kindness. &nbsp; Hi, since i do not have LabVIEW6.1, I am&nbsp;sending a pic of block di...

Can I use LabVIEW to load data directly into system memory? The serial card I'm using isn't supported by NI nor does VISA recognize it. I'm using a Win32 function to read the data from the card
Can I use LabVIEW to load data directly into system memory from a VI? The serial card I'm using isn't supported by NI nor does VISA recognize it. I'm using a&nbsp;Call Library&nbsp;function to read the data from the card and now I want it to go directly to system memory. The data is being received at 1Mbps. &nbsp; Thanks 1.You will most likely crash your system trying to write meg's/sec of data to system memory. LabVIEW has it's own memory manager and manages data for you. If you getting data to LabVIEW, I hope for the processinfg purposes. You didn't menti...

input statement reading past data
Hi, Could someone explain why the following does not create a data set with one observation and two variables? (mm should have date format); data abc; input yy mm date10.; cards; 1999 01/01/1999 run; I usually don't remember all of the date formats, but I don't ever recall using a date10. These are define by SAS not the user. I often use date9., but I think the following code will get you on track with this sample. Then look up SAS date time formats on the SAS site and try using them and study the results (and/or warnings, etc.) data abc; format mm mmddyy10.; input yy mm anyd...

READS: End of input data encountered
Hy, i try to read data form an ASCII-File and get always the same error. if i use READF, i get "end of file encountered" and READS returns "End of input data ..." PRO Getdata,start_time,end_time Dir = 'C:\Dokumente und Einstellungen\luchs\Desktop\' file=Dir + '2011-04-22.txt' n = file_lines(file) - 1 print,n data=replicate({TempK,Setp:0.0,A:0.0,B: 0.0,C1:0.0,C2:0.0,C3:0.0,C4:0.0,D1:0.0,D2:0.0,D3:0.0,D4:0.0,TCool: 0.0,HT:0.0,AH:0.0},n) time = timestamputc(1970,1,1,0,0,0) filename = FILE_BASENAME(file,'.txt') reads,filename,format=&...

How do I read a digital encoder in Labview 7?
Hello - I have a digital MR encoder (line driver) and I need to hook up one channel, as well as an index channel. How do I read this information with Labview 7? NewMachine, It depends on the type of DAQ board you are using. We have many examples online that show how to use encoders. Simply go to: http://www.ni.com/devzone/dev_exchange/ex_search.htm and enter "encoder" as the search string and LabVIEW as the software. You can leave everything else default. There are also several encoder tutorials in the Developer Zone to help explain the theory if you are looking for additional inf...

synchronization analogue input and digital output
Hello Everybody, &nbsp; I am using labview 8.0 with a ni 6229 M serires card on Win XP. I woiuld like to aquire a signal which is a sine wave, using an AI port. Thereafter I would like to send a pulse train (TTL)&nbsp;at specefic phases of the sine wave using the digital counter. I would&nbsp;also like&nbsp;to be able to select every nth point in the same phase. i.e trigger every third peak for example. I am competent in AI aquisition&nbsp;and digital generation but would like to see how to combine them ? I have attached an example code I found which i think will do what i ...

how to read long[] from data input stream ?
I am looking for ways to read data into a long array from data input stream directly. I feel that wrapping Fileinputstream using DataInputStream filter is kinda inefficient, if there is a way to let the datainputstream to arrange 8 bytes into a long directly, it wouild be really nice. Any suggestions on how to realize this? Thanks, Jimmy Jimmy Zhang: >I am looking for ways to read data into a long array from data input stream >directly. I feel that wrapping Fileinputstream >using DataInputStream filter is kinda inefficient, if there is a way to let >the datainputstream to arr...

digital IO and analog input ports
I'm working on an i486-based SBC (the TS-5500 from Technologic Systems). It has on-board digital IO and analog input ports; 38 digital IO (programmable as input or output in groups of 4), and an 8-channel, 12 bit A/D converter. The company suggests just accessing them directly from user-level applications. Being a little hardcore about wanting to control devices with real device drivers, I've set out to write a couple of drivers. But... before I invest too much time in this, has somebody done similar drivers? I'd prefer to use something already out there as a mode...

reading an array of parallel input data
Hi, Thanks first of all for the previous responses that have been of great help to me. I have to write another test bench for a unit that takes on 8 inputs (each of 10 bits)parallely. There will be an array of minimum of 1024 such elements(integer number of 1024 in general) in the data file. What should be the format of the data file and how should be the reading operation in VHDL. It's similar to corner memory where we input data horizontally and read out vertically. thanks. On Thu, 19 Jun 2008 03:05:15 -0700 (PDT), koyel.aphy@gmail.com wrote: >I have to write another test bench for a unit that takes on 8 inputs >(each of 10 bits)parallely. There will be an array of minimum of 1024 >such elements(integer number of 1024 in general) in the data file. >What should be the format of the data file and how should be the >reading operation in VHDL. Choose a format that's easy to handle with VHDL's rather limited string functions, but also can be easily manipulated by external software. Comma-separated values (CSV) are a good choice, since they are fairly easy to handle in VHDL but also work nicely with spreadsheets and other programs - and they're human-readable. Since your data are only 10 bits wide, it seems natural to represent them as simple (decimal) integers. Each line of your CSV file then looks like 25,1021,42,0,1000,58,1,76 You can simply work through the input file in VHDL until you reach end-of-file. It will also be OK if you ...

Web resources about - reading analog input and synchronize it with digital data - comp.lang.labview

synchronize on the App Store on iTunes
Get synchronize on the App Store. See screenshots and ratings, and read customer reviews.

How to synchronize metronomes - YouTube
This video shows how you can synchronize a set of oscillators (e.g., metronomes, pendulum clocks, etc) by coupling them together. At the very ...

China to synchronize trade growth, economic expansion
China to synchronize trade growth, economic expansion People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, Apr, May, Jun, Jul, ...

Jailbreak Only: CloudPaste - Synchronize Your Clipboard Between All Your Apple Devices
CloudPaste is a new jailbreak tweak and service that allows users to sync their clipboard between Apple devices, including iOS devices and Mac ...

Synchronize media players for group viewing with Syncplay
Syncplay is a free tool which syncs media players over the web, allowing a scattered group of friends to watch videos together. To get started ...

Synchronize Google Calendar With Outlook
... and delete a remote iCalendar. This open-source has added support for Google Calendars, and except for some limitations, you can now synchronize ...

Professors' proposed calendar synchronizes dates with days
Two professors at Johns Hopkins University are proposing a new, universal calendar in which each day falls on the same date every year.

Sophos Synchronizes Security With Security Heartbeat
New firewall technology and endpoint software debut to provide better visibility and control for security risk.

Force Feeding At Gitmo Will ‘Synchronize’ With Ramadan
... have yet to be charged with a crime, will continue to be force fed during Ramadan. And here’s the humane part, the force feeding will be synchronized ...

Judge Koh denies Apple's request to synchronize dissolution of existing and grant of new injunction
... Samsung's request for an expedited schedule for its dissolution request. Apart from that, she doesn't believe that Apple is entitled to synchronized ...

Resources last updated: 3/17/2016 4:53:45 PM