Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #14973

Re: Data acquisition

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <nick@dokosmarshall.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.027
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'below)': 0.05; 'script,': 0.07; 'python': 0.08; 'none)': 0.09; '0.0,': 0.16; 'enthought': 0.16; 'ideas?': 0.16; 'nick': 0.16; 'timeout': 0.16; 'windows).': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.16; 'linux': 0.17; 'string,': 0.18; 'header:In-Reply-To:1': 0.22; '(or': 0.23; 'command': 0.24; 'shell': 0.24; 'fine': 0.26; 'windows': 0.26; 'url:mailman': 0.28; 'import': 0.28; 'delay': 0.29; 'print': 0.29; 'script': 0.29; 'cc:addr:python.org': 0.30; 'list': 0.32; 'certainly': 0.32; 'usually': 0.32; 'there': 0.33; 'url:listinfo': 0.33; 'difference': 0.34; 'however,': 0.34; 'trouble': 0.35; 'url:python': 0.36; 'cc:2**1': 0.36; 'skip:i 30': 0.37; 'run': 0.37; 'but': 0.37; 'could': 0.38; 'received:org': 0.38; 'url:org': 0.38; 'subject:: ': 0.39; 'under': 0.39; 'data': 0.39; 'why': 0.39; 'case': 0.39; 'expert': 0.62; 'dear': 0.63; 'reply-to:no real name:2**0': 0.71; 'press': 0.72; 'header:Reply-to:1': 0.84; "skip:' 180": 0.84; 'following.': 0.91; 'subject:Data': 0.93; 'instrument': 0.95
X-Amavis-Alert BAD HEADER SECTION, Duplicate header field: "Cc"
To spintronic <sidorenko.andrey@gmail.com>
From Nick Dokos <nicholas.dokos@hp.com>
Subject Re: Data acquisition
In-Reply-To Message from spintronic <sidorenko.andrey@gmail.com> of "Tue, 25 Oct 2011 08:51:27 PDT." <362e368f-829e-4477-bcfc-c0650d231029@j7g2000yqi.googlegroups.com>
References <362e368f-829e-4477-bcfc-c0650d231029@j7g2000yqi.googlegroups.com>
Organization HPCS
X-Mailer MH-E 8.3; nmh 1.3; GNU Emacs 24.0.90
Date Tue, 25 Oct 2011 12:29:45 -0400
Sender nick@dokosmarshall.org
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To nicholas.dokos@hp.com
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2214.1319560789.27778.python-list@python.org> (permalink)
Lines 47
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1319560789 news.xs4all.nl 6854 [2001:888:2000:d::a6]:45575
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:14973

Show key headers only | View raw


spintronic <sidorenko.andrey@gmail.com> wrote:

> Dear friends,
> 
> I have a trouble with understanding the following. I have a very short
> script (shown below) which works fine if I "run" step by step (or line
> by line) in Python shell (type the first line/command -> press Enter,
> etc.). I can get all numbers (actually, there are no numbers but a
> long string, but this is not a problem) I need from a device:
> 
> '0.3345098119,0.01069121274,0.02111624694,0.03833379529,0.02462816409,0.0774275008,0.06554297421,0.07366750919,0.08122602002,0.004018369318,0.03508462415,0.04829900696,0.06383554085, ...'
> 
> However, when I start very the same list of commands as a script, it
> gives me the following, which is certainly wrong:
> 
> [0.0, 0.0, 0.0, 0.0, 0.0,...]
> 
> Any ideas? Why there is a difference when I run the script or do it
> command by command?
> 
> ===========================
> from visa import *
> 
> mw = instrument("GPIB0::20::INSTR", timeout = None)
> 
> mw.write("*RST")
> mw.write("CALC1:DATA? FDATA")
> 
> a=mw.read()
> 
> print a
> ===========================
> (That is really all!)
> 
> 
> PS In this case I use Python Enthought for Windows, but I am not an
> expert in Windows (I work usually in Linux but now I need to run this
> data acquisition under Windows).
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Shot in the dark: could it be that you have to add delays to give the
instrument time to adjust? When you do it from the python shell, line by
line, there is a long delay between one line and the next.

Nick

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Data acquisition spintronic <sidorenko.andrey@gmail.com> - 2011-10-25 08:51 -0700
  Re: Data acquisition Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-10-25 18:15 +0200
    Re: Data acquisition spintronic <sidorenko.andrey@gmail.com> - 2011-10-25 10:35 -0700
  Re: Data acquisition Nick Dokos <nicholas.dokos@hp.com> - 2011-10-25 12:29 -0400
    Re: Data acquisition spintronic <sidorenko.andrey@gmail.com> - 2011-10-25 10:22 -0700
      Re: Data acquisition Dietmar Schwertberger <news@schwertberger.de> - 2011-10-25 23:31 +0200
  Re: Data acquisition John Gordon <gordon@panix.com> - 2011-10-25 16:43 +0000
    Re: Data acquisition spintronic <sidorenko.andrey@gmail.com> - 2011-10-25 10:31 -0700
      Re: Data acquisition John Gordon <gordon@panix.com> - 2011-10-25 18:34 +0000
  Re: Data acquisition "Paul Simon" <psimon@sonic.net> - 2011-10-25 15:06 -0700
  Re: Data acquisition Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-10-25 17:08 -0700
  Re: Data acquisition spintronic <sidorenko.andrey@gmail.com> - 2011-10-26 08:58 -0700
    Re: Data acquisition Dietmar Schwertberger <news@schwertberger.de> - 2011-10-26 19:35 +0200

csiph-web