Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium



Posted on 2003-02-25
Medium Priority
Last Modified: 2008-07-03
i have eight machines modle No. is PG-2750c controled by pcp832. these machines storedentries like time date cardno upto 6000 per machines i wants to download the data in visual basic how can i do that can any body help me in this regards.
All other information about these machines r available at http://www.pongee.com/html/time.htm

an early response shall be highly appriciated.

asghar ali

Question by:swam

Expert Comment

ID: 8016420
It looks like you connect the PCP-832 to your PC using an RS-232 lead in one of the comm ports in the back of the PC. Use the Microsoft com port control MSCOMM32.OCX in the VB program. You can set all the properties via VB or using the IDE.

This URL gives you the required interface protocols: http://www.pongee.com.tw/html/page7.htm

Author Comment

ID: 8151429
Yes you are right I m using this device but i m not able to get data from.
i m using comm events but nothing to saw from machine can u help me in this regards.I mean how i can write the programm to receieved data.

Accepted Solution

PNJ earned 400 total points
ID: 8151483
Assuming that you are actually getting the "OnComm" event then you read the data like this:

Private Sub comPCP832_OnComm()
   Dim Temp As String
   Select Case comPCP832.CommEvent
   Case comEvReceive ' Received RThreshold # of chars.
      ' Grab the string/character
      Temp = GetInputBuffer(comPCP832)
   End Select

End Sub

Function GetInputBuffer(ComPort As MSComm) As String

   Dim Temp As Variant, i As Integer, Message As String
   Dim AChar As Integer
   ' Read the Comm Port input buffer, flush it, and log the data received
   ' Return the data as a string
   GetInputBuffer = vbNullString
   If ComPort.InBufferCount = 0 Then Exit Function ' Nothing in input buffer
   Temp = vbNullString
   Do While ComPort.InBufferCount > 0
      Temp = Temp & ComPort.Input

   GetInputBuffer = Temp
End Function

You should call you comm control "comPCP832" for this to work with this code fragment.


Expert Comment

ID: 8901165
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
LVL 49

Expert Comment

ID: 8972727
Moderator, my recommended disposition is:

    Accept PNJ's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question