SMS THROUGH PLANT SCADA VIA TELTONIKA GSM MODULE

Hello All,

I have a Teltonika TRB-245 GSM module, which supports 'HTTP GET' request for SMS service via LAN port. Now I want to send and receive SMS trough Plant SCADA 2020R2 with the GSM module. Please help me with the CICODE code for sending and receiving the SMS service. Or any other process with which i can send and receive SMS in Plant SCADA. Thank you in advance. 

Parents
  • Hi 

    I have a similar function were we send weather based data to Weather Observations Website,WOW, the british Met Office.

    It is based on HTTP GET.   I have divided into two parts , Cicode function to create the url string and then call VB function were do the HTTP GET call. 

    In the cicode function I have left out many statements building up the "sURL string".

    FUNCTION Send_To_WOW()

    STRING sUrl,sDate,sStatus;
    STRING sBaromin,sWinddir,sTempf,sWindspeedmph,sWindgustmph;
    REAL rtempf;
    TIMESTAMP T1,T2;

    sDate = TimeToStr(TimeCurrent(),10,1); ! UTC tid


    sUrl = sUrl + StrLeft(sDate,10)+"%20"+StrMid(sDate,11,2)+"%3A"+StrMid(sDate,14,2)+"%3A"+StrMid(sDate,17,2);

    T1 = TimestampCurrent();
    sStatus = VbCallReturn(VbCallRun(VbCallOpen("Send_WOW",sUrl)));
    T2 = TimestampCurrent();
    IF sStatus <> "200" THEN
    SOEEventAdd(TimestampCurrent(), "WOW gick ej att sända tid att exekvera:" + IntToStr(TimestampDifference(T2,T1,5,1)) + " sekunder, felkod ;" + sStatus);
    END //IF

    ErrLog("Status wow :"+ sStatus + " tid att exekvera :" + IntToStr(TimestampDifference(T2,T1,6))+ " ms"); ! 200 = OK

    END

    ---------------------------------------------------------

    Below the VBA function.

    ----------------------------------------------------

    Option Explicit
    Function Send_WOW(Byval sUrl As String) As String

    Dim hReq As Object
    'Dim strUrl As String 'create our URL string and pass the user entered information to it



    Set hReq = CreateObject("MSXML2.serverXMLHTTP")
    hReq.Open "GET", sUrl ,False
    hReq.Send

    Send_WOW = hReq.Status
    Set hReq = Nothing 'The nothing keyword should be used when you are finished with an object, to clear any variables that reference the object, so the object can be released from memory.

    End Function

    https://wow.metoffice.gov.uk/

  • Thanks for reply, 

    If there is required any other settings in Plant SCADA, like PORT, BOARD, IODEVICE or any other???

Reply Children
No Data