Search:
Type: Posts; User: DickGrier
Search:
Search took 0.05 seconds.
-
Yes, I have code that you can use as a starting point in my book, Visual Basic Programmer's Guide to Serial Communications 5. You can find a purchase link (click Books) on my web site,...
-
Hi,
Don't call the routine to parse the InString until all data have been received. What I would do are two things:
1. Remove a bunch of the code that isn't required -- extra code makes...
-
You are right. I had thought this was an issue that required an API. This code does work:
Dim Lines() As String
Dim I As Integer
Lines = Split(Text1.Text, vbCrLf)
For I = 0 To...
-
I don't think it is quite as simple as you might imagine. When you add text to a multiline textbox, each line is added with a carriage return linefeed (vbCrLf) to mark a new line. However, the CRLF...
-
Hi again,
If you meant that your data is ASCII (text) characters that represent hex data - but really are not binary -- then you can use ReadExisting. Still, there are two caveats.
First, you...
-
Hi,
ReadExisting reads Text (ASCII charaters) with values that range from - &H7F. You should not use this method for binary data (data that might have a value higher than &H80). Use Read...
-
You don't really describe what the data stream looks like, so I'm just going to offer some thoughts.
1. Don't use ReadByte. Unless you expect only a single byte to be sent, ReadByte is very...
-
You should change two statements.
change:
If MSComm1.PortOpen = False Then MSComm1.PortOpen = True
remove:
MSComm1.PortOpen = False
The reason is that when you close the port right after...
-
There is latency, but not 250 mS of latency. You didn't post your receive code, but I wrote this simple-minded routine:
SerialPort1.Write("0123456789")
Dim Buffer As String = ""...
-
Sorry, I have not programmed using the PicoScope API, so I don't know many specifics.
Here is what I have found: http://www.picotech.com/support/kb/kbfiles/PicoScopeUSBStreaming.pdf,...
-
IMO, you are asking far too much. Attempting to handle that much data each second would require a kernel-mode device driver to buffer the data to disk. This is a huge job and should not be...
-
Every time that I have seen this error, the cause was the Virtual Serial Port device driver associated with a USB serial adapter. I've recommended FTDI based USB serial adapters, because they seem...
-
It returns an array of type Byte (which is OK, I think). If you want, you can modifiy the code -- that is fairly simple.
Dick
-
Here is the conversion that I have published in my book. Give it a try (I think it is equivalent to the one that you want, though CRCs can get tricky):
'Copyright Richard L. Grier, 2009
Public...
-
Here is the simplest form (there are other ways):
Dim TextBox As TextBox
Dim I As Integer = 2
Dim name As String = "TextBox" & I.ToString
TextBox =...
-
First, you might want to use the OnComm receive event, instead of a loop. Set the RThreshold property to 1 to enable these events.
Second, for binary data you (generally) shoud set the InputMode...
-
RS422 defines the electrical interface. RS422 uses a four-wire connection between each device, with 0-5V signalling levels, and a differential driver and receiver to interface with the four wires...
-
For plotting, you can use the Chart control in the Toolbox (System.Windows.Forms.DataVisualization.Charting.Chart). There is example code on http://archive.msdn.microsoft.com/mschart.
Dick
-
This is one of the several problems that you may encounter when using a barcode scanner that acts as a keyboard (HID) device. IMO, the only real solution is to use a scanner that implements a serial...
-
It has been so long since I did this, I had forgotten that I must have set a reference to MSComm in the VBP file for the dll.
The line:...
-
No, MSComm is not referenced in the project. The OLE library name (by which MSComm32.ocx is "known" and provides the interface to it members) by Windows is MSCommLib.MSComm. This creates a specific...
-
There is a more complete example on my web site. MSComm does not have to be in the project, nor do you have to add MSComm32.ocx to your project references. The class that I showed is compiled in an...
-
Here is a class library that I created a few years ago. I have a slightly modified version in my book, Visual Basic Programmer's Guide to Serial Communications 4 that creates an equivalent via a...
-
The Mono project, or you may want to look at RealBasic (http://www.realsoftware.com/realstudio/).
Dick
-
OK, so if what I think I understand is that you are not asking anything about the Symbol PPC scanner? You have code that executes on the PPC and that then transfers barcode data to a database. This...
-
I don't know enough.
What I "think" you want to do is to use a class that creates a background thread to show the first form and its UI elements. Then, you use a second method that creates...
-
You should call a delegate (as you are doing) using BeginInvoke syntax, not Invoke. IMO.
Without seeing your code, it isn't clear why you are using two threads. However, if you need to interact...
-
I know that you have received other answers. However, this is to the point: http://www.codeproject.com/Articles/185522/Using-the-Raw-Input-API-to-Process-Joystick-Input. You can use any one of the...
-
You might want to try this code fragment (there are lots of possible variations):
Imports System.IO
Dim FilePath As String = "somepathandfilename"
Dim reader As StreamReader =...
-
USB serial port adapters (and other devices that use Virtual Serial Ports) commonly are installed with port numbers higher than 16, and it isn't always possible to renumber them to lower port number....
-
If you send me email at dick_grier@msn.com, I will send you a edited version of MSComm32.ocx that supports Com1-255. Note, this version of MSComm is not supported by Microsoft, so you use it at your...
-
Formatted:
Dim verb As String = ""
Dim noun As String = ""
Dim response As String = ""
Dim Finished As Boolean = False
Dim ReadVerbOK As Boolean =...
-
Hi,
First, let me say that I wouldn't choose the file syntax that you are using, a StreamReader gives you more control. However, that statement is a little pedantic, so let me just build on what...
-
See the page link for Serial Port (to the left on the introductory PC Data Acquisition page).
Actual code depends on the device you use. I have several different examples in my book, but there...
-
Just read data until you reach the end of file, and parse that data. You don't show what code doesn't work, but the problem is caused by the way you are reading data. Random access won't solve this...
-
I have information on this under PC Data Acquistion on my website (www.hardandsoftware.net). The least expensive serial ADC that I have experienced is http://www.dlpdesign.com/usb/io8.shtml (though...
-
The simple way is to use a USB serial port adapter. A RS-232 serial port has three inputs that can be used to monitor an external button press. Connect pin4 (DTR) to one side of a button. Connect...
-
You can open a text file an treat it as a binary file using a binary reader, thus you can read at any location in the file (read x-bytes into an array of type Byte, then convert that array back to a...
-
The limitation has nothing (specific) to do with VB6. The limitation is Windows, which is not a real-time OS.
I have a more extensive discussion of these issues on my PC Data Acquisition pages...
-
Not really. Resolution and accuracy are not the same thing. While it is possible to create a measure of elapsed time with microsecond(s) resolution, the result will not be accurate.
Realize that...
|
Click Here to Expand Forum to Full Width
|