Guide.txt 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. 1. Introduction..A Word about Shareware
  2. 1.1 What Shareware is
  3. 1.2 Advantages of Registration.
  4. 1.3 Registration of the ModScan Application
  5. 1.4 Licensing Agreement
  6. 1.5 Warranty
  7. 2. ModScan System Requirements
  8. 2.1 Operational Overview
  9. 2.2 System/Cabling Requirements
  10. 3. Installation
  11. 3.1 Making Backups
  12. 3.2 Installing ModScan
  13. 4. Basic Operation
  14. 4.1 MODBUS Protocol
  15. 4.2 Polling Operation
  16. 4.3 Display Parameters
  17. 5. Menu Selections
  18. 5.1 Setup
  19. 5.2 Display Options
  20. 5.3 Monitoring Serial Data
  21. 6. Technical Support
  22. 6.1 Contacting WinTECH
  23. Introduction..A Word about Shareware
  24. What is Shareware
  25. Shareware is a distribution method, not a type of software.
  26. Shareware products may be freely distributed among potential
  27. users with each user given an opportunity to fully evaluate
  28. the software over a specified period of time. This distribution
  29. method gives users a chance to try software before buying it.
  30. If the particular shareware application provides a service
  31. which the user wishes to continue beyond the specified evaluation
  32. period, a registration payment to the software author is required.
  33. Copyright laws apply to both Shareware and commercial software,
  34. and WinTECH Software retains all rights to its software products
  35. with the following exception:
  36. WinTECH Software specifically grants the right to copy and
  37. distribute unregistered copies of the ModScan Application to all
  38. interested parties for an evaluation period not to exceed thirty-days.
  39. Advantages of Registration
  40. The Shareware distribution system depends upon the integrity of
  41. the user to make the required registration payment only if the
  42. application proves itself useful. Shareware products have the
  43. ultimate money-back guarantee--if the product is not used, no
  44. payment is required. Registration of Shareware products support
  45. this system of distribution and allow continued development of
  46. low-cost high quality software solutions.
  47. Registration of the ModScan Application
  48. Unregistered copies of the ModScan Application are functionally
  49. equivalent to registered copies with the following exception:
  50. To encourage registration, a limit is placed on the amount of time
  51. data may be collected during a monitoring session. This limit
  52. does not effect the ability of a user to fully evaluate either
  53. the functionality or through-put of the application.
  54. Registration of the ModScan Application requires a registration
  55. fee of $49.95 be submitted to WinTECH Software. The user shall
  56. receive in return the most recent registered version of ModScan
  57. with all time limit constraints and registration reminder screens
  58. disabled. The user shall also receive a printed user manual,
  59. and free technical support for a period of three months after
  60. registration. Registered users also have direct access to the
  61. ModScan design engineer and a commitment from WinTECH to consider
  62. product enhancements based on individual application requirements.
  63. In other words, if you can think of anything which would make your
  64. life easier, let us know. If it has general marketing appeal,
  65. chances are it could be included in the next revision.
  66. Licensing Agreement
  67. Registered WinTECH software is protected by both United States
  68. Copyright Law and International Treaty provisions. Therefore,
  69. you must treat this software just like a book with the following
  70. single exception. WinTECH Software authorizes you to make
  71. archival copies of the software for the sole purpose of backing-up
  72. your software and protecting your investment from loss.
  73. By saying "just like a book", WinTECH means for example that this
  74. software may be used by any number of people and may be freely
  75. moved from one computer location to another so long as there is
  76. no possibility of it being used at two locations at the same time.
  77. Execution of two copies of the same registered ModScan application
  78. at the same time constitutes a Copyright violation and is expressly
  79. prohibited.
  80. Warranty
  81. With respect to the physical diskette and physical documentation
  82. enclosed herein, WinTECH Software warrants the same to be free of
  83. defects in materials and workmanship for a period of 30 days
  84. from the date of registration. In the event of notification within
  85. the warranty period of defects in material or workmanship, WinTECH
  86. will replace the defective diskette or documentation.
  87. WinTECH Software disclaims all other warranties, expressed or implied,
  88. including without limitation, the warranties or merchantability
  89. and of fitness for any purpose. WinTECH Software assumes no
  90. liability for damages, direct or consequential, which may result
  91. from the use of this program.
  92. ModScan System Requirements
  93. Operational Overview
  94. ModScan is a Windows application designed to operate as a master
  95. communications device, polling one or more slave devices according
  96. to the MODBUS protocol defined by Gould Modicon. ModScan operates
  97. using the standard Windows COM drivers and communicates using the
  98. electrical protocol supported by the PC hardware. Windows 3.1,
  99. Windows for Workgroups 3.11, or Windows '95 is required. At least
  100. one free serial port is required.
  101. ModScan was designed to operate as a simple one-on-one testing
  102. application to verify proper slave response to standard MODBUS
  103. query commands. ModScan runs a single polling cycle, configurable
  104. by the user, to access and display data points as required. The
  105. user may select any valid MODBUS slave address and range of data
  106. points to scan.
  107. System/Cabling Requirements
  108. This manual assumes an RS-232 based communications system is to
  109. be used to connect the ModScan application directly to a single
  110. MODBUS slave device. In this simple configuration, the cabling
  111. requirements are defined by the RS-232 standard and the control
  112. signals required by the particular slave device. The application
  113. supports RTS/CTS, and DSR/DCD/DTR operation, although these signals
  114. are not required for ModScan operation. If required by the slave
  115. device, these signals may wired as shown in cable drawing 2.2.1
  116. or jumpered out at the slave end of the cable as shown in
  117. drawing 2.2.2.
  118. Installation
  119. Making Backups
  120. The distribution diskette is not copy-protected, and the registered
  121. user may make backup copies as required. The ModScan application
  122. may be moved from one PC to another so long as the basic licensing
  123. agreement of only one copy in use at a time is maintained. Site
  124. licenses are available for commercial users by contacting WinTECH
  125. Software.
  126. Installing ModScan
  127. Installation of the ModScan Application involves simply copying
  128. the ModScan.exe & ModScan.hlp files from the distribution diskette
  129. to a working directory on the hard disk. After running the
  130. application for the first time, a configuration file will be
  131. created on the working directory. ModScan.cfg represents the
  132. user configurable selections, (slave address, data point type. etc.),
  133. in effect at the time the program terminated. These settings will
  134. be restored the next time ModScan is started.
  135. ModScan may be started from the program manager, file manager,
  136. or program group icon. Consult the Windows user's manual for
  137. details.
  138. Basic Operation
  139. The MODBUS Protocol
  140. The MODBUS protocol describes an industrial communications and
  141. distributed control system developed by Gould-Modicon to integrate
  142. PLC's, computers, terminals, and other monitoring, sensing, and
  143. control devices. MODBUS is a Master/Slave communications
  144. protocol, whereby one device, (the Master), controls all serial
  145. activity by selectively polling one or more slave devices. The
  146. protocol provides for one master device and up to 247 slave
  147. devices on a common line. Each device is assigned an address
  148. to distinguish it from all other connected devices.
  149. Certain characteristics of the MODBUS protocol are fixed, such as
  150. the frame format, frame sequences, handling of communications errors
  151. and exception conditions, and the functions performed.
  152. Other characteristics are user selectable. These include a choice
  153. of transmission mediasetup_serial, baud rate, character parity,
  154. number of stop bits, and the transmission modes, (ASCII or RTU).
  155. The user selected parameters are set, (hardwired or programmed),
  156. at each station. These parameters cannot be changed while the
  157. system is running.
  158. The mode of transmission is the structure of the individual units
  159. of information within a message, and the numbering system used to
  160. transmit the data. Two modes of transmission are available for
  161. use in a MODBUS system. Both modes provide the same capabilities
  162. for communicating with PLC slaves; the mode is selected depending
  163. on the equipment used as a MODBUS Master. One mode must be used
  164. per MODBUS system; mixing of modes is not allowed. The modes
  165. are ASCII (American Standard Code for Information Interchange),
  166. and RTU, (Remote Terminal Unit.)
  167. ASCII printable characters are easy to view when troubleshooting
  168. and this mode is suited to computer masters programmed in a high
  169. level language, such as FORTRAN, as well as PLC masters. RTU
  170. is suited to computer masters programmed in a machine language,
  171. as well as PLC masters.
  172. In the RTU mode, data is sent in 8-bit binary characters. In
  173. the ASCII mode, each RTU character is first divided into two 4-bit
  174. parts, (high order and low order), and then represented by the
  175. hexadecimal equivalent. The ASCII characters representing the
  176. hexadecimal characters are used to construct the message. The
  177. ASCII mode uses twice as many characters as the RTU mode, but
  178. decoding handling the ASCII data is easier. Additionally, in
  179. the RTU mode, message characters must be transmitted in a
  180. continuous stream. In the ASCII mode, breaks of up to one
  181. second can occur between characters to allow for a relatively
  182. slower master.
  183. Polling Operation
  184. Only the master initiates a transaction. Transactions are either
  185. a query/response type, (only a single slave is address), or a
  186. broadcast/no response type, (all slaves are addressed). A
  187. transaction comprises a single query and single response frame
  188. or a single broadcast frame.
  189. ASCII Framing
  190. Framing in ASCII Transmission mode is accomplished by the use of
  191. the unique colon, (:), character to indicate the beginning of frame
  192. and carriage return/line feed, (CRLF), to delineate end of frame.
  193. The line feed character also serves as a synchronizing character
  194. which indicates that the transmitting station is ready to receive
  195. an immediate reply.
  196. RTU Framing
  197. Frame synchronization can be maintained in RTU transmission mode
  198. only by simulating a synchronous message. The receiving device
  199. monitors the elapsed time between receipt of characters. If
  200. three and one-half character times elapse without a new character
  201. or completion of the frame, then the device flushes the frame
  202. and assumes that the next byte received will be an address.
  203. The address field immediately follows the beginning of frame and
  204. consists of 8-bits, (RTU), or 2 characters, (ASCII). These bits
  205. indicate the user assigned address of the slave device that is to
  206. receive the message sent by the attached master.
  207. Each slave must be assigned a unique address and only the addressed
  208. slave will respond to a query that contains its address. When the
  209. slave sends a response, the slave address informs the master which
  210. slave is communicating. In a broadcast message, an address of 0 is
  211. used. All slaves interpret this as an instruction to read and take
  212. action on the message, but not to issue a response message.
  213. Function Field
  214. The Function Code field tells the addressed slave what function to
  215. perform. MODBUS function codes are specifically designed for
  216. interacting with a PLC on the MODBUS industrial communications
  217. system. The high order bit in this field is set by the slave
  218. device to indicate an exception condition in the response message.
  219. If no exceptions exist, the high-order bit is maintained as zero in
  220. the response message.
  221. Data Field
  222. The data field contains information needed by the slave to perform
  223. the specific function or it contains data collected by the slave
  224. in response to a query. This information may be values, address
  225. references, or limits. For example, the function code tells the
  226. slave to read a holding register, and the data field is needed to
  227. indicate which register to start at and how many to read. The
  228. imbedded address and data information varies with the type and
  229. capacity of the PLC associated with the slave.
  230. Error Check Field
  231. This field allows the master and slave devices to check a message
  232. for errors in transmission. Sometimes, because of electrical noise
  233. or other interference, a message may be changed slightly while its
  234. on its way from one device to another. The error checking assures
  235. that the slave or master does not react to messages that have
  236. changed during transmission. This increases the safety and the
  237. efficiency of the MODBUS system.
  238. The error check field uses a Longitudinal Redundancy Check, (LRC),
  239. in the ASCII mode of transmission, and a CRC-16 check in the RTU mode.
  240. Display Parameters
  241. The display of the ModScan application consists of two parts. The
  242. top half of the display represents the addressing information which
  243. specifies the remote slave device and data point type to scan.
  244. Edit controls allow specification of the slave device identification,
  245. point type, and point addressing information used for the scanning
  246. operation. These controls may be modified at any time, including an
  247. ctive scanning session. Modification of these values during a
  248. scanning session will influence the next poll.
  249. Immediately above the horizontal line separating the addressing data
  250. from the actual data point display is a status line representing
  251. current activity of the ModScan application. During an active
  252. polling session, this line will represent any exception responses
  253. received from the addressed slave or any communications errors which
  254. may result from an invalid address specification or disconnected
  255. serial line.
  256. To the right of the display are two counters representing the number
  257. of query messages attempted and the number of valid responses received.
  258. During an active polling session, ModScan will attempt to poll the
  259. specified slave device periodically depending on the poll cycle
  260. selected. These counters may be reset via a menu command and are
  261. useful for picking up intermittent failures over an extended period
  262. of time.
  263. The bottom half of the display typically represents the results of
  264. the most recent data scan.
  265. If ModScan is configured to display MODBUS data points, Coil values
  266. will be displayed as below. ON status is displayed as '1', OFF as '0'.
  267. ModScan will attempt to display all data points defined by the Length
  268. parameter in the address specification using the available Window
  269. display area.
  270. Register values may be displayed in either Decimal or Hexadecimal
  271. notation. The address of each data point is followed by the contents
  272. as shown below: (Hexadecimal notation would include an 'H' after the
  273. value such as 1000H.)
  274. In order to write a MODBUS data point in a slave device, the
  275. communications with the device must first be initiated by scanning
  276. a series of data points by configuring the correct addressing
  277. information and initiating a polling cycle. Once the data is
  278. successfully displayed on the screen, double-clicking the
  279. address/value portion of the screen will initiate a dialog box which
  280. allows the value to be changed. If the polling cycle has been
  281. configured to represent coil addresses, double-clicking an address
  282. will initiate the Change Coil Dialog:
  283. The Change Register Dialog Box may be initiated by configuring the
  284. display to represent register data and double clicking on an address:
  285. Pressing the Update Button in either write data point dialog will
  286. initiate the appropriate MODBUS write command, (05 or 06), during
  287. the next scheduled poll.
  288. Menu Selections
  289. Setup
  290. The SetUp Serial menu command allows the user to control the
  291. physical characteristics of the MODBUS connection. The PC COM port
  292. to use may be selected, as well as the baud rate, number of stop bits,
  293. and parity. The RTU transmission mode dictates that 8 data bits
  294. are used while the ASCII mode of transmission allows either 7 or 8
  295. data bits to be used, (even though the eighth bit is not used).
  296. The RS-232 handshaking lines may be configured by checking the
  297. appropriate boxes depending on the characteristics required by
  298. the connected slave device.
  299. The Setup Protocol Menu commands allow the user to specify either
  300. RTU or ASCII transmission modes. The transmission mode may not be
  301. changed while an active session is in progress. The polling cycle
  302. must be stopped before these menu options are activated.
  303. The polling cycle and associated message time-out are also
  304. configurable via the Setup Protocol Menu Commands. The polling
  305. cycle represents the time delay between successive polls and is
  306. specified in seconds:
  307. The message time-out determines how long the ModScan application
  308. waits for a response from an addressed slave device and is specified
  309. in milliseconds:
  310. These menu commands initiate or stop a ModScan polling cycle. The
  311. Start Polling Menu command begins a repetitive cycle of polling
  312. the slave device specified in the addressing section of the display.
  313. The device to poll and the point type and addressing parameters may
  314. be changed at any time during a polling cycle. As data is received
  315. from the slave device, it is displayed in the data point section
  316. of the screen. The Stop Polling Menu selection simply halts the
  317. polling process and returns the ModScan application to an Idle condition.
  318. Display Options
  319. The SetUp Display Menu consists of four line items representing
  320. two mutually exclusive options. The display may be configured to
  321. display data points or serial traffic by clicking on the appropriate
  322. menu selection. The option in effect is represented by a check mark.
  323. Likewise, register data may be displayed in either decimal or
  324. hexadecimal notation depending on the menu item selected. To
  325. change from one notation to the other, simply click the unchecked
  326. option.
  327. Monitoring Serial Data
  328. In certain cases, it may be desirable to monitor the actual MODBUS
  329. communications between the ModScan application and a particular
  330. slave device. The application allows the serial data traffic to
  331. be displayed to the screen as it occurs by selecting the View
  332. Traffic option under the Setup DisplayMenu Command options. If
  333. enabled, the bottom portion of the ModScan display will depict
  334. all serial data characters transmitted and received as they occur.
  335. Transmitted characters are displayed in reverse video, received
  336. characters are displayed in normal video. Display of the actual
  337. serial traffic is sometimes useful for troubleshooting an
  338. intermittent communications fault or debugging a new design.
  339. Technical Support
  340. Contacting WinTECH
  341. If it ever becomes necessary to contact WinTECH concerning a
  342. technical question or to offer comments or suggestions for
  343. improving the Listen application please call or write to the
  344. ddress below:
  345. WinTECH Software
  346. P.O.Box 907
  347. Lewisburg, WV 24901
  348. (304) 645-5966
  349. For quickest response, email questions/comments to:
  350. modscan@win-tech.com