NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending a Serial data packet to microcontroller

Hi All,

I am a beginner in teststand, I am trying to send a packet of serial data to microcontroller which contain a special character %.  

 

Below concatenate the data packets in to the variable usart_cmd

Trial 1) Locals.usart_cmd="\%//:"+FileGlobals.CurrentTest.TestNo+"\%i//"+FileGlobals.CurrentTest.host_client+"$0D"+"$0A"

Trial 2) Locals.usart_cmd="%%:"+FileGlobals.CurrentTest.TestNo+"%%i"+FileGlobals.CurrentTest.host_client+"$0D"+"$0A"

Trial 3) Locals.usart_cmd="$25:"+FileGlobals.CurrentTest.TestNo+"$25i"+FileGlobals.CurrentTest.host_client+"$0D"+"$0A"

 

The microcontroller receives all the data(TestNo,host_client), but instead of the % symbol its receives a null. I have tried with above mentioned trials but no success. Please let me if required more details.

 

Any Help would be much appreciated 

0 Kudos
Message 1 of 2
(891 Views)

Hi All,

 

This issue got resolved, thanks a lot for the support

 

Thomas.

 

 

0 Kudos
Message 2 of 2
(833 Views)