[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parity in Instrument-control not working
From: |
Andreas Weber |
Subject: |
Re: Parity in Instrument-control not working |
Date: |
Sat, 21 Jan 2017 16:32:05 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.3.0 |
Am 21.01.2017 um 06:37 schrieb prasadm:
> I am using octave 4.2 with instrument-control package (0.2.3). While setting
> the parity, I use the following command in my script:
> *set(s1,"parity",none) *
> which produces
> error: 'None' undefined near line 14 column 17
You have to use a string:
set (s1, "parity", "none");
See here:
octave:4> s = serial ("/dev/ttyS0", 115200)
s =
Serial Port Object
open: 1
port: /dev/ttyS0
baudrate: 115200
parity: None
bytesize: 8
stopbits: 1
timeout: -1
octave:5> set (s, "parity", "o")
octave:6> s
s =
Serial Port Object
open: 1
port: /dev/ttyS0
baudrate: 115200
parity: Odd
bytesize: 8
stopbits: 1
timeout: -1
octave:7> set (s, "parity", "n")
octave:8> s
s =
Serial Port Object
open: 1
port: /dev/ttyS0
baudrate: 115200
parity: None
bytesize: 8
stopbits: 1
timeout: -1
-- Andy