Author Topic: SMS gateway  (Read 1235 times)

horus61

  • Newbie
  • *
  • Posts: 4
    • View Profile
SMS gateway
« on: March 17, 2021, 04:31:50 PM »
Good day to you all. I would like your help. If it is possible. I would like to write measurements extracted from sms received through a TC35i serial modem transmitted from 4 RTUs to a micrologix 1400 from N7: 0 to N7: 4. I don't have much experience in VB. Thank you


Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: SMS gateway
« Reply #1 on: March 18, 2021, 01:47:52 AM »
Since you suggested that those measurement values are already extracted then just use the driver to write them, similar to this:

Code: [Select]
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim value1 As String = SMS_Value1
        Dim value2 As String = SMS_Value2
        Dim value3 As String = SMS_Value3
        Dim value4 As String = SMS_Value4
        EthernetIPforSLCMicroCom1.BeginWrite("N7:0", 4, New String() {value1, value2, value3, value4})
    End Sub

Or simplified further:

Code: [Select]
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        EthernetIPforSLCMicroCom1.BeginWrite("N7:0", 4, New String() {SMS_Value1.ToString, SMS_Value2.ToString, SMS_Value3.ToString, SMS_Value4.ToString})
    End Sub

These should be integer values since N7 is integer data type.