Serial Port Mscomm
SerialPortMscommWelcome to my tutorial on Serial Port Communication in VB. Net. Lately Ive seen a lot of questions on how to send and receive data through a serial port, so I thought. I use this to read from a barcode scanner into an RS232 serial port. It uses the MSComm control. I have seen a few messages on the forum asking about serial. Read COMM port using ABAP wo third party software. Case Weighbridge scale sends the weight data to COMM Port. Earlier we had to write a. NET program using SAP. NET Connector Using VB. NET and then from SAP side we had to create RFC so that the COMM port data gets utilized in SAP. Now there is no need to use the third party software VB. NET, C etc Using the following steps we can directly fetch the weight data at the COMM Port to SAP Step 1 Create a Function Module code given belowStep 2 Register the Windows active. X control MSCOM3. OCX on the client PC where the Weighbridges serial port is connected. Please click here to get detailed steps on how to registeractivate this control. Step 3 Implement this control in Transaction SOLE in SAP Create an entry MSCOMMLIB. MSCOMM. 1 and enter the CLSID. A5. 60. 0 2. C6. E 1. B 8. 2B6 0. Step 4 Active this MSCOMM3. University Of Rochester Graduate Visitation Program. OCX with Licence Key on the client PC where the Weighbridges serial port is connected. CAN BUS Project To Interface The MBZ 2007 CLK350. Or How To Wirelessly Control the Steering Wheel Buttons, Electric Windows, Door Locks, Etc with a WIndows Mobile. Open RUN execute regedit. Go to u. 20. 1CHKEYCLASSESROOTLicensesu. DCreate new key Folder name with 4. E8. 30 6. AC2 1. ADB 0. AA0. 0C0. Give the default VALUE kjljvjjjoquqmjjjvpqqkqmqykypoqjquoun. Restart the system and run the FM. FM Code. FUNCTION zserialcomport. Serial Port Mscomm' title='Serial Port Mscomm' />Local Interface. REFERENCEMODE TYPE I DEFAULT 0. REFERENCECOMMPORT TYPE I DEFAULT 1. REFERENCESETTINGS TYPE C DEFAULT 2. Windows Xp Sp3 Jpn Iso. N,8,1. REFERENCEOUTPUT TYPE C OPTIONAL. REFERENCEINPUT TYPE C. NOCREATEOBJECT. TYPE POOLS sabc. INCLUDE ole. 2incl. PERFORM init. PERFORM openport USING commport settings. PERFORM readport. CHANGING input. PERFORM writeport. USING output. CHANGING input. PERFORM final. DATA oobj TYPE ole. LIKE sy repid. warepid sy repid. CALL FUNCTION AUTHORITYCHECKOLE. MSCOMMLIB. MSCOMM. OTHERS 3. IF sy subrc lt 0. MESSAGE ID sy msgid TYPE sy msgty NUMBER sy msgno. WITH sy msgv. 1 sy msgv. CREATE OBJECT oobj MSCOMMLib. MSComm. 1. IF sy subrc lt 0. RAISE nocreateobject. ENDFORM. Init. FORM openport USING commport settings. SET PROPERTY OF oobj Comm. Port commport. SET PROPERTY OF oobj Settings settings. SET PROPERTY OF oobj Input. Len 0. SET PROPERTY OF oobj Port. Open 1. ENDFORM. openport. CHANGING input. wabuffer TYPE i. GET PROPERTY OF oobj In. Buffer. Count wabuffer. IF wabuffer 0. GET PROPERTY OF oobj Input input. ENDFORM. readport. FORM writeport. USING output. CHANGING input. wabuffer TYPE i. SET PROPERTY OF oobj Output output. GET PROPERTY OF oobj In. Buffer. Count wabuffer. IF wabuffer 0. GET PROPERTY OF oobj Input input. ENDFORM. writeport. SET PROPERTY OF oobj Port. Open 0. FREE OBJECT oobj. ENDFORM. final. You may find additional help from the following links http forums. ID1. 76. 61. 70http www.
