Search:

Type: Posts; User: DickGrier

Page 1 of 13 1 2 3 4

Search: Search took 0.05 seconds.

  1. Replies
    5
    Views
    1,993

    Re: Sending a file via COM PORT

    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,...
  2. Replies
    6
    Views
    1,476

    Re: RS232 Communication

    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...
  3. Replies
    12
    Views
    4,248

    Re: Multiline Text Box

    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...
  4. Replies
    12
    Views
    4,248

    Re: Multiline Text Box

    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...
  5. VS 2010 Re: Receiving and Processing HEX data from Serial

    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...
  6. VS 2010 Re: Receiving and Processing HEX data from Serial

    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...
  7. Re: Help getting my head wrapped around ReadLine and ReadByte

    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...
  8. Replies
    8
    Views
    7,442

    Re: CRC CCiTT Kermit calculation in VB6

    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...
  9. Replies
    3
    Views
    5,188

    Re: Serial port delay

    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 = ""...
  10. Replies
    24
    Views
    7,176

    Re: Picoscope Control Code

    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,...
  11. Replies
    24
    Views
    7,176

    Re: Picoscope Control Code

    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...
  12. Replies
    2
    Views
    8,388

    Re: Trouble with MSCOMM.....

    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...
  13. Replies
    13
    Views
    7,265

    VS 2010 Re: CRC-16 calculation

    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
  14. Replies
    13
    Views
    7,265

    VS 2010 Re: CRC-16 calculation

    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...
  15. Re: Is it possible to reference a text control using a variable?

    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 =...
  16. Replies
    4
    Views
    7,995

    Re: vb6 - send hex value to rs232

    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...
  17. Replies
    2
    Views
    3,523

    Re: vb6 - how to communicate with rs422 device

    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...
  18. Replies
    8
    Views
    2,797

    VS 2008 Re: reading data via rs232

    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
  19. Replies
    1
    Views
    872

    VS 2010 Re: lose focus problem with barcode scanner

    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...
  20. Replies
    15
    Views
    5,605

    Re: howto access comport from vb6 console app

    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:...
  21. Replies
    15
    Views
    5,605

    Re: howto access comport from vb6 console app

    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...
  22. Replies
    15
    Views
    5,605

    Re: howto access comport from vb6 console app

    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...
  23. Replies
    15
    Views
    5,605

    Re: howto access comport from vb6 console app

    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...
  24. Replies
    2
    Views
    558

    Re: Develop Apps for PC and Mac

    The Mono project, or you may want to look at RealBasic (http://www.realsoftware.com/realstudio/).

    Dick
  25. Replies
    5
    Views
    1,439

    Re: Creating graph for scanner

    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...
  26. Replies
    4
    Views
    704

    VS 2010 Re: [RESOLVED] Multi-threading Difficulties

    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...
  27. Replies
    4
    Views
    704

    VS 2010 Re: Multi-threading Difficulties

    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...
  28. Replies
    8
    Views
    6,541

    VS 2010 Re: Reading data from a USB Port?

    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...
  29. VS 2010 Re: Reading Raw Text (?) as String to Manipulate...

    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 =...
  30. Replies
    5
    Views
    1,202

    Re: Ms comm control

    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....
  31. Replies
    5
    Views
    1,202

    Re: Ms comm control

    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...
  32. Replies
    7
    Views
    823

    VS 2008 Re: Reading text files randomly

    Formatted:


    Dim verb As String = ""
    Dim noun As String = ""
    Dim response As String = ""
    Dim Finished As Boolean = False
    Dim ReadVerbOK As Boolean =...
  33. Replies
    7
    Views
    823

    VS 2008 Re: Reading text files randomly

    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...
  34. Replies
    8
    Views
    2,712

    Re: Monitor Voltages Using RS232

    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...
  35. Replies
    7
    Views
    823

    VS 2008 Re: Reading text files randomly

    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...
  36. Replies
    8
    Views
    2,712

    Re: Monitor Voltages Using RS232

    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...
  37. Thread: USB Button

    by DickGrier
    Replies
    5
    Views
    1,990

    VS 2010 Re: USB Button

    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...
  38. Replies
    7
    Views
    823

    VS 2008 Re: Reading text files randomly

    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...
  39. Replies
    10
    Views
    3,405

    Re: Help needed for high speed timer

    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...
  40. Replies
    10
    Views
    3,405

    Re: Help needed for high speed timer

    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...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width