123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- namespace snap7Enc
- {
- /// <summary>
- /// Types of S7 cpu supported by the library
- /// </summary>
- public enum CpuType
- {
- /// <summary>
- /// S7 200 cpu type
- /// </summary>
- S7200 = 0,
- /// <summary>
- /// S7 300 cpu type
- /// </summary>
- S7300 = 10,
- /// <summary>
- /// S7 400 cpu type
- /// </summary>
- S7400 = 20,
- /// <summary>
- /// S7 1200 cpu type
- /// </summary>
- S71200 = 30,
- /// <summary>
- /// S7 1500 cpu type
- /// </summary>
- S71500 = 40,
- }
- /// <summary>
- /// Types of error code that can be set after a function is called
- /// </summary>
- public enum ErrorCode
- {
- /// <summary>
- /// The function has been executed correctly
- /// </summary>
- NoError = 0,
- /// <summary>
- /// Wrong type of CPU error
- /// </summary>
- WrongCPU_Type = 1,
- /// <summary>
- /// Connection error
- /// </summary>
- ConnectionError = 2,
- /// <summary>
- /// Ip address not available
- /// </summary>
- IPAddressNotAvailable,
- /// <summary>
- /// Wrong format of the variable
- /// </summary>
- WrongVarFormat = 10,
- /// <summary>
- /// Wrong number of received bytes
- /// </summary>
- WrongNumberReceivedBytes = 11,
- /// <summary>
- /// Error on send data
- /// </summary>
- SendData = 20,
- /// <summary>
- /// Error on read data
- /// </summary>
- ReadData = 30,
- /// <summary>
- /// Error on write data
- /// </summary>
- WriteData = 50
- }
- /// <summary>
- /// Types of memory area that can be read
- /// </summary>
- public enum DataType
- {
- /// <summary>
- /// Input area memory
- /// </summary>
- Input = 129,
- /// <summary>
- /// Output area memory
- /// </summary>
- Output = 130,
- /// <summary>
- /// Merkers area memory (M0, M0.0, ...)
- /// </summary>
- Memory = 131,
- /// <summary>
- /// DB area memory (DB1, DB2, ...)
- /// </summary>
- DataBlock = 132,
- /// <summary>
- /// Timer area memory(T1, T2, ...)
- /// </summary>
- Timer = 29,
- /// <summary>
- /// Counter area memory (C1, C2, ...)
- /// </summary>
- Counter = 28
- }
- /// <summary>
- /// Types
- /// </summary>
- public enum VarType
- {
- /// <summary>
- /// S7 Bit variable type (bool)
- /// </summary>
- Bit,
- /// <summary>
- /// S7 Byte variable type (8 bits)
- /// </summary>
- Byte,
- /// <summary>
- /// S7 Word variable type (16 bits, 2 bytes)
- /// </summary>
- Word,
- /// <summary>
- /// S7 DWord variable type (32 bits, 4 bytes)
- /// </summary>
- DWord,
- /// <summary>
- /// S7 Int variable type (16 bits, 2 bytes)
- /// </summary>
- Int,
- /// <summary>
- /// DInt variable type (32 bits, 4 bytes)
- /// </summary>
- DInt,
- /// <summary>
- /// Real variable type (32 bits, 4 bytes)
- /// </summary>
- Real,
- /// <summary>
- /// String variable type (variable)
- /// </summary>
- String,
- /// <summary>
- /// String variable type (variable)
- /// </summary>
- StringEx,
- /// <summary>
- /// Timer variable type
- /// </summary>
- Timer,
- /// <summary>
- /// Counter variable type
- /// </summary>
- Counter
- }
- }
|