Tuesday, 20 March 2012

New - QuickServer - Low Priced Gateways

Good news! Buildings and Industrial automation integrators can now use the new, high performance and low-cost QuickServer to interface devices with ease!



FS-QS-1010-XXXX                                                     FS-QS-1011-XXXX


There are two QuickServer designs.

FS-QS-1010 is BTL Marked and it includes two serial ports (up to 115K baud) and one Ethernet port (10/100 RJ45). This allows it to communicate serial to serial, serial to Ethernet or Ethernet to Ethernet.

FS-QS-1011 includes one serial port (up to 115K baud), one Ethernet port (10/100 RJ45) and one FTT-10 LonWorks port. This allow s it to communicate serial to serial, serial to Ethernet, Ethernet to Ethernet, serial to LonWorks or Ethernet to LonWorks.

Key Features:
  • Multi-configuration capability; specific configurations selectable via DIP switches or software.
  • Ability to interface up to 250 points of common BAS protocols.
  • Same firmware as our industry proven devices.
  • BACnet COV support for fast data communication while reducing traffic over a BACnet network
  • Capacity of 250 LonWorks network variables - almost 5 times more than competition - FS-QS-1011 Series
  • Flat panel mount standard, DIN rail mount option
  • Free BACnet Explorer worth $595 with purchase that include a BACnet driver.

QuickServer can configure a combination of drivers such as Modbus RTU, Modbus TCP, BACnet/IP, BACnet MS/TP, LonWorks, JCI Metasys N2 and SNMP
.


BACnet/IP
BACnet MS/TP
Modbus TCP Modbus RTU JCI Metasys N2 LonWorks SNMP
BACnet/IP
FS-QS-1010-0285 FS-QS-1010-0237 FS-QS-1010-0104 FS-QS-1010-0122 FS-QS-1011-0131 FS-QS-1010-0333
BACnet MS/TP FS-QS-1010-0285
FS-QS-1010-0419 FS-QS-1010-0367 FS-QS-1010-0309 N/A FS-QS-1010-0694
Modbus TCP FS-QS-1010-0237
FS-QS-1010-0030 FS-QS-1010-0117 FS-QS-1011-0104 FS-QS-1010-0248
Modbus RTU FS-QS-1010-0104 FS-QS-1010-0367
FS-QS-1010-0038 FS-QS-1011-0085 -
JCI Metasys N2 FS-QS-1010-0122 FS-QS-1010-0309 FS-QS-1010-0117 FS-QS-1010-0038
FS-QS-1011-0097 FS-QS-1010-0150
LonWorks FS-QS-1011-0131 N/A FS-QS-1011-0104 FS-QS-1011-0085 FS-QS-1011-0097
FS-QS-1011-0337
SNMP FS-QS-1010-0333 FS-QS-1010-0694 FS-QS-1010-0248 - FS-QS-1010-0150 FS-QS-1011-0337

Monday, 19 March 2012

StuxNet Virus - How to protect your system:

What is StruxNex Virus?
 
All of the vulnerabilities in the Windows operating system have now been patched. As always, it is important to stay current with security updates. Unix-like hosts, such as Linux, BSD, OSX, etc, are not vulnerable Stuxnet. Going further, disabling USB mass storage on control system hosts (needed for some S7 control functions) would prevent an infected flash drive from loading the malware onto mission critical machines. Segregating SCADA & control system hosts from other infrastructure and using access control lists between zones is a good preventative method, but the most effective protection to this attack is white listing or host intrusion prevention systems. Removing or restricting access to shared network folders is also recommended. Up to date anti-virus definitions can identify Stuxnet, but zipped files must be unpacked in order for scans to be completely accurate. Siemens has provided the Sysclean utility, which can be used to remove the infection from a compromised host. It is also important to apply the SIMATIC security updates. And of course, mission-critical servers/systems should never be used for general web browsing, email, etc.

Friday, 16 March 2012

Modbus Practical Help

The FieldServer Modbus RTU drivers offer several function moves that handle 32-bit integers and 32-bit float values. More importantly, these function moves consider all different forms of byte sequencing.

The following table shows the FieldServer function moves that copy two adjacent 16-bit registers to a 32-bit integer value.


Function Keyword Swap Mode Source Bytes Target Bytes
2.i16-1.i32 N/A [ a b ] [ c d ] [ a b c d ]
2.i16-1.i32-s byte and word swap [ a b ] [ c d ] [ d c b a ]
2.i16-1.i32-sb byte swap [ a b ] [ c d ] [ b a d c ]
2.i16-1.i32-sw word swap [ a b ] [ c d ] [ c d a b ]


The following table shows the FieldServer function moves that copy two adjacent 16-bit registers to a 32-bit floating point value:


Function Keyword Swap Mode Source Bytes Target Bytes
2.i16-1.ifloat N/A [ a b ] [ c d ] [ a b c d ]
2.i16-1.ifloat-s byte and word swap [ a b ] [ c d ] [ d c b a ]
2.i16-1.ifloat-sb byte swap [ a b ] [ c d ] [ b a d c ]
2.i16-1.ifloat-sw word swap [ a b ] [ c d ] [ c d a b ]

The following table shows the FieldServer function moves that copy a single 32-bit floating point value to two adjacent 16-bit registers:

Function Keyword Swap Mode Source Bytes Target Bytes
1.float-2.i16 N/A [ a b c d ] [ a b ][ c d ]
1.float-2.i16-s byte and word [ a b c d ] [ d c ][ b a ]
1.float-2.i16-sb byte swap [ a b c d ] [ b a ][ d c ]
1.float-2.i16-sw word swap [ a b c d ] [ c d ][ a b ]


Given the vairous FieldServer function moves, the correct handling of 32-bit data is dependent on choosing the proper one. Observe the following behavior of these FieldServer function moves on the known single-precision decimal float value of 123456.00:

16-bit Values Function Move Result Function Move Result
0×2000 0x47F1 2.i16-1.float 123456.00 1.float-2.i16 0×2000 0x47F1
0xF147 0×0020 2.i16-1.float-s 123456.00 1.float-2.i16-s 0xF147 0X0020
0×0020 0xF147 2.i16-1.float-sb 123456.00 1.float-2.i16-sb 0×0020 0xF147
0x47F1 0×2000 2.i16-1.float-sw 123456.00 1.float-2.i16-sw 0x47F1 0×2000


Notice that different byte and word orderings require the use of the appropriate FieldServer function move. Once the proper function move is selected, the data can be converted in both directions.


Of the many hex-to-floating point converters and calculators that are available in the Internet, very few actually allow manipulation of the byte and word orders. One such utility is located at www.61131.com/download.htm where both Linux and Windows versions of the utilities can be downloaded.

Once installed, the utility is run as an executable with a single dialog interface. The utility presents the decimal float value of 123456.00 as follows:






One can then swap bytes and/or words to analyze what potential endianness issues may exist between Modbus RTU master and slave devices.

Thursday, 15 March 2012

How Real (Floating Point) and 32-bit Data is Encoded in Modbus RTU Messages

The article discusses some of the typical difficulties encountered when handling 32-bit data types via Modbus RTU and offers practical help for solving these problems.
The point-to-point Modbus protocol is a popular choice for RTU communications if for no other reason that it’s basic convenience. The protocol itself controls the interactions of each device on a Modbus network, how device establishes a known address, how each device recognizes its messages and how basic information is extracted from the data. In essence, the protocol is the foundation of the entire Modbus network.

Such convenience does not come without some complications however, and Modbus RTU Message protocol is no exception. The protocol itself was designed based on devices with a 16-bit register length. Consequently, special considerations were required when implementing 32-bit data elements. This implementation settled on using two consecutive 16-bit registers to represent 32 bits of data or essentially 4 bytes of data. It is within these 4 bytes of data that single-precision floating point data can be encoded into a Modbus RTU message.



The Importance of Byte Order

Wednesday, 14 March 2012

What To Take To Site With You Part II



7. Serial Break out box






8. Lcom DB9-Terminal blocks (or similar)
http://www.l-com.com/item.aspx?id=8141 Male and Female


9. DB9 and DB25 make and female connector make-up kits (Solder free)




10. Rx / TX cross cross over.






It is useful to be able to swap the conductors connected to pins 2 and 3. Take a module with you. It is easier than changing the wires.

EG. Ziotek Null Modem Adapter DB25
http://www.cyberguys.com/product-details/?productid=751&rtn=750&core_cross=SEARCH_DETAIL_SIMILAR#page=page-1


11. Terminating Resistors

Take 52.3, 75, 100, 120 and 150 Ohm resistors with you. 0.25 Watt is usually more than enough.

12. Gender Benders








 





 +














13. Ethernet Patch cables

14. Hub

A hub is not a switch. A hub can be used for trouble shooting whereas only as ‘supervised’ switch can. Most switches are not supervised. For more information read Appendix.

Tuesday, 13 March 2012

Modbus on RS485 Advice #9



Advice #9



What can go wrong with 485?

Let's say you adopted all the best practices for installation of the network but you get intermittent or unacceptable performance because of packet loss, noise, collisions … Then you should consider hiring an expert to resolve your problems because now you are in the ‘Art’ part of RS485. These are some of the things they will look at.


  • Reflections.
Without a scope and expertise you won't know this is a factor. It is easy and cheap to eliminate. Look at the cable spec. Find the nominal impedance. Buy two resistors of the same value. At each end of the trunk install the resistors between the Tx and Rx terminals. If you don’t have obvious ends of the trunk (because you created a star) then we recommend re-cabling to form a linear trunk or we wish you luck.


Some devices have terminating resistors built into them. If the vendor did a poor job, the default is to have the resistor active and they must be disabled unless they are the terminating devices on the network. Read vendor doc.


  • Biasing, Idle State Biasing, Fail Safe Biasing, Anti Aliasing


There are a whole string of terms uses as synonyms to describe this phenomenon.
To use two wires ( as opposed to full duplex 4 wire) for RS485 each devices transmitter and receiver must be set to an idle state to release the line for others use. Releasing the line means allowing it to ‘float’. It must not be allowed to float at any voltage level so devices have pull up/down resistors to pull the line to an allowable ‘floating’ voltage. (the floating state is also known as the tri-state. ) The load presented by other devices on the network affects this floating so the resistor values may need to be changed depending on the number of devices installed and the values of the pull up/down resistors they are using. (You can imagine how tricky it is going to be to resolve this). If a device floats out of the specified range then to other devices it will look like the floating devices isn’t floating at all. The other devices will think that it is transmitting or receiving and thus blocking the line.



The simplest way of knowing if this is a factor – Does the device work properly when it is the only device on the network ?. When you install it in the full network other devices or this device stops working properly. This device and/or the pull up/down resistors of other devices are candidates for investigation.
A number of vendors have a range of pull up/down resistors installed and allow you to change the selection using software or jumpers.



  • Line Drive On / Off


To use two wires for RS485 each devices transmitter and receiver must be set to an idle state to release the line for others use. When a device wants to send it must grab the line. When it has finished sending it must release the line. You can see there are potential problems here. What happens if one device waits too long after sending its last bit before releasing the line – its possible that the other devices will miss some bits of data.


Advice # 10

Monday, 12 March 2012

Modbus on RS485


Advice #4


 

Take care where you run your cables. It seems obvious not to wind your cable around other cables or sources of electricity / magnetism. People are often surprised to find that the worst source of induced noise are switching DC loads. Another big culprit are Variable Frequency drives.







Advice #5



Cable selection does make a difference.

All cables offer impedance (resistance). Some cables are designed so that the impedance is relatively independent of distance. You want one of these cables. A clue to knowing if you selected one is to look at the cable’s Nominal Impedance. If they quote a number such a 100Ohms you have a good cable. If they quote an impedance per meter/foot you have chosen the wrong kind. Wrong in the sense – to determine the value of terminating resistors now requires measurements and calculations. Choose low capacitance cables. 
 
Can you use Cat5 cable? Yes. Use one pair for Tx,Rx and a conductor from another pair for the ground reference signal. 
 
We recommend these two cables. 
 
Belden 3106A




Multi-Conductor – EIA Industrial RS-485 PLTC/CM 22 AWG stranded (7x30) tinned copper conductors, Datalene® insulation, twisted pairs, overall Beldfoil® shield (100% coverage) plus a tinned copper braid (90% coverage), drain wire, UV resistant PVC jacket. 


 
Belden 3107A




Multi-Conductor - EIA Industrial RS-485 PLTC/CM 22 AWG stranded (7x30) tinned copper conductors, Datalene® insulation, twisted pairs, overall Beldfoil® shield (100% coverage) plus a tinned copper braid (90% coverage), drain wire, UV resistant PVC jacket.