08-27-2018 08:23 AM
Hello everyone,
I'm a beginner in Labview and I need some help for my program.
I have a Spectrum card m2i.6111 that can generate signals on 4 channels. The frequency of my signal is given by my sampling rate and this frequency is common for all channels. I would like for each channel one different sampling rate. I tried to create several sampling rate but there only one clock on the card and the program won't lauch if doing that. I read it's still possible to create a memory buffer to reorganize each set of frequency as I want but I don't understand the whole thing. So if someone could explain it...
Thanks
08-27-2018 09:03 AM
Beginners in LabVIEW should first learn LabVIEW, preferably with relatively simple (and smalll) programs. To tackle a complex, complicated piece of equipment that "might" be capable if you really understand the equipment and really understand LabVIEW should not be attempted without serious knowledge or serious help.
The Forum, of course, is a place to get help, especially so that you can solve your own problems. Just as the Forum is not the place to get Homework Solutions, it is probably not the place to get "commercial" solutions.
Having said that, you might consider posting a PDF of the manual for your Spectrum card. Maybe if we took a look at what is required, and if one of us has experience with what you are trying to do (and it is relatively straight-forward, so even a Beginner could accomplish this), we could make more suggestions.
Bob Schor
08-28-2018 01:28 AM
@katzumaki wrote:
Hello everyone,
I would like for each channel one different sampling rate. I tried to create several sampling rate but there only one clock on the card and the program won't lauch if doing that. I read it's still possible to create a memory buffer to reorganize each set of frequency as I want but I don't understand the whole thing. So if someone could explain it...
Thanks
Usually samplers only have 1 Clock signal, so you'll have to sample all at the highest rate and then decimate accordingly on the other signals.
/Y
08-28-2018 04:53 AM
Thanks for the answers. I'm still learning Labview and I wasn't asking for the complete answer but more for a clue to advance. I tried to decimate my sampling rate but the thing is that I use a case structure (to separate each channel) and all my wires join the same output which result in a conflict. Should I break my loop for something else ? (picture joined)
08-28-2018 05:05 AM
Hi,
you had posted an image of your source code. I assume that the problem is hidden somewhere in one of the other cases.
So please show us all possible cases in your stacked sequence as well as in the case structure. After that the problem gets maybe a little bit clearer.
Further, due to overview problems, I recommend to use flat sequences instead of stacked sequence structure but its your choice 😉
08-28-2018 05:34 AM
Your Picture shows a mismatch between the VI's input cluster and your Clock Settings cluster. They must match (and should be Type Def'd).
/Y
08-28-2018 08:27 AM
The others possibilities in the case structure are the different signals that I generate. For the stacked sequence, it's just a repetition of the case structure 4 times. Thanks for the tip about flat sequence, I will use it next time if I encounter a problem.
Sorry but what do you mean by Def type ?
08-28-2018 09:05 AM
@katzumaki wrote:
For the stacked sequence, it's just a repetition of the case structure 4 times. Thanks for the tip about flat sequence, I will use it next time if I encounter a problem.
I would recommend no sequence. If your Stacked Sequence really is a Case Statement repeated four times, replace it with a For Loop, N=4, use "i" to index the Case Selector.
As for Flat Sequences, in almost every instance (and more are being eliminated as LabVIEW gains new features!), the Principle of Data Flow is all you need to properly sequence functionality. I've seen some use Frames to separate "Initialization" from "Acquisition" from "Closing", but a Free Text Label will do the same thing and won't clutter the Block Diagram as much.
Bottom Line -- learn LabVIEW. Study Good Code (or the LabVIEW Examples).
Bob Schor
08-28-2018 09:54 AM
@katzumaki wrote:
Sorry but what do you mean by Def type ?
R-click the cluster and select "Make Type Def." and use that predefined cluster everywhere instead. That way any change will propagate, and it's the correct way to handle such things.
/Y
08-28-2018 12:17 PM
Disclaimer: I have not looked at images and only skimmed this thread.
If you use a Waveform data type for your acquired signals you can easily use a "resample waveforms" VI to down sample the data and not get tripped up by 2-d arrays.
Ben