![]() ![]() If you are looking to use just 5 bit you will need to use bitwise manipulation for you Input and Output strings. This is the string character that is read when the MScomm object cannot interpret the data. The ? value is recieved because(I'm assuming you are trying to recieve '11111')the default ParityReplace property for the MScomm object is the '?'. The problem with this is that some of the data was trimed(00110001 is replaced with 00010001) and the MScomm object puts this data into a Byte array containing the value 11 which is the Hex value for 00010001 which is the trimed value. ![]() The data is then pulled from the input property in an array of Bytes. The same thing applies to the input property in the reverse order. This is what you are actually sending out of the port. The MScomm object pads this data to make it a full byte which then amounts to 00010001. When you set the Data bits for the MScomm object to 5 you are actually putting 10001 in the output property. For example if you send a 1 (which is type string) to the MScomm.output property it gets converted from the ASCII code for the String "1" which is 49 Decimal, 31 Hex or 00110001 binary by VB. When you set the MScomm Object to Binary it tranmits and recieves data as type Byte this implies 8 bits of data. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |