Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous Serial Write and Read

Solved!
Go to solution

Hi all,

I'm running the example Continuous Serial Write and Read.vi in National Instruments\LabVIEW 2021\examples\Instrument IO\Serial. But i don't know how to pass the string format to command ?? can you help me

kiendo_0-1656388861657.png

 

0 Kudos
Message 1 of 8
(242 Views)

@kiendo wrote:

But i don't know how to pass the string format to command ?? can you help me


What exactly are you trying to send?  You can change the display format of the control to \ Codes or Hex if you need to send non-ASCII characters.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(214 Views)

Thank you,

I run command on Tera Term ok but i don't know how to run on labview (how to pass commands ?)

Example:

I run on Tera Term command:   _ *****[CR[LF]  -> Output:   ******
I run on Labview i convert  _ *****[CR[LF] to ascii but output is not the same as above

Please help me

0 Kudos
Message 3 of 8
(204 Views)

Please send the vi. But first fill in what you want to send in the string an then via edit/make all values default , can be make current values default. And finally save the vi and then send the vi.

You do something wrong with that string and what you typed above is wronv anyway.

 

 

greetings from the Netherlands
0 Kudos
Message 4 of 8
(192 Views)

File .vi I attach below. Please check help me. 

I pass to command 66128531\n -> response same as command but I expect a different response.

I expect response same as response on tera term.

 

 

0 Kudos
Message 5 of 8
(171 Views)

I attach file .vi below.

I pass to command 66128531\n then response same as command but I expect a difference response.

I expect response same as on tera term.

0 Kudos
Message 6 of 8
(177 Views)
Solution
Accepted by topic author kiendo

Hi

I have set the string to display in \ mode to see your escape and also the correct \n

I fact I removed one \ before the n.

You could have used return instead.

 

attached the modified file. 

greetings from the Netherlands
Message 7 of 8
(168 Views)

Great! Thank you so much!

0 Kudos
Message 8 of 8
(164 Views)