Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - muratguenduez

Pages: [1]
1
Open Discussion / modbus tcp to modbus rtu converter
« on: May 15, 2019, 02:30:07 AM »
hi there,
im working on a converter modbusTCP toMOdbusRTU. i have couple of problems and a bit confusion. i can read my rtu plc connected to converter modbus rtu port via Modbuspool without any problems. modbuspool provide me to setup connection parameters "ip, port, unitID(for rtu), and reg address". however i cant find any unitID in the AHMI except modbusTCPcom Properties. yes it is exist but nothing changes by changing it. how to solve this problem? GODRA, ARCHI or another knowlegefuly forumer =) im using c#

2
Open Discussion / Dynamic creation for DataSubscriber2? need help!
« on: September 14, 2018, 08:33:13 AM »
hail all,
i have tried basic addition dynamicly for DataSubscriber2 but i coudnt get any values.

i added a ModbusTCPCom  modbusTCPCom1 from toolbox as drag and drop,

then i added dynamicly a DataSubscriber2 ds, ModbusTCPCom mbDelta and  PLCAddressItem item0 = new PLCAddressItem { PLCAddress = "U44597", Name = "L1" };
when the ds.Comcomponent =  modbusTCPCom1; is ok i read my first object L1 by ds.GetValuesByName("L1");

but ds.Comcomponent = mbDelta; is not working.
i tried to copy all setup for modbusTCPCom1 from designer.cs even more  =) i miss something here. anyway code is below,


Code: [Select]
public partial class Form1 : Form
    {
        PLCAddressItem item0 = new PLCAddressItem { PLCAddress = "U44597", Name = "L1" };
        ModbusTCPCom mbDelta = new ModbusTCPCom();     
        DataSubscriber2 ds = new DataSubscriber2();

        public Form1()
        {

            InitializeComponent();

            mbDelta.BeginInit();
            ds.BeginInit();

            mbDelta.DisableSubscriptions = false;
            mbDelta.IniFileName = "";
            mbDelta.IniFileSection = null;
            mbDelta.IPAddress = "192.168.1.5";
            mbDelta.MaxReadGroupSize = 20;
            mbDelta.PollRateOverride = 500;
            mbDelta.SwapBytes = true;
            mbDelta.SwapWords = true;
            mbDelta.TcpipPort = ((ushort)(502));
            mbDelta.TimeOut = 20000;
            mbDelta.UnitId = ((byte)(1));


           
            ds.ComComponent = mbDelta;
            ds.PLCAddressValueItems.Add(item0);
            ds.PollRate = 0;           
            ds.SynchronizingObject = this;           
            ds.Value = null;
            ds.EndInit();
            mbDelta.EndInit();

           
            timer1.Start();
        }

private void timer1_Tick(object sender, EventArgs e)
        {
           
            richTextBox1.Text = ds.GetValueByName("L1");
           
        }
}

3
Open Discussion / 3.99x modbus tcp timeout setting doesnt work ?
« on: June 11, 2018, 04:02:40 AM »
hi bosses,
i have use gprs modem to connect a plc that i used before. i need to increase the timeout for the modbusTCP connection due to carrier issues. default is 3000 and i put it as 20000 but i see the connection error message on basicLabel in 3 second after runing the program!
i think this message should be seen after 20 seconds. why it is still 3 sec ?

or maybe i need to use another technic that i dont know =)

thanks

4
i need to read some datas from these meters. it says it has a port rs-485 but im not sure it is. initial baudrates must be 300 b/s and after first communication, baudrate can be selectible. i dont understand. here is the information to use this communication http://vrtp.ru/index.php?act=Attach&type=post&id=479714

i hope you find a solution for this issue.

best regards
thanks

5
Code: [Select]
private void timer1_Tick(object sender, EventArgs e)// 1 SECOND
{ i++;
 if(i==5) {lbl_infoG1.Visible = false; i=0;}
}

private void modbusTCPg1_ComError(object sender, MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs e)
        {
            lbl_infoG1.Text = "WARNING!!!"; lbl_infoG1.Visible = true;           
        }


hello designers,
this gives me a message on the screen that i put the label as you see. i run the program and everything normal about this comError event but after a few minute comErroe event stops and label disappear due to visible = false in timer tick.

why does it stops?
thanks.

6
Open Discussion / How can i use same "emailer1" for all forms??
« on: April 04, 2017, 05:48:05 AM »
Hello Everyone,
first of all i would like to say thanks for AdvancedHMI. It is very usefull.
i have a question, im new for c#. how can i declare the "emailer1" as public static? OR How can i change a component of "emailer1" from another Form ? i have tried same name for both Form and didnt work =)

im waiting for your advanced helps =)

thanks
best regards
Murat

Pages: [1]