Ejemplo n.º 1
0
        public override void DeviceConn(MelsecRBinaryConfig config)
        {
            MelsecMcRNet mcRNet = new MelsecMcRNet();

            mcRNet.IpAddress      = config.IP;
            mcRNet.Port           = config.Port;
            mcRNet.ConnectTimeOut = config.ConnectTimeOut;
            OperateResult connect = mcRNet.ConnectServerAsync().Result;

            NetworkDevice = mcRNet;
            if (!connect.IsSuccess)
            {
                throw new Exception("Connect Failed");
            }
        }
Ejemplo n.º 2
0
 public FormMelsecRBinary( )
 {
     InitializeComponent( );
     melsec_net = new MelsecMcRNet( );
 }