private void test6( )
        {
            OperateResult <UserType> read = melsecSerial.ReadCustomer <UserType>("D100");

            if (read.IsSuccess)
            {
                UserType value = read.Content;
            }
            // write value
            melsecSerial.WriteCustomer("D100", new UserType( ));

            melsecSerial.LogNet = new HslCommunication.LogNet.LogNetSingle(Application.StartupPath + "\\Logs.txt");
        }
        private void test6()
        {
            // Custom types of Read and write situations in which type usertype need to be implemented in advance.
            // 自定义类型的读写的示例,前提是需要提前实现UserType类,做好相应的序列化,反序列化的操作

            OperateResult <UserType> read = melsecSerial.ReadCustomer <UserType>("D100");

            if (read.IsSuccess)
            {
                UserType value = read.Content;
            }
            // write value
            melsecSerial.WriteCustomer("D100", new UserType( ));

            // Sets an instance operation for the log.
            melsecSerial.LogNet = new HslCommunication.LogNet.LogNetSingle(Application.StartupPath + "\\Logs.txt");
        }