help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: instrument-control


From: Juan Pablo Carbajal
Subject: Re: instrument-control
Date: Sun, 13 Jan 2013 12:54:39 +0100

On Sun, Jan 13, 2013 at 1:35 AM, kees <address@hidden> wrote:
> I have trouble writing to the serial port with the "srl_write(port, data)"
> function.
> The data that the the write function accepts or transmit is in ascii format
> however the instrument that I would like to communicate with accept only
> byte values from 0-to-255.
>
> For instance to put the analyzer in remote control I have to send a byte
> with the value of 69. If I send the character "E" it will go in the remote
> mode. However if I send the value 69 the two byte values 54 and 57. Or when
> I communicate in "cute-com" I can send the hexadecimal value of 0x45 and
> that works too.
>
> So my question is how do I use the srl_write function to send byte values to
> the analyzer?
>
> Kees Blom
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave

If I understood correctly you already know the answer.
If you want to send the byte "69" you can use the command

srl_write(port, char(69))

You could write a small wrapper function srl_writebyte if the char
thingy bothers you too much.

Hope this helps

Cheers


reply via email to

[Prev in Thread] Current Thread [Next in Thread]