 |
|
|
Topic: Sending "Carriage Return" with Scomm32
|
By: Guest | Posted on: May 12 2017 at 08:11:05 AM | Hi,
I am currently trying to communicate with a multimeter using Scomm32. The only problem I have so far is that I am not able to send the byte corresponding to carriage return ('r') and this is essential so that the multimeter understand that this is the end of the command.
Indeed when using Scomm1.Output="COMMANDr" r is not translated as "0x0D" but as "0x5C72". Any idea of how I can send the right "carriage return" ?
Thank you | |
By: Guest | Posted on: May 12 2017 at 08:20:04 PM | What makes you think that "r" is a carriage return? "r" is just the actual letter "r".
To send just a carriage return
SComm32.Output = Chrs(13)
or maybe even
SComm32.Output = vbCR
So, lets say you wanted to send "SOMETEXT" terminated with a CR you'd do
SComm32.Output = "SOMETEXT" & Chr(13)
| |
|