Jump to content

Code Synchrnization for multiple readings. Help


Waleed Ali

Recommended Posts

Actually attached file is the developed VI to read and log one analog signal. It reads the signal and log it to TDMS file. The front panel and block diagram are also attached.

Simply, I would like to have help to modify the attached VI to read 5 analog signalsle instead of one separately and with different rate, number of samples and max and minimum as it appears in the front panel controller configration. (To have similar front panel configration merged in one fron pannel for all) and working similtaniously at the same time to quire 5 analog signals

Can any body help me to change the attachment to read 5 signals instead of one at the same time.

I have tried my best to modify it but with no luck.

Link to comment

QUOTE (Waleed Ali @ Jan 27 2009, 05:23 AM)

Actually attached file is the developed VI to read and log one analog signal. It reads the signal and log it to TDMS file. The front panel and block diagram are also attached.

Simply, I would like to have help to modify the attached VI to read 5 analog signalsle instead of one separately and with different rate, number of samples and max and minimum as it appears in the front panel controller configration. (To have similar front panel configration merged in one fron pannel for all) and working similtaniously at the same time to quire 5 analog signals

Can any body help me to change the attachment to read 5 signals instead of one at the same time.

I have tried my best to modify it but with no luck.

just add all physical channels separated by comma.

Link to comment

QUOTE (Dan DeFriese @ Jan 27 2009, 04:19 PM)

just add all physical channels separated by comma.

Thanks fo ryour reply.

actually, this would be finr if i wouldlike to have additional sognals from the same moudule (device) with the same rate.

but, in my case I wfant the signals to be aquired from diffrent NI moudules f sampling rate. For this, sampling rate control need to be avaliable for each signal like the one on the front pannel.

Can we do that.

Thanks

Link to comment

QUOTE (Waleed Ali @ Jan 27 2009, 10:13 AM)

I haven't looked at your code, and I don't know what hardware you are using.

The simplest solution is to take all the readings at the highest rate and decimate the results - though I don't know why it would be important to have less data.

All the DAQ boards I have used are limited in the variety of simultaneous sampling rate by the number of DMA channels, A/D converters and on board clocks. It is probable that to do what you want will require you to purchase multiple DAQ boards and assign the various rate of acquisition

QUOTE (Waleed Ali @ Jan 27 2009, 10:13 AM)

Thanks fo ryour reply.

actually, this would be finr if i wouldlike to have additional sognals from the same moudule (device) with the same rate.

but, in my case I wfant the signals to be aquired from diffrent NI moudules f sampling rate. For this, sampling rate control need to be avaliable for each signal like the one on the front pannel.

Can we do that.

Thanks

I haven't looked at your code yet. But I have some general comments.

You could take all the channels at the highest rate and decimate the data. This is by far the simplest way to get "simultaneous" readings.

You did not share with us exactly what hardware you are using, what voltage ranges they will sample, and the rates needed, so that limits the precision of any responses to your question.

Because taking different rates requires multiple DMA channels, A/D converters, and on board clocks it is likely you will need multiple DAQ modules (you said that is your plan). The boards must have the means to synchronize built in. I am not sure about M Series boards since I haven't done this using them. But with the older E Series you needed to use the RTSI bus, so each DAQ board had to be RTSI capable. Your NI application engineer can help you select proper hardware or comment on the capability of your hardware for the task. NI tech support can also help.

Given proper hardware capability to synchronize (including the chassis carrying the modules), you would set up tasks in the Measurement and Acquisition Explorer (MAX) for each board to do its task - a buffered acquisition, then you would trigger them with the same signal. The clocks are quite good so you can use relative time from that point on. You would get each board working alone then work out the triggering details. LabVIEW works well when you test your small bits of hardware and software as you go along - eating the elephant one bite at a time.

You did not share exactly how "simultaneous" the acquisitions need to be. If you require very tight synchronicity, more than the on board clocks provide, then I don't know enough to help you with that.

Any clock is inaccurate at some level. And, they are imprecise at some level as well. The clocks are only accurate to a point, a fine point, but there is a limit. This is why I say you should trigger all your acquisitions at a particular time and depend on clock accuracy, if that is acceptable. The DAQ hardware was designed to make this simple and effective. Buy DAQ cards with adequate sampling speed for you needs. Buy digital signal processing capability, if that is necessary. When you try to get synchronicity beyond the clock resolution, then you have a much larger task, and it is probably a fool's errand.

Probably more important, the hardwired circuits and wiring will have capacitance, and therefore latencies between signal occurrence and signal acquisition due to propagation time through the circuitry. Managing synchronicity is a tough job, don't over do it is it is not necessary

Mike

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.