home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 27 / IOPROG_27.ISO / SOFT / S5JAVA.ZIP / readme < prev    next >
Encoding:
Text File  |  1999-02-23  |  2.8 KB  |  95 lines

  1. <HTML><HEAD></HEAD><BODY><PRE>
  2.  
  3. Hi folks, here are some english documentation to s5 in Java:
  4. ============================================================
  5.  
  6. The s5 applet simulates a mini subset of a S5 like plc. If you don't
  7. know what a plc or s5 is, it is maybe very difficult for you to
  8. understand, what I am talking about... We will see...
  9.  
  10. A plc is a special computer for controling all kinds of hardware like
  11. motors, switches, pumps, elevators, production systems etc.
  12.  
  13. It has inputs and outputs in digital and analog format. Inside the
  14. plc is a loaded program running, that makes logic decisions and toggles
  15. the outputs, based on the program code and the input states.
  16.  
  17. The program consists of operations and operands and addresses.
  18. The address of a operand is divided in a module number and a bit number
  19. of the module. Both numbers are separated by a decimal point.
  20. A address looks like 0.0 or 0.7...
  21.  
  22. This are the operations:
  23.  
  24. U    - And
  25. UN    - And Not
  26. O    - Or
  27. ON    - Or Not
  28. S    - Set
  29. R    - Set Back
  30. L    - Load
  31. =    - Set to
  32. BE    - End of program
  33.  
  34.  
  35. This are the operands:
  36.  
  37. Bit varaibles        All only 0.0 to 0.7
  38. E    - Inputs
  39. A    - Outputs
  40. M    - Marker
  41.  
  42. Word type variables
  43. T    - Timer        0 to 2
  44. Z    - Counter    0 to 2
  45. K    - Constant to load into accu variable ( LK14.0 )
  46.  
  47. YY    - Year
  48. YN    - Month
  49. YW    - Week of the year
  50. YD    - Day
  51. YO    - Day of the week (Sun=0...Fri=5,Sat=6)
  52. YH    - Hour
  53. YM    - Minute
  54. YS    - Second
  55.  
  56. Inside the plc is a accu variable, that can be loadled with L K <value>.0 .
  57. The accu content can then by loaded into a timer or counter with:
  58. S Z 0 0    - Set counter 0 to accu content
  59. S T 2 0    - Set timer 2 to accu content
  60. The timer are only pseudo timers, since they are decreased after each
  61. complete program cycle until they reach zero.
  62.  
  63. The are also 4 important variables, that the program maintains internal:
  64.  
  65. b_vka    - Is the logic result if the operand in this program line
  66.       ex: if E 0.0 is true, b_vka is true. Otherwise b_vka is false
  67. b_vkb    - Is the logic result of b_vka and the operation
  68.       ex: U E 0.0 is true if E 0.0 is true and the last logic result
  69.               in b_vkl is also true. Otherwise it is false
  70.           ex: O E 0.0 is true if E 0.0 is true or  the last logic...understood?
  71. b_vkl    - Contains the b_vkb from the program line before
  72. b_vku    - Is needed for U operations...
  73.  
  74. So one simple example program:
  75.  
  76. program lines    b_vka    b_vkb    b_vkl    A 0.0
  77. UN A 0 0    0    1    1    0
  78. = A 0 0        0    1    1    1
  79. BE
  80. UN A 0 0    1    0    0    1    
  81. = A 0 0        1    0    0    0
  82.  
  83. So A 0.0 will toggle between 0 and 1...
  84.  
  85. On the right side of the applet, is space for a hardware simulation
  86. area. Currently 0 and 1 is implemented. You can switch to this with:
  87. L K 0 7    - The bit numer must be 7! The module number is the the area.
  88. L K 1 7
  89.  
  90. Hope that helps you a litte...
  91. Best regards
  92. Peter Sieg
  93. mailto: Peter.Sieg@gmx.de
  94.  
  95. </PRE></BODY></HTML>