[scilab-Users] RE: instrument measurments

Charles Warner cwarner.cw711 at gmail.com
Mon Feb 27 18:50:38 CET 2012


Linux is easier for me.  This happens to be very similar to a project I am
working on, except I am using a usb port with a Metrix meter.  I suspect
usb (or, even better, RS232) would be easier than ethernet.

The reason Linux is easier than Windows is that Linux sees everything as a
file.  To read from and write to a port is the same thing as reading from
and writing to a file.

The first thing to do is identify the address of the Anritsu meter.  For my
usb port, it is /dev/ttyUSB0.  I am not all that familiar with ethernet
ports, but I suspect you will have something in your /dev folder that looks
like "eth0".  I suspect the Anritsu meter may have a built-in address, but
you will have to consult the Anritsu documentation to determine this.  This
could get complicated if you have the Anritsu plugged in to an ethernet
with multiple devices on it- you still need to get the address.  For usb
this is pretty easy- lsusb from the command line, or simply open the /dev
folder and unplug the device (the port goes away) and plug it back in (the
port reappears).

SCPI typically exchanges ASCII strings- send a command to the device and
receive a string in response.  You will need to know the commands required
by the Anritsu meter.  You will need to know something about the format of
the response string- number of characters, any terminal characters (like a
line feed) that can identify the end of the response string.

Once you have this information, start with the command line.  Something
like "echo R > /dev/ethO" might work out of the box, but you have to insure
that you have read/write permission with the dev in question.

Once you start getting information from the command line, you know you have
good communications with the instrument, and you can write a script in
Scilab that will record the readings.  However, you will have to parse the
readings and convert to numerical format before you can use the readings
for something like plotting...

This is just a rough outline on how to get data from an instrument.
 Unfortunately "Standards" are anything but standard.

On Mon, Feb 27, 2012 at 12:17 PM, computidoo <ychattah at iai.co.il> wrote:

>  I'm flexible windows or Linux(red hat)****
>
> ** **
>  ------------------------------
>
> *From:* Charles Warner [via Scilab / Xcos - Mailing Lists Archives]
> [mailto:ml-node+[hidden email]<http://user/SendEmail.jtp?type=node&node=3781406&i=0>]
>
> *Sent:* Monday, February 27, 2012 7:15 PM
> *To:* Yehonatan Chattah
> *Subject:* Re: instrument measurments****
>
> ** **
>
> What operating system are you using?****
>
> ** **
>
> Charlie****
>
> On Mon, Feb 27, 2012 at 12:00 PM, computidoo <[hidden email]<http://user/SendEmail.jtp?type=node&node=3781401&i=0>>
> wrote:****
>
> hello,
> I want to connect the scilab to control instrument measurments that have
> LAN
> connection and can work in SCPI commands format (anritsu).
> can someone help me where to start?
> BR
> computidoo
>
> --
> View this message in context:
> http://mailinglists.scilab.org/instrument-measurments-tp3781355p3781355.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive
> at Nabble.com.
>
> --
> To unsubscribe from this mailing-list, please send an empty mail to
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3781401&i=1>
>
> To check the archives of this mailing list, see
> http://mailinglists.scilab.org/
>
> ****
>
>  ** **
>
> ** **
>  ------------------------------
>
> *If you reply to this email, your message will be added to the discussion
> below:*
>
>
> http://mailinglists.scilab.org/instrument-measurments-tp3781355p3781401.html
> ****
>
> To unsubscribe from instrument measurments, click here.
> NAML<http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
> ****
>
> ***********************************************************************************************
>  * Please consider the environment before printing this email *
>  The information contained in this communication is proprietary to Israel
> Aerospace Industries Ltd. and/or third parties, may contain confidential or
> privileged information, and is intended only for the use of the intended
> addressee thereof.
> If you are not the intended addressee, please be aware that any use,
> disclosure, distribution and/or copying of this communication is strictly
> prohibited. If you receive this communication in error, please notify the
> sender immediately and delete it from your computer.
> Thank you.
>
> ------------------------------
> View this message in context: RE: instrument measurments<http://mailinglists.scilab.org/instrument-measurments-tp3781355p3781406.html>
>
> Sent from the Scilab users - Mailing Lists Archives mailing list archive<http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html>at Nabble.com.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20120227/fe1631f0/attachment.htm>


More information about the users mailing list