home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / MATH / VISSIM.ZIP / MUX4.VSM < prev    next >
Text File  |  1994-02-28  |  4KB  |  177 lines

  1. ; VisSim Block Diagram Format (VBDF)
  2. ; Copyright (C) 1989-1994 Visual Solutions
  3. PV=1.500
  4. PS=0
  5. PE=2
  6. PP=0.01
  7. PI=170
  8. PX=0.01
  9. PN=1e-006
  10. PL=5
  11. PT=1e-005
  12. Pn=-8,4,14,"Times New Roman"
  13. Pc=54
  14. Po=0.01,50,664
  15. PD=800x600
  16. Pf=0x0
  17. Pr="stub"
  18. Ps=800,0,0,552,0,0
  19. PM=1,1,1,1
  20. N.1="comment"*28x1*168x23<M>
  21. C="Mux4: 4 Channel Multiplexer Model:
  22. Takes the 4-inputs in the \"top-down\" order in which they occur and apply them to the output every \"dt\" seconds.  If you need more channels, just add the extra inputs, set the parameter n equal to the number of inputs, duplicate the \"Ch. #\" compound blocks as required and feed their outputs to the summer.   
  23.  
  24. Limitations:
  25. 1.  Always verify that \"dt\"  is greater than the simulation time step. 
  26. 2.   Also the Channel counter circuit (which computes cc) may have counter overshoot (to n+1) when using RK2, trapeziodal, or Euler integrators- the term \"dt * .1\" fed to the summer is provided to prevent this, however, if it doesnt you may need to increase the \".1\" gain slightly.
  27. "
  28. N.2="wireLabel"*27x62<M>
  29. n="==== Parameters ===="
  30. N.3="const"(4)*27x65<M>
  31. N.4="variable"*46x65<M>
  32. n=":n"
  33. N.5="variable"*46x68<M>
  34. n=":dt"
  35. N.6="const"(0.1)*27x68<M>
  36. N.7="wireLabel"*112x51<M>
  37. n="Calculate Channel Counter, cc"
  38. N.8="resetIntegrator"(0,0)*99x53<M>
  39. N.9="const"(1)*87x53<M>
  40. N.10="variable"*84x63<M>
  41. n=":n"
  42. N.11="variable"*82x68<M>
  43. n=":dt"
  44. N.12="*"*100x63<M>
  45. N.13="const"(0)*87x57<M>
  46. N.14="variable"*118x57<M>
  47. n=":dt"
  48. N.15="/"*132x55<M>
  49. N.16="quantize"(1)*144x56<M>
  50. N.17="variable"*177x58<M>
  51. n=":cc"
  52. N.18="summingJunction"*160x57<M>
  53. N.19="const"(1)*147x60<M>
  54. N.20="crossDetect"(0)*78x73<MR>
  55. N.21="summingJunction"*120x62#3,1<M>
  56. N.22="gain"(0.1)*46x71<M>
  57. N.23="gain"(0.1)*100x68<M>
  58. N.24="Compound"*0x0#4,1<C>
  59. n="       4
  60.   Channel
  61. Multiplexer"
  62. Ms=1600,0,0,1105,0,0
  63. N.25="variable"*6x8<M>
  64. n=":x1"
  65. N.26="variable"*6x28<M>
  66. n=":x2"
  67. N.27="variable"*6x47<M>
  68. n=":x3"
  69. N.28="variable"*6x67<M>
  70. n=":x4"
  71. N.29="=="*75x16<M>
  72. N.30="const"(1)*63x16<M>
  73. N.31="merge"*103x36<M>
  74. N.32="const"(0)*79x48<M>
  75. N.33="Compound"*60x27#2,1<MC>
  76. n="Ch. 1"
  77. Ms=1600,0,0,1105,0,0
  78. N.34="Compound"*63x32#2,1<MC>
  79. n="Ch. 2"
  80. Ms=1600,0,0,1105,0,0
  81. N.35="=="*76x16<M>
  82. N.36="const"(2)*64x16<M>
  83. N.37="merge"*96x36<M>
  84. N.38="const"(0)*81x49<M>
  85. N.39="Compound"*66x37#2,1<MC>
  86. n="Ch. 3"
  87. Ms=1600,0,0,1105,0,0
  88. N.40="=="*72x16<M>
  89. N.41="const"(3)*52x16<M>
  90. N.42="merge"*94x36<M>
  91. N.43="const"(0)*76x45<M>
  92. N.44="Compound"*69x42#2,1<MC>
  93. n="Ch. 4"
  94. Ms=1600,0,0,1105,0,0
  95. N.45="=="*76x16<M>
  96. N.46="const"(4)*61x16<M>
  97. N.47="merge"*102x36<M>
  98. N.48="const"(0)*81x52<M>
  99. N.49="summingJunction"*111x31#4,1<M>
  100. N.50="variable"*37x27<M>
  101. n=":cc"
  102. N.51="variable"*37x29<M>
  103. n=":x1"
  104. N.52="variable"*36x34<M>
  105. n=":x2"
  106. N.53="variable"*36x39<M>
  107. n=":x3"
  108. N.54="variable"*37x44<M>
  109. n=":x4"
  110. I.4.i1=3.o1
  111. I.5.i1=6.o1
  112. I.8.i1=9.o1
  113. I.8.i2=20.o1
  114. I.8.i3=13.o1
  115. I.12.i1=10.o1
  116. I.12.i2=11.o1
  117. I.15.i1=8.o1
  118. I.15.i2=14.o1
  119. I.16.i1=15.o1
  120. I.17.i1=18.o1
  121. I.18.i1=16.o1
  122. I.18.i2=19.o1
  123. I.20.i1=21.o1
  124. f21.1.i=-
  125. I.21.i1=8.o1
  126. I.21.i2=12.o1
  127. f21.3.i=-
  128. I.21.i3=23.o1
  129. I.22.i1=6.o1
  130. I.23.i1=11.o1
  131. G.24=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,25,26,27,28,33,34,39,44,49,50,51,52,53,54,
  132. I.24.o1=49.o1
  133. I.25.i1=24.i1
  134. I.26.i1=24.i2
  135. I.27.i1=24.i3
  136. I.28.i1=24.i4
  137. I.29.i1=30.o1
  138. I.29.i2=33.i1
  139. I.31.i1=29.o1
  140. I.31.i2=33.i2
  141. I.31.i3=32.o1
  142. G.33=29,30,31,32,
  143. I.33.o1=31.o1
  144. I.33.i1=50.o1
  145. I.33.i2=51.o1
  146. G.34=35,36,37,38,
  147. I.34.o1=37.o1
  148. I.34.i1=50.o1
  149. I.34.i2=52.o1
  150. I.35.i1=36.o1
  151. I.35.i2=34.i1
  152. I.37.i1=35.o1
  153. I.37.i2=34.i2
  154. I.37.i3=38.o1
  155. G.39=40,41,42,43,
  156. I.39.o1=42.o1
  157. I.39.i1=50.o1
  158. I.39.i2=53.o1
  159. I.40.i1=41.o1
  160. I.40.i2=39.i1
  161. I.42.i1=40.o1
  162. I.42.i2=39.i2
  163. I.42.i3=43.o1
  164. G.44=45,46,47,48,
  165. I.44.o1=47.o1
  166. I.44.i1=50.o1
  167. I.44.i2=54.o1
  168. I.45.i1=46.o1
  169. I.45.i2=44.i1
  170. I.47.i1=45.o1
  171. I.47.i2=44.i2
  172. I.47.i3=48.o1
  173. I.49.i1=33.o1
  174. I.49.i2=34.o1
  175. I.49.i3=39.o1
  176. I.49.i4=44.o1
  177.