[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

How to read Data from USB and Serial Port

Asked by Adabara2009 in FoxPro Database, VB Database Programming, DCOM

Tags: Com Port, USB Communication, VB6, VFP

Can someone help me with code to read data from a sysmex kx-21N heamatology analyzer through the serial RS-232 port? The device send data in ACSII format through the serial port. I need to collect the string of data and extract the test value and store in my database. I am using a USB to Serial cable to connect the device to my pc
I have tried using MScomm in VFP, no data was retrieved. I now want to use VB6.0.
I also need to read barcode into a textbox of the same form from a USB barcode reader.
I am a beginner in VB.
below is my VFP code that did not work
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
**form init event code
PUBLIC gnFileHandle
 
   * You should replace 'c:\sample.hlp' with your own file name
   IF FILE('c:\FHIapps\sample.txt')  && Does file exist?
      gnErrFile = FOPEN('c:\FHIapps\sample.txt',12)  && If so, open read-write
   ELSE
      gnErrFile = FCREATE('c:\FHIapps\sample.txt')  && If not, create it
   ENDIF
 
   = FCLOSE(gnErrFile)  && Close the file
 
   STORE FOPEN('c:\FHIapps\sample.txt',1) TO gnFileHandle     && Open the file
 
**Command button click code**
PUBLIC instring as character
 
 
* Use COM1.
   thisform.testcom.CommPort = 1
   * 9600 baud, no parity, 8 data, and 1 stop bit.
   thisform.testcom.Settings = "9600,N,8,1"
   * Tell the control to read entire buffer when Input is used.
   thisform.testcom.InputLen = 0
   * Open the port.
 
   * Send the attention command to the modem.
   * Wait for data to come back to the serial port.
   DO WHILE thisform.testcom.InBufferCount = 2
     * Read the "OK" response data in the serial port.
     InString = thisform.testcom.Input
   ENDDO
   STORE instring TO thisform.text7.Value
   
   * Close the serial port.
   thisform.testcom.PortOpen = .F.
[+][-]06/18/09 10:26 AM, ID: 24659704Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: FoxPro Database, VB Database Programming, DCOM
Tags: Com Port, USB Communication, VB6, VFP
Sign Up Now!
Solution Provided By: Olaf_Doschke
Participating Experts: 1
Solution Grade: A
 
[+][-]05/27/09 04:06 PM, ID: 24488457Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/28/09 07:54 AM, ID: 24493909Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/01/09 03:17 AM, ID: 24516124Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/01/09 04:14 AM, ID: 24516408Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06/03/09 11:19 PM, ID: 24543964Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/06/09 12:21 AM, ID: 24562016Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/06/09 03:03 AM, ID: 24562530Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06/06/09 09:37 AM, ID: 24563484Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/06/09 12:26 PM, ID: 24564066Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/08/09 05:56 AM, ID: 24571315Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/08/09 11:56 AM, ID: 24575159Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06/09/09 01:38 AM, ID: 24579154Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/18/09 04:31 AM, ID: 24656362Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/20/09 06:33 AM, ID: 24673684Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/20/09 09:09 AM, ID: 24674255Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625