I'm doing a project that is serial based and has to update a database when a barcode is being read. Which programming language has better tools for working with a MySQl database and Serial communication. I debating right now between python and realbasic.
![]() (Asynchronious) data handling wihtout any protocol is by no means easy. I understand your problem is, that you want to 'chain' request without being willing to wait all the time for the answers. ![]()
Try: In your activate botton collect all your request (in an global array e.g.)
and send the first request only. When DataAvailable receives data it knows that they belong to the first request in that array and can process them accordingly. After that DataAvailable will send the next request from that array und return.
That goes on until all requsts from that array are handled.
Mike
---------------- > RS-232 serial port. I can send commands and receive data alright. But my > problem is trying to interpret the returned data. Since everything is > asynchronous, I'm having trouble matching the output with my input > because everything gets handled in the DataAvailable method.
> So, for example, I have a button that connects to the device and asks
> for the software version of the device and then asks for the device > status. I want to put the 2 results into 2 variables. So in my button's > Activate method, I send the first command and do a 'serial1.XmitWait'. > Then I send the second command. But the output gets picked up by the > DataAvailable method of the serial control. How does it know what to do > with the data? I put it all into a large text field like the Dev. Guide > suggests. But how do I 'parse' it into separate variables?
> Thanks in advance for tips,
> Frank
> --
> -Frank Schima ![]()
> Sent via Deja.com http://www.deja.com/ > Share what you know. Learn what you don't. ![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |