Mape

MrPLC Member
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Mape

  • Rank
    Hi, I am New!

Profile Information

  • Country Sweden
  1. Script for mail in SCADA-WinCC

    Well..., I can put som input by myself. I had fixed exception in my local firewall for the special *.exe-file used when using an action by a button in a picture. But I thought that also should be OK for running Global Scripts but I found out it was another *.exe-file. So exception for both and it works fine. Regards/ MaPe
  2. Hello! Does anyone have any idea why my script (triggered by a button in a picture) works fine and with the same code in a global script doesnt work? As a trigger in global script I have tried both clockwise and by tag. I can se the script going and there is a fault message just telling me "Error with no explanation". The script is used to sent mail internally in our company with some snapshot-data. As I said, works fine with button-action in picture but not as a global script (with trigger). WinCC 7 SP2 with Windows 7 Ulimate... ________________________________________________________________________ Here is my button-action (with dummy-mail-adress) Sub OnLButtonDown(Byval Item, Byval Flags, Byval x, Byval y) Dim objMessage Dim receiver_2 Dim mess mess = "test" receiver_2 = HMIRuntime.Tags("Receiver_2").Read If receiver_2 <> "" Then Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Automatiskt mail från process-styrning" objMessage.Sender = "mail@mail.com" objMessage.To = receiver_2 objMessage.TextBody = "Mail från: " & vbCrLf & vbCrLf & mess objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "C23.mail.com" objMessage.Configuration.Fields.Update objMessage.Send End If End Sub ___________________________________________________________________________________________ Here is the G-S (with dummy-mail-adress) Option Explicit Function action Dim objMessage Dim receiver_2 Dim mess mess = "test" receiver_2 = HMIRuntime.Tags("receiver_2").Read If receiver_2 <> "" Then Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Automatiskt mail från process-styrning" objMessage.Sender = "mail@mail.com" objMessage.To = receiver_2 objMessage.TextBody = "Mail från: " & vbCrLf & vbCrLf & mess objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "C23.mail.com" objMessage.Configuration.Fields.Update objMessage.Send End If End Function ____________________________________________________ Some inputs anyone? Regards, MaPe
  3. Saving actual values in the DB-block

    Hello! I use the method of "drag and drop". Go to "on-line-container" of all blocks, highlight every block you would transfer, grabb them and drop in the "off-line-container". Best regards, Mape