07-14-2020 10:10 PM
Hi all
I want to communicated with Serial Port Send command and get right as below snapshots:
1) I used to Serial_assist Tools when power on get initial message from product and send"AT+SELFTEST=TEST" get right code.
How to use labview set up serial port ignored first time initial message and send"AT+SELFTEST=TEST" get right code.
07-15-2020 02:06 AM
Hi Sam,
two notes:
@Sam.Huang wrote:
How to use labview set up serial port ignored first time initial message and send"AT+SELFTEST=TEST" get right code.
Setup the port, send your command and receive the answer - without local variables and without BytesAtPort!
07-15-2020 02:33 AM
Hi GerdW
Thank you for you reply,I changed it as you mention get as before,if other need to setup it,thanks!!
07-15-2020 03:06 AM
Hi Sam,
no need for that wait function, the VISARead will wait for 512 bytes (or TermChar) anyways!
Do you have a manual of your device describing the comm protocol? You need to follow the guidelines written in there like:
Read the details in your manual!
07-15-2020 03:20 AM
Hi GerdW
It's a earbuds product,client provide baudrate and cmmand"AT+SELFTEST=TEST",then back command as“;g-sensor:OK;P-sensor:FAIL;PPG:FAIL;has_dc:OK”.
The problem is when power on with the earbuds,will out a initial message,first time send command and get wrong measage, hold on power send command again will get right meassage.
I think that if ignored inital message and clear it then send command will get right code,but I don't how to configured it,could you give a idea for this,thanks!!
07-15-2020 04:00 AM
Hi Sam,
@Sam.Huang wrote:
I think that if ignored inital message and clear it then send command will get right code,but I don't how to configured it,could you give a idea for this,thanks!!
Read the initial message, then send the command and read its response.
So you need VISARead (maybe with timeout error handling), VISAWrite, VISARead…