コード例 #1
0
        public override void DeviceConn(MelsecA1EAsciiNetConfig config)
        {
            melsec_net           = new MelsecA1EAsciiNet();
            melsec_net.IpAddress = config.IP;
            melsec_net.Port      = config.Port;
            if (!System.Net.IPAddress.TryParse(config.IP, out System.Net.IPAddress address))
            {
                throw new Exception("IpAddress input wrong");
            }

            melsec_net.ConnectClose();
            OperateResult connect = melsec_net.ConnectServer();

            if (!connect.IsSuccess)
            {
                throw new Exception("Connect Failed");
            }
        }
コード例 #2
0
 public FormMelsec1EAscii( )
 {
     InitializeComponent( );
     melsec_net = new MelsecA1EAsciiNet( );
 }