通过串行端口发送短信SMS Through Serial Port

亲爱的所有人, 我正在使用WInCC Flexible 2008 SP2作为我的项目的PC RUNTIME 我想通过WInCC Flexi 2008 PC Runtime中的脚本发送短信 我已经开发了使用GSM调制解调器通过串行端口发送SMS的脚本。该脚本在Windows XP中运行良好 但不幸的是,我的客户购买了WIndows7 32位操作系统 除发送短信脚本外,其他所有任务都工作正常 i al...

问题描述

亲爱的所有人,
我正在使用WInCC Flexible 2008 SP2作为我的项目的PC RUNTIME
我想通过WInCC Flexi 2008 PC Runtime中的脚本发送短信
我已经开发了使用GSM调制解调器通过串行端口发送SMS的脚本。该脚本在Windows XP中运行良好
但不幸的是,我的客户购买了WIndows7 32位操作系统
除发送短信脚本外,其他所有任务都工作正常
i alkso已在windows7中注册actix控件。
即MSCOMM32.ocx
通过许多诊断,我发现脚本没有在Windows7中打开端口。修改后的脚本如下:

Dim SMS发送
Dim SMS、SMS2

Dear All,
I am using WInCC Flexible 2008 SP2 as PC RUNTIME for my project.
I want to send SMS through Script present in WInCC Flexi 2008 PC Runtime.
I have already developed script for sending SMS through Serial port using GSM Modem. The script is perfectly working in Windows XP.
But unfortunately my client has purchased WIndows7 32 Bit os.
all thigns are working perfectly except for sending SMS script.
i alkso have registered actix controls in windows7.
i.e. MSCOMM32.ocx.
by many diagnostics i found that the script is not opening the port in Windows7. The mendtioned script is as follow;

Dim SMSSend
Dim SMS, SMS2
Dim buffer, DAM_FT, DAM_INCH, MyDate, MyTime
Dim S
Dim NoArr(6)

DAM_FT=(POND_WATER_DISPLAY)
DAM_INCH=(英寸值)
我的日期=日期
MyTime=时间

DAM_FT=(POND_WATER_DISPLAY)
DAM_INCH=(Inch_Value)
MyDate= Date
MyTime=Time

INCREMENT_VALUE=INCREMENT_VALUE+1
If(INCREMENT_VALUE>15)Then
INCREMEMENT_WALUE=0
Set SMSSend=CreateObject(“MSCommLib.MSComm”)
如果NO1_MOBILE_INT=15,则
End If
If NO3_MOBILE_INT=15 Then
NoArr(2)=MOBILE_NO_3
End If
If NO4_MOBILE_INT=15 Then
SMS发送。设置=“9600,N,8,1”
SMS发送。输入Len=0
SMS发送。握手=0
SMS发送。PortOpen=True
SMS=“VASANA BARRAGE WATER STORAGE CURRENT LEVEL IS”
SMS2=“.CURENT INCOMING FLOW IS”
如果(INCREMENT_VALUE=1),则发送SMS。输出=“AT”&通道(13)
数据输入=SMS发送。输入
结束条件

INCREMENT_VALUE=INCREMENT_VALUE+1
If (INCREMENT_VALUE > 15) Then
INCREMENT_VALUE=0
End If
'here you can add all the cell numbers you want to send to
Set SMSSend = CreateObject("MSCommLib.MSComm")
If NO1_MOBILE_INT=15 Then
NoArr(0)=MOBILE_NO_1
End If
If NO2_MOBILE_INT=15 Then
NoArr(1)=MOBILE_NO_2
End If
If NO3_MOBILE_INT=15 Then
NoArr(2)=MOBILE_NO_3
End If
If NO4_MOBILE_INT=15 Then
NoArr(3)=MOBILE_NO_4
End If
If NO5_MOBILE_INT=15 Then
NoArr(4)=MOBILE_NO_5
End If
If NO6_MOBILE_INT=15 Then
NoArr(5)=MOBILE_NO_6
End If
For S = 0 To 5
SMSSend.CommPort = 1
SMSSend.Settings = "9600,N,8,1"
SMSSend.InputLen = 0
SMSSend.Handshaking = 0
SMSSend.PortOpen = True
SMS="VASANA BARRAGE WATER STORAGE CURRENT LEVEL IS "
SMS2=". CURRENT INCOMING FLOW IS "
If (INCREMENT_VALUE = 1) Then
SMSSend.Output = "AT" & Chr(13)
Data_Input=SMSSend.Input
End If

如果(INCREMENT_VALUE=2),则SMS发送。输出=“AT+CMGF=1”&通道(13)
数据输入=SMS发送。输入
End If
If(INCREMENT_VALUE=3),然后输入SMSSend。输出=“AT+CMGS=”&通道(34)&;无Arr(S)&;通道(34)&;第(13)章;Len(短信)/2;Chr$(13)
Data_Input=SMS发送。输入
End If
If(INCREMENT_VALUE=4),然后输入SMSSend。输出=短信;DAM_FT&“英尺”&DAM_INCH&(DAM_INC);“英寸at”&我的时间(&M);我的日期;SMS2和;收入_流量&“CUSEC.”+通道(26)
数据输入=SMS发送。输入
结束条件
SMS结束。端口打开=假

If (INCREMENT_VALUE=2) Then
SMSSend.Output = "AT+CMGF=1" & Chr(13)
Data_Input=SMSSend.Input
End If
If (INCREMENT_VALUE=3) Then
SMSSend.Output = "AT+CMGS=" & Chr(34) & NoArr(S) & Chr(34) & Chr(13) '& Len(SMS) / 2 & Chr$(13)
Data_Input=SMSSend.Input
End If
If (INCREMENT_VALUE =4) Then
SMSSend.Output = SMS & DAM_FT & " Ft " & DAM_INCH & " Inch at " & MyTime & MyDate & SMS2 & INCOMING_FLOW & " CUSEC." + Chr(26)
Data_Input=SMSSend.Input
End If
SMSSend.PortOpen = False

下一个

Next

推荐答案2

线程已关闭,因为问题已在以下线程中发布通过WiNCC FLEXI PC RUNTIME发送短信.

Thread closed, because question is already published in the following thread SMS Messaging through WiNCC FLEXI PC RUNTIME.

顺致敬意,

Best regards

_主持人

O_Moderator

你可能感兴趣的文章

徽标之间的远距离串行链接

问题描述我需要通过串行链接链接两个Logo。然而,当两个设备都在运行时,链接可能会定期断开并重新创建。两个位置之间的接线非常陈旧,有许多接头和终端。我还怀疑它在系统中有很多电容。因此,我怀疑我将需要使用外...

  • 发布于 2022-10-10 17:49
  • 阅读 ( 170 )

徽标到串行标签打印机

...Is there a way? (There is also a TD display)推荐答案2如果可能,则通过编程接口,而不是通过TD端口的接口。 If something is possible, then via the programming interface and not via the interface of the TD port.但你必须自己编程。 But you would have to program yourself...

  • 发布于 2022-10-10 21:25
  • 阅读 ( 105 )

从PLC S7-400向MOBLE发送短信

...请查看下一个链接: Please check next link for more information : 通过带有串行CP/CM和MD720-3 GPRS/GSM调制解调器的SMS进行无线信号发送和交换   Wireless Signaling and Switching via SMS with serial CPs/CMs and the MD720-3 GPRS/GSM Modem 推荐答案3我觉得很困难...

  • 发布于 2022-10-11 17:49
  • 阅读 ( 93 )

系统数据类型TCON_phone

...用程序示例有助于: Maybe this Application example helps:场景1,通过GPRS与S7-1200和CP 1242-7进行无线数据通信 Wireless Data Communication via GPRS with S7-1200 and CP 1242-7, Scenario 1推荐答案4你想要这个? You want this?推荐答案5新问题发布者萨拉·西门...

  • 发布于 2022-10-12 12:17
  • 阅读 ( 147 )

使用AT命令发送消息时出错-MD720-3

问题描述我有一个使用MD720-3调制解调器通过超级终端发送短信的问题。我可以连接和参数化,但发送消息时遇到问题。 I have a problem with sendig SMS via Hyperterminal with using MD720-3 modem.I can connect and parameterize but I have a problem with sending m...

  • 发布于 2022-10-12 12:19
  • 阅读 ( 118 )

串行打印机

问题描述您好,我在哪里可以找到如何使用串行打印机S7 1200的信息? Hello where can I find information on how to use a serial printer S7 1200?如何将字符串发送到打印机?他需要特殊司机吗? How do I send a string of characters to the printer? He needs speci...

  • 发布于 2022-10-12 12:28
  • 阅读 ( 152 )

Modbus总线

...接口。如果没有可用的直接TCP解决方案,该串行modbus可以通过转换器(即来自LANTRONIX)转换为modbus TCP。 I know that for the ET200S is a serial interface for modbus available. That serial modbus can be converted into Modbus TCP by a converter (i.e. from LANTRONIX), if...

  • 发布于 2022-10-12 12:45
  • 阅读 ( 170 )

s71200-cm1241与打印机的rs232通信

...cpu 1212c和rs232通信模块cm1241与打印机通信。我还有一根9针串行到25针并行打印机端口转换电缆我正在使用sendptp块,当我与超级终端通信时,如果我发送“hello”,我会收到“hello“和一些奇怪的字母。然而,这不是问题,当我连...

  • 发布于 2022-10-12 12:55
  • 阅读 ( 136 )

用于MPI到以太网连接的HMS Anybus串行服务器

...知道是否有论坛成员有使用Anybus串行服务器产品的经验,通过我们的工厂生产网络创建从PLC到编程设备的连接。 I am wondering if any forum members have experience with this Anybus Serial Server product, creating a connection from the PLCto the programming device ...

  • 发布于 2022-10-12 13:36
  • 阅读 ( 138 )

从S7-300/400 PLC发送短信

...sts/60112或[url=http://support.automation.siemens.com/WW/view/en/25545680]通过SMS与S7-300/400/ET200S控制器和MD720-3 GPRS/GSM调制解调器进行无线信号发送和交换[/url] or [url=http://support.automation.siemens.com/WW/view/en/25545680] Wireless Signaling and Switching via SMS with ...

  • 发布于 2022-10-12 14:44
  • 阅读 ( 102 )