Home > Net >  C # serial communication
C # serial communication

Time:09-21

Existing 3 command needs to be sent to the serial port, to send the first command, first get the right data, then send the second command, get the second command response after the correct data, then send the third command, why we read the second and three data is wrong,
What a great god can solve the

CodePudding user response:

I use a timer to send

CodePudding user response:

As long as it is communication should avoid to use the timer before this stuff because you don't know whether to send the past whether a data parsing success should use the way of checking receipt when the first data is accepted and parse out receipt received a message said after receiving the receipt information then send the second data

CodePudding user response:

Description is too vague

In general, it is wrong to your second order data,
Before reading a drive's encoder values, is the need to send several commands that there will be no problem, you said
As well as mentioned above, the first time you want to make sure the data is right

CodePudding user response:

The
reference 3 floor jimmy212 response:
description is too vague

In general, it is wrong to your second order data,
Before reading a drive's encoder values, is the need to send several commands that there will be no problem, you said
As well as mentioned above, the first time you want to make sure the data is right



I take one of these commands to send separately, there is no problem, together, there is chaos to wear

CodePudding user response:

reference weave, 4/f, Chen Chen reply:
Quote: refer to the third floor jimmy212 response:

Description is too vague

In general, it is wrong to your second order data,
Before reading a drive's encoder values, is the need to send several commands that there will be no problem, you said
As well as mentioned above, the first time you want to make sure the data is right



I take one of these commands to send separately, there is no problem, together there is chaos in the



Is get the correct data for the first time, if it isn't sure he would not send the second, now is the time to send the second and the third command, the data is random

CodePudding user response:

refer to the second floor groveer response:
as long as it is communication should avoid to use the timer before this stuff because you don't know whether to send the past whether a data parsing success should use the way of checking receipt when the first data is accepted and parse out receipt received a message said after receiving the receipt information then send the second data




This program I can't, because to read data 10 times

CodePudding user response:

refer to 6th floor woven Chen Chen reply:
Quote: refer to the second floor groveer response:

As long as it is communication should avoid to use the timer before this stuff because you don't know whether to send the past whether a data parsing success should use the way of checking receipt when the first data is accepted and parse out receipt received a message said after receiving the receipt information then send the second data




This program I can't, because must read 10 times data

Don't understand why can't a serial port communication is not secure so we need to add so many check feedback regardless if it is tough to send data to each other ever received this not may be a problem but it would definitely be a problem just like UDP communication sent whether feedback so other received to also don't know the final result may be all data string bag bag of joint is normal if you want to make sure the data correct analysis must be combined with checking feedback information

CodePudding user response:

Your serial communication is not just your PC will do you need to make good with lower machine developers to communicate agreement rather than he gave you what is what if cooperation is the tacit understanding to your agreement will have the information don't need you tube

CodePudding user response:

refer to 7th floor groveer response:
Quote: refer to the sixth floor woven Chen Chen reply:

Quote: refer to the second floor groveer response:

As long as it is communication should avoid to use the timer before this stuff because you don't know whether to send the past whether a data parsing success should use the way of checking receipt when the first data is accepted and parse out receipt received a message said after receiving the receipt information then send the second data




This program I can't, because must read 10 times data

Don't understand why can't a serial port communication is not secure so we need to add so many check feedback regardless if it is tough to send data to each other ever received this not may be a problem but it would definitely be a problem just like UDP communication sent whether feedback so other received to also don't know the final result may be all data string bag bag of joint is normal if you want to make sure the data correct analysis must be combined with checking feedback



I have tube he accepts data, is equivalent to the question and answer, but he a command didn't accord with the requirement of me I will not then go down, and so on, but when the second command to send receive data were mixed

CodePudding user response:

reference weave, 9/f, Chen Chen reply:
Quote: refer to 7th floor groveer response:

Quote: refer to the sixth floor woven Chen Chen reply:

Quote: refer to the second floor groveer response:

As long as it is communication should avoid to use the timer before this stuff because you don't know whether to send the past whether a data parsing success should use the way of checking receipt when the first data is accepted and parse out receipt received a message said after receiving the receipt information then send the second data




This program I can't, because must read 10 times data

Don't understand why can't a serial port communication is not secure so we need to add so many check feedback regardless if it is tough to send data to each other ever received this not may be a problem but it would definitely be a problem just like UDP communication sent whether feedback so other received to also don't know the final result may be all data string bag bag of joint is normal if you want to make sure the data correct analysis must be combined with checking feedback



I have tube he accepts data, is equivalent to the question and answer, but he a command didn't accord with the requirement of me I will not then go down, and so on, but in the second command to send the accepted data were mixed

Doesn't conform to the requirements of the data is feedback to let the other side to send to the other party if the other party no matter your feedback so that the feedback is good?

CodePudding user response:






references to the tenth floor groveer response:
Quote: refer to weave, 9/f, Chen Chen reply:

Quote: refer to 7th floor groveer response:

Quote: refer to the sixth floor woven Chen Chen reply:

Quote: refer to the second floor groveer response:

As long as it is communication should avoid to use the timer before this stuff because you don't know whether to send the past whether a data parsing success should use the way of checking receipt when the first data is accepted and parse out receipt received a message said after receiving the receipt information then send the second data




This program I can't, because must read 10 times data

Don't understand why can't a serial port communication is not secure so we need to add so many check feedback regardless if it is tough to send data to each other ever received this not may be a problem but it would definitely be a problem just like UDP communication sent whether feedback so other received to also don't know the final result may be all data string bag bag of joint is normal if you want to make sure the data correct analysis must be combined with checking feedback



I have tube he accepts data, is equivalent to the question and answer, but he a command didn't accord with the requirement of me I will not then go down, and so on, but in the second command to send the accepted data were mixed

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  •  Tags:  
  • C#
  • Related