Esempio n. 1
0
        public void Write16S(int Address, int Data)
        {
            try
            {
                if (!m_Adapter.Connected)
                {
                    throw new InvalidOperationException("No connection to device");
                }

                m_Adapter.Write16S((ushort)NodeID, (ushort)Address, (short)Data);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                throw;
            }
        }
Esempio n. 2
0
        internal void Write16S(ushort Node, ushort Address, short Value)
        {
            if (m_IsAdapterEmulation)
            {
                return;
            }

            try
            {
                m_Adapter.Write16S(Node, Address, Value);
            }
            catch (Exception ex)
            {
                throw new Exception(string.Format(Resources.Error_IOAdapter_Operation_Node_Address_Value_Message, Node,
                                                  Address, Value, ex.Message, @"@Write16S"));
            }
        }