Subject: Nidaq Scanning into a 2D wave
In-Reply-To: <AM4PR0601MB2068C52E80D829AF669059F696BE0@AM4PR0601MB2068.eurprd06.prod.outlook.com>
References: <AM4PR0601MB2068C52E80D829AF669059F696BE0@AM4PR0601MB2068.eurprd06.prod.outlook.com>
Message-ID: <73D9AF7A-DCF1-48CE-934C-5E3D809F8F6F@wavemetrics.com>
Nick has run into a new feature of NIDAQ Tools MX 1.1 (the version where 64-bit support was added). It is now possible to scan into columns of a multi-column wave, with a column for each channel. Seemed like an obvious enhancement...
My suggestion to him was to "fool" DAQmx_Scan by redimensioning the wave to 1D very briefly, just long enough for DAQmx_Scan to be happy with the wave:
Redimension/N=(rows*cols) theWave
DAQmx_Scan ... // doing a background scan
Redimension/N=(rows, cols) theWave
Since it is running in a function, nobody but DAQmx_Scan notices that the wave was 1D for a short period.
Conceivably, I should add some option to make this kludge unnecessary, but this isn't too bad as kludges go :)
Regards,
John Weeks
WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
email support at WaveMetrics.com
> On Sep 2, 2019, at 7:01 AM, Hartell, Nick (Prof.) <nh88 at leicester.ac.uk> wrote:
>
> Hello List,
> I am trying to troubleshoot a problem that has mysteriously appeared in my code. I wonder (perhaps optimistically) if there is a change in behavior in either igor 7 or nidaq tools. I am using the latest version of both as far as I am aware on Windows 7, all 64 bit.
>
> I am scanning using nidaqmx. I have in past been sending the input data into 2D waves (i.e. 100 x 100) that are images. For some reason that I can't get to the bottom of, this no longer seems to work and only the first column of the wave receives information. The other columns are unchanged. If i scan the data into a 1D wave of the correct size (10000) and then redimension it to 100 x 100, then the image is fine.
>
> What I am struggling with is that this code used to work and I can't work out if this is something that I have inadvertently done or if Igor has changed in properties and through some update I have encountered this issue. It is much easier for me to collect data into a 2D wave if possible so would like to continue doing this if I can.
>
> Hope someone can shed light on this.
> Thanks
> B
> Nick
>
>
> Nicholas A. Hartell, Ph.D.
>
> Professor of Neuroscience
>
> Department of Cell Physiology and Pharmacology,
>
> Medical Sciences Building,
>
> University of Leicester.
>
> University Road, Tel: 0116 252 3301 (Office)
>
> PO Box 138, Tel: 0116 252 5675 (Lab)
>
> Leicester, Fax: 0116 252 5045
>
> LE1 9HN. email: nh88 at leicester.ac.uk<https://securewebmail.le.ac.uk/owa/redir.aspx?C=eb40ad2d61b94ab1be675ef17d30698a&URL=mailto%3anh88%40leicester.ac.uk>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://info-igor.org/attachments/20190902/31f791cd/attachment.html>
> _______________________________________________
> Info-igor mailing list
> Info-igor at lists.info-igor.org
> http://lists.info-igor.org/listinfo.cgi/info-igor-info-igor.org