LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending character using serial write

Solved!
Go to solution

I am sending a number as a character to a remote device once at a particular time stamp but it is sending twice and that also in parts. I am sending 29, and it sends as 29 and 9. If I send 34, it sends 34 and 4. How can I deal with this situation? Program attached as below.

 

0 Kudos
Message 1 of 10
(3,420 Views)

You are actually sending 2 characters, '2' and '9'.  If you want the quantity to be a single byte, then change that control to be a numeric (U8).  You can then use Type Cast to change it into a string to write to the VISA Write.


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 10
(3,402 Views)

Hi,

It is sending wierd characters, that again in 2 different writes. can you pls suggest?

0 Kudos
Message 3 of 10
(3,387 Views)
Solution
Accepted by sr_murd

You are sending a termination character because you turned on a switch that runs a property node that tells it to send a termination character after a send.

0 Kudos
Message 4 of 10
(3,384 Views)

Sir, how to send without the termination character? Uncheck "End write on termination character" ?

0 Kudos
Message 5 of 10
(3,377 Views)

Yes.  Make that boolean switch false.  Or better yet, just delete that whole section of code.

0 Kudos
Message 6 of 10
(3,357 Views)

And is that also the reason that on sending 29, it sends 29 in one line and then 9 (unwanted) in another line?

0 Kudos
Message 7 of 10
(3,354 Views)

There is no logical reason for it to resend the 2nd character.

 

How do you know it is sending 29 followed by a 9?

 

Your subject is "sending character" which implies you only want to send 1 character.  But are you sure that is what you want to do?  You haven't provided any information about this device or a link to its manual.  Have you read the manual to know exactly what it is expecting in the message?

 

PS:  You don't need any of those constants wired as indices for the Index Array function.  You'll get index 0, 1, 2, .... automatically without wiring them.

 

0 Kudos
Message 8 of 10
(3,347 Views)

I am sending 29 from ESP8266 module (Arduino) to an Ameba RTL8195 module on which there is a PI algorithm for temperature control. The number 29 sent as a character is a set point for temperature. 

While sending the set point from ESP8266 serial monitor (as a char array), there is no problem on the AmebaRTL8195, 29 is received as 29 and algorithm starts to adjust temperature. However, when the same is sent from LabVIEW, the receiver first shows 29 and then 9. The last number 9 overwrites and corrupts the algorithm. 

 

There are 6 measurements being sent by the ameba to esp module which displays accurately on LabVIEW.

0 Kudos
Message 9 of 10
(3,344 Views)

A byte of 9 is a tab character.

 

I don't see anything in the LabVIEW code that would indicate a tab is being sent.

0 Kudos
Message 10 of 10
(3,338 Views)