[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get serial data from USB using instrument control
From: |
Andrius Sutas |
Subject: |
Re: How to get serial data from USB using instrument control |
Date: |
Thu, 25 Oct 2012 00:54:46 +0100 |
You are getting exactly what you are sending.
In your case, a string "1\r\n", which translates to 49, 13, 10 in ascii. "1" is 49 in ascii, "\n" is a newline (ascii 10), in you screenshot, you get "1" per line, and not a line of 1s, "\r" (ascii 13) is carriage return, in you screenshot, see how 1's are aligned to the left? without \r they would be in new line by one space to right making "steps of 1".
Again, use char(srl_read(s, 3)) if you want strings and not bytes without any modification to sender.
- How to get serial data from USB using instrument control, jd, 2012/10/21
- Re: How to get serial data from USB using instrument control, Juan Pablo Carbajal, 2012/10/21
- Re: How to get serial data from USB using instrument control, jd, 2012/10/22
- Re: How to get serial data from USB using instrument control, Juan Pablo Carbajal, 2012/10/23
- Re: How to get serial data from USB using instrument control, jd, 2012/10/23
- Re: How to get serial data from USB using instrument control, Juan Pablo Carbajal, 2012/10/24
- Re: How to get serial data from USB using instrument control, Juan Pablo Carbajal, 2012/10/24
- Re: How to get serial data from USB using instrument control, Andrius Sutas, 2012/10/24
- Re: How to get serial data from USB using instrument control, jd, 2012/10/24
- Re: How to get serial data from USB using instrument control,
Andrius Sutas <=
- Re: How to get serial data from USB using instrument control, jd, 2012/10/24
- Re: How to get serial data from USB using instrument control, Juan Pablo Carbajal, 2012/10/25