6/5/2011 2:55 AM | |
Posts: 291 Rating: (68) |
Hi saddlepoint, The following is a reference of usingMicrosoft Communications Control (mscomm32.ocx) for communicating via the serial interface. http://support.automation.siemens.com/WW/view/en/28378295 I tested & found it works fine & simply before. Hoping there will be someone can tell you the hints about using it in Runtime by C-Script. B.R., Komi |
This contribution was helpful to1 thankful Users |
6/5/2011 11:17 PM | |
Posts: 19 Rating: (0) |
I may use this, Is it used for wincc7 or not.I test and update |
This contribution was helpful to1 thankful Users |
6/6/2011 2:28 AM | |
Posts: 291 Rating: (68) |
Hi saddlepoint, I've tested it in WinCC V7already! It works fine (having good communication) with my another VB.net Serial program. But~ we need to pay attention to that! The MSComm.ocx needs to be 'had' & registered before using. Since I have VB6 installed, so I don't have any problem in reference of this control. But I had been told by my colleague telling that he couldn't take us of it, even he had copied it to OS folder & registered it with RegSrv32.exe Once you encountered such a small trouble, please ... regist it by the attachment. Then...have fun! B.R., Komi AttachmentVBCTRLS.zip (281 Downloads) |
Last edited by: Komi at: 6/6/2011 5:25 AMDear saddlepoint, I''''m looking forward to seeing your test result upon using it via C-Script? Please share us your testing result! Your trying will be much appreciated! ;D Last edited by: Komi at: 6/6/2011 2:30 AMCorrected my typo |
|
6/21/2011 11:38 AM | |
Posts: 19 Rating: (0) |
Hi Komi Dim strBuffer, strTemp |
6/21/2011 11:57 AM | |
Posts: 291 Rating: (68) |
Hisaddlepoint, 1. You may do for example: Package_Nr = UBound(Split(strTemp, Chr(6))) + 1 For i = 1 toPackage_Nr HMIRuntime.Tags("Buffer" & Cstr(i)).Write Split(strTemp, Chr(6))(i -1) Next Then you will get the traffic splitted into several "units"! 2. Sorry~ I'm not sure but I guess it (WinCC HMIRuntime 1.0 Type Library) can be reffered in Delphi. (I'm sure it can be refered by VB-Script partially. ~ You may check its CLSID from the Windows register!) B.R., Komi |
6/21/2011 12:08 PM | |
Posts: 55 Rating: (4) |
Hi Saddlepoint, you almost have it :-) Inside the program call a function to analyse the message received (see [*]) In "Proyect Modules" create a new subroutine. Depending on the protocol you are using, separate the data into tags. For example, you may have an init character, a message length, or checksums at the end. Or are the data separated in commas? Sub analyseMsgReceived(str_buffer) End Sub Kind regards, Marta |
Follow us on