kostepper.pd 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. #N canvas 1 55 1918 984 10;
  2. #X obj 85 172 cnv 15 130 100 empty empty Status 2 8 0 14 -233017 -128992
  3. 0;
  4. #X obj 85 277 cnv 15 130 100 empty empty MANUEL 2 8 0 14 -233017 -128992
  5. 0;
  6. #X obj 220 172 cnv 15 180 205 empty empty Move 2 8 0 14 -233017 -128992
  7. 0;
  8. #X obj 65 9 r /fromOSC;
  9. #X floatatom 135 213 10 0 0 0 - - -, f 10;
  10. #X floatatom 135 231 10 0 0 0 - - -, f 10;
  11. #X floatatom 135 249 10 0 0 0 - - -, f 10;
  12. #X text 95 213 target;
  13. #X text 101 231 speed;
  14. #X text 83 249 maxspeed;
  15. #X obj 110 54 print stepper\$1;
  16. #N canvas 1 55 450 300 filter\$1 0;
  17. #X obj 60 41 t a a;
  18. #X obj 92 89 == \$1;
  19. #X obj 60 132 spigot;
  20. #X msg 92 67 \$1;
  21. #X obj 60 21 inlet;
  22. #X obj 60 153 outlet;
  23. #X connect 0 0 2 0;
  24. #X connect 0 1 3 0;
  25. #X connect 1 0 2 1;
  26. #X connect 2 0 5 0;
  27. #X connect 3 0 1 0;
  28. #X connect 4 0 0 0;
  29. #X restore 65 29 pd filter\$1;
  30. #N canvas 123 519 450 300 conversion 0;
  31. #X obj 97 9 inlet;
  32. #X obj 97 30 unpack f f f f f;
  33. #X obj 97 94 outlet;
  34. #X obj 120 134 outlet;
  35. #X obj 143 174 outlet;
  36. #X obj 166 214 outlet;
  37. #X obj 190 254 outlet;
  38. #X obj 97 75 steps2camrot;
  39. #X obj 120 115 steps2camrot;
  40. #X obj 143 155 steps2camrot;
  41. #X obj 166 195 steps2camrot;
  42. #X obj 190 235 steps2camrot;
  43. #X connect 0 0 1 0;
  44. #X connect 1 0 7 0;
  45. #X connect 1 1 8 0;
  46. #X connect 1 2 9 0;
  47. #X connect 1 3 10 0;
  48. #X connect 1 4 11 0;
  49. #X connect 7 0 2 0;
  50. #X connect 8 0 3 0;
  51. #X connect 9 0 4 0;
  52. #X connect 10 0 5 0;
  53. #X connect 11 0 6 0;
  54. #X restore 65 96 pd conversion;
  55. #X obj 65 74 route /status /onTarget;
  56. #X obj 180 282 vsl 12 60 0 2 0 0 /stepper/\$1/manualSpeed /stepper/\$1/manualSpeed
  57. speed -10 70 0 10 -262144 -1 -1 5900 1;
  58. #X obj 105 344 hradio 15 1 0 2 /stepper/\$1/manualDirection /stepper/\$1/manualDirection
  59. direction -10 22 0 10 -262144 -1 -1 0;
  60. #X obj 270 175 bng 25 250 50 0 /stepper/\$1/move/go /stepper/\$1/move/go
  61. GO 6 13 0 10 -4034 -1 -1;
  62. #X obj 1712 862 tof/menubutton 100 25 \$0-mbS \$0-mbR 1 grey90 black
  63. grey95 black 0 \, none \, test (autre copie).move \, test.move \, test (3e copie).move
  64. \, test (4e copie).move \, test (copie).move;
  65. #X obj 1486 706 list prepend add;
  66. #X obj 1486 727 list trim;
  67. #X obj 1482 606 ofGetPatchDirectory;
  68. #X obj 1482 531 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
  69. -1 -1;
  70. #X text 1503 531 get the list of file names in a directory.;
  71. #X msg 1483 654 symbol \$1/moves;
  72. #X symbolatom 1482 627 50 0 0 0 - - -, f 50;
  73. #X obj 1809 602 print;
  74. #X obj 1491 684 ofGetDirectoryFileNames move;
  75. #N canvas 421 242 906 607 \$0-osc 0;
  76. #X obj 44 54 kollabs/osc_bi \$2 /stepper/\$1/driveMode;
  77. #X obj 44 144 kollabs/osc_bi \$2 /stepper/\$1/move;
  78. #X obj 44 164 kollabs/osc_bi \$2 /stepper/\$1/moveTo;
  79. #X obj 44 224 kollabs/osc_bi \$2 /stepper/\$1/setSpeed;
  80. #X obj 44 244 kollabs/osc_bi \$2 /stepper/\$1/setMaxSpeed;
  81. #X obj 44 264 kollabs/osc_bi \$2 /stepper/\$1/acceleration;
  82. #X obj 44 74 kollabs/osc_bi \$2 /stepper/\$1/accMode;
  83. #X obj 44 94 kollabs/osc_bi \$2 /stepper/\$1/manualDrive;
  84. #X obj 44 35 kollabs/osc_bi \$2 /stepper/\$1/updateStatus;
  85. #X obj 44 304 kollabs/osc_bi \$2 /stepper/\$1/sequences/list;
  86. #X obj 44 354 kollabs/osc_bi \$2 /stepper/\$1/pos/current;
  87. #X obj 44 374 kollabs/osc_bi \$2 /stepper/\$1/pos/current/deg;
  88. #X obj 533 37 loadbang;
  89. #X obj 533 58 f \$1;
  90. #X msg 532 79 \; /stepper/\$1/accMode 0 \; /stepper/\$1/manualDrive
  91. 0 \; /stepper/\$1/setSpeed 1 \; /stepper/\$1/setMaxSpeed 1 \; /stepper/\$1/acceleration
  92. 1;
  93. #X connect 12 0 13 0;
  94. #X connect 13 0 14 0;
  95. #X restore 346 384 pd \$0-osc;
  96. #X obj 717 101 route 0 1;
  97. #X obj 717 57 r /stepper/\$1/manualDrive;
  98. #X obj 728 124 r /stepper/\$1/accMode;
  99. #X obj 717 78 t f f;
  100. #X obj 717 165 f;
  101. #X msg 742 211 2;
  102. #X obj 717 229 s /stepper/\$1/driveMode;
  103. #X obj 717 186 spigot;
  104. #X obj 750 166 == 0;
  105. #X obj 106 298 tgl 35 0 /stepper/\$1/manualDrive /stepper/\$1/manualDrive
  106. empty 17 7 0 10 -204800 -33289 -1 0 1;
  107. #X obj 365 264 tgl 12 0 /stepper/\$1/accMode empty 0/1 17 7 0 10 -262144
  108. -1 -1 0 1;
  109. #X text 752 29 SET DRIVE MODE;
  110. #X obj 544 490 / 60;
  111. #X obj 544 472 r /stepper/\$1/setMaxSpeed;
  112. #X obj 1340 272 r /stepper/\$1/driveMode;
  113. #X obj 429 574 list prepend;
  114. #X obj 1340 360 pack s f f;
  115. #X obj 1397 335 f \$1;
  116. #X obj 1397 313 loadbang;
  117. #X obj 1340 414 s /toOSC;
  118. #X msg 1340 392 /\$1 \$3 \$2;
  119. #X obj 509 552 r /stepper/\$1/driveMode;
  120. #X text 1360 256 SEND DRIVE MODE;
  121. #X obj 521 452 r /stepper/\$1/move;
  122. #X obj 429 448 f \$1;
  123. #X obj 1311 186 / 60;
  124. #X obj 578 510 / 60;
  125. #X obj 578 492 r /stepper/\$1/acceleration;
  126. #X obj 429 552 pack f f f f;
  127. #X obj 429 593 route 0 1;
  128. #X obj 1242 245 spigot;
  129. #X obj 1325 208 r /stepper/\$1/driveMode;
  130. #X obj 1325 229 == 2;
  131. #X msg 1242 264 setSpeed \$1;
  132. #X obj 728 145 == 0;
  133. #X msg 1340 293 driveMode \$1 \, setSpeed 0;
  134. #X obj 223 292 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/move /stepper/\$1/move
  135. tours 48 8 0 10 -262144 -1 -1 0 256;
  136. #X obj 429 672 list;
  137. #X msg 454 647 move \$2 \$1 \, setSpeed \$3 \$1 \, getStatus \$1 \$1
  138. ;
  139. #X text 1296 23 MANUAL SPEED;
  140. #X obj 1311 162 * 1;
  141. #X obj 1326 142 t b f;
  142. #X obj 1326 102 route 0 1;
  143. #X msg 1326 122 -1;
  144. #X msg 1355 122 1;
  145. #X obj 1326 76 r /stepper/\$1/manualDirection;
  146. #X obj 1311 51 r /stepper/\$1/manualSpeed;
  147. #X obj 168 359 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/manualSpeed /stepper/\$1/manualSpeed
  148. empty 0 -8 0 10 -262144 -1 -1 2 256;
  149. #X obj 315 282 vsl 12 60 0 2 0 0 /stepper/\$1/setMaxSpeed /stepper/\$1/setMaxSpeed
  150. speed -10 70 0 10 -262144 -1 -1 2950 1;
  151. #X obj 303 359 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/setMaxSpeed /stepper/\$1/setMaxSpeed
  152. empty 0 -8 0 10 -262144 -1 -1 1 256;
  153. #X obj 365 282 vsl 12 60 0 2 0 0 /stepper/\$1/acceleration /stepper/\$1/acceleration
  154. acc -2 70 0 10 -233017 -233017 -195568 2950 1;
  155. #X obj 353 359 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/acceleration
  156. /stepper/\$1/acceleration empty 0 -8 0 10 -233017 -233017 -195568 1
  157. 256;
  158. #X obj 1635 858 cnv 15 180 100 empty empty presets 2 8 0 14 -233017
  159. -128992 0;
  160. #X obj 197 175 bng 15 250 50 0 /stepper/\$1/updateStatus /stepper/\$1/updateStatus
  161. refresh -45 8 0 10 -262144 -1 -1;
  162. #X obj 892 162 r /stepper/\$1/updateStatus;
  163. #X obj 892 183 f \$1;
  164. #X msg 892 204 /getStatus \$1;
  165. #X obj 892 225 s /toOSC;
  166. #X text 1427 432 prise en compte du homing;
  167. #X text 1457 449 -> possibilité de placer le moteur en absolu sur
  168. 360° modulo;
  169. #X text 1461 464 -> utilisation facultative du point de départ d'un
  170. move;
  171. #X obj 429 710 s /toOSC;
  172. #X msg 429 691 /\$1 \$3 \$2;
  173. #X obj 429 427 r /stepper/\$1/move/go;
  174. #X obj 720 343 loadbang;
  175. #X obj 298 175 bng 25 250 50 0 /stepper/\$1/stop /stepper/\$1/stop
  176. STOP 1 14 0 10 -258113 -1 -1;
  177. #X obj 892 75 f \$1;
  178. #X msg 892 96 /stop \$1;
  179. #X msg 429 613 acceleration \$4 \$1 \, maxSpeed \$3 \$1 \, move \$2
  180. \$1 \, getStatus \$1 \$1;
  181. #X obj 1482 551 t b b;
  182. #X obj 1487 785 s /stepper/\$1/sequences/list;
  183. #X obj 1676 837 r /stepper/\$1/sequences/list;
  184. #X obj 72 703 stepperCue \$1 0;
  185. #X msg 1510 579 clear \, align 0 \, add none \, set 0;
  186. #X obj 72 803 stepperCue \$1 1;
  187. #X obj 83 127 s /stepper/\$1/pos/current;
  188. #X obj 895 459 r /stepper/\$1/pos/current;
  189. #X obj 895 478 * 360;
  190. #X floatatom 822 490 5 0 0 0 - - -, f 5;
  191. #X obj 339 227 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/move/startPos
  192. /stepper/\$1/move/startPos startPos 0 -8 0 10 -262144 -1 -1 0 256;
  193. #X obj 277 233 bng 15 250 50 0 /stepper/\$1/move/gotoStart /stepper/\$1/move/gotoStart
  194. goto 17 7 0 10 -262144 -1 -1;
  195. #X obj 230 232 bng 15 250 50 0 /stepper/\$1/move/setStart /stepper/\$1/move/setStart
  196. set 17 7 0 10 -262144 -1 -1;
  197. #X obj 870 578 f;
  198. #X obj 870 440 r /stepper/\$1/move/setStart;
  199. #X obj 865 682 r /stepper/\$1/move/gotoStart;
  200. #X obj 870 597 s /stepper/\$1/move/startPos;
  201. #X obj 1169 461 r /stepper/\$1/move/startPos;
  202. #X obj 1145 502 -;
  203. #X obj 1169 481 t b f;
  204. #X text 1175 503 distance currentPos->startPos;
  205. #X obj 1145 562 moses 180;
  206. #X obj 1076 689 steps2camrot;
  207. #X obj 1196 583 - 360;
  208. #X text 1303 595 go backward \, quickest path;
  209. #X floatatom 1227 522 5 0 0 0 - - -, f 5;
  210. #X obj 865 761 list;
  211. #X obj 865 799 s /toOSC;
  212. #X msg 865 780 /\$1 \$3 \$2;
  213. #X obj 865 701 f \$1;
  214. #X obj 1145 670 / 360;
  215. #X obj 865 722 pack 0 0 8000 0;
  216. #X msg 865 742 driveMode 1 \$1 \, move \$2 \$1 \, setSpeed \$3 \$1
  217. \, getStatus \$1 \$1;
  218. #X obj 895 578 s /stepper/\$1/pos/current/deg;
  219. #X obj 1145 440 r /stepper/\$1/pos/current/deg;
  220. #X obj 1145 543 abs;
  221. #X obj 183 196 nbx 3 14 -1e+37 1e+37 0 0 /stepper/\$1/pos/current/deg
  222. /stepper/\$1/pos/current/deg empty 0 -8 0 10 -262144 -1 -1 0 256;
  223. #X obj 1145 522 t f f;
  224. #X obj 1172 607 moses 0;
  225. #X msg 1172 628 360;
  226. #X msg 1202 628 -360;
  227. #X obj 128 195 nbx 5 14 -1e+37 1e+37 0 0 /stepper/\$1/pos/current /stepper/\$1/pos/current
  228. current -45 7 0 10 -262144 -1 -1 0 256;
  229. #X obj 1242 208 steps2camrot;
  230. #X obj 475 508 steps2camrot;
  231. #X obj 452 470 steps2camrot;
  232. #X obj 509 528 steps2camrot;
  233. #X obj 895 497 t f f;
  234. #X obj 922 515 div 360;
  235. #X obj 922 536 * 360;
  236. #X obj 895 555 -;
  237. #X obj 223 308 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/move/deg /stepper/\$1/move/deg
  238. deg 48 8 0 10 -262144 -1 -1 0 256;
  239. #X obj 1073 56 r /stepper/\$1/move;
  240. #X obj 1073 77 * 360;
  241. #X obj 1073 96 s /stepper/\$1/move/deg;
  242. #X obj 1073 116 r /stepper/\$1/move/deg;
  243. #X obj 1073 156 s /stepper/\$1/move;
  244. #X obj 1073 137 / 360;
  245. #X obj 892 56 r /stepper/\$1/move;
  246. #X obj 892 116 s /toOSC;
  247. #X text 925 30 STOP;
  248. #X text 1082 30 MOVE DEGRES CONVERSION;
  249. #X text 909 144 STATUS;
  250. #X text 1011 414 START POSITION MANAGEMENT;
  251. #X text 453 405 MOVE MANAGEMENT;
  252. #X obj 153 97 s /stepper/\$1/pos/onTarget;
  253. #X obj 327 175 cnv 25 70 25 /stepper/\$1/runningGui /stepper/\$1/runningGui
  254. running 7 12 0 14 -260818 -258699 0;
  255. #X obj 720 402 s /stepper/\$1/runningGui;
  256. #X msg 778 332 color 14 13 13 \, label running \, label_pos 7 12;
  257. #X msg 720 384 color 10 11 20 \, label idle \, label_pos 17 12;
  258. #X obj 720 364 r /stepper/\$1/pos/onTarget;
  259. #X obj 778 313 r /stepper/#1/move/go;
  260. #X obj 795 293 r /stepper/\$1/move/gotoStart;
  261. #X text 966 261 GUI COLORS;
  262. #X obj 1071 287 r /stepper/\$1/accMode;
  263. #X obj 1071 308 route 0 1;
  264. #X msg 1071 327 color 10 10 20;
  265. #X msg 1096 348 color 0 22 22;
  266. #X obj 1071 381 s /stepper/\$1/accGUI;
  267. #X obj 436 264 r /stepper/\$1/accGUI;
  268. #X text 227 212 Position depart;
  269. #X text 225 263 Reglages mouvement;
  270. #X connect 3 0 11 0;
  271. #X connect 11 0 10 0;
  272. #X connect 11 0 13 0;
  273. #X connect 12 1 103 0;
  274. #X connect 12 2 4 0;
  275. #X connect 12 3 5 0;
  276. #X connect 12 4 6 0;
  277. #X connect 13 0 12 0;
  278. #X connect 13 1 161 0;
  279. #X connect 18 0 19 0;
  280. #X connect 19 0 98 0;
  281. #X connect 20 0 23 0;
  282. #X connect 20 0 24 0;
  283. #X connect 21 0 97 0;
  284. #X connect 23 0 26 0;
  285. #X connect 26 0 18 0;
  286. #X connect 26 0 25 0;
  287. #X connect 28 0 32 0;
  288. #X connect 28 1 33 0;
  289. #X connect 29 0 31 0;
  290. #X connect 30 0 62 0;
  291. #X connect 31 0 28 0;
  292. #X connect 31 1 36 0;
  293. #X connect 32 0 35 0;
  294. #X connect 33 0 34 0;
  295. #X connect 35 0 34 0;
  296. #X connect 36 0 35 1;
  297. #X connect 40 0 140 1;
  298. #X connect 41 0 40 0;
  299. #X connect 42 0 63 0;
  300. #X connect 43 0 57 0;
  301. #X connect 44 0 48 0;
  302. #X connect 45 0 44 2;
  303. #X connect 46 0 45 0;
  304. #X connect 48 0 47 0;
  305. #X connect 49 0 43 1;
  306. #X connect 51 0 141 1;
  307. #X connect 52 0 56 0;
  308. #X connect 53 0 139 1;
  309. #X connect 54 0 142 1;
  310. #X connect 55 0 54 0;
  311. #X connect 56 0 43 0;
  312. #X connect 57 0 96 0;
  313. #X connect 57 1 66 0;
  314. #X connect 58 0 61 0;
  315. #X connect 59 0 60 0;
  316. #X connect 60 0 58 1;
  317. #X connect 61 0 44 0;
  318. #X connect 62 0 32 0;
  319. #X connect 63 0 44 0;
  320. #X connect 65 0 90 0;
  321. #X connect 66 0 65 0;
  322. #X connect 68 0 53 0;
  323. #X connect 69 0 68 0;
  324. #X connect 69 1 68 1;
  325. #X connect 70 0 71 0;
  326. #X connect 70 1 72 0;
  327. #X connect 71 0 69 0;
  328. #X connect 72 0 69 0;
  329. #X connect 73 0 70 0;
  330. #X connect 74 0 68 0;
  331. #X connect 82 0 83 0;
  332. #X connect 83 0 84 0;
  333. #X connect 84 0 85 0;
  334. #X connect 90 0 89 0;
  335. #X connect 91 0 52 0;
  336. #X connect 92 0 165 0;
  337. #X connect 94 0 95 0;
  338. #X connect 95 0 155 0;
  339. #X connect 96 0 65 0;
  340. #X connect 97 0 20 0;
  341. #X connect 97 1 101 0;
  342. #X connect 99 0 17 0;
  343. #X connect 101 0 98 0;
  344. #X connect 104 0 105 0;
  345. #X connect 105 0 143 0;
  346. #X connect 110 0 113 0;
  347. #X connect 111 0 110 0;
  348. #X connect 112 0 126 0;
  349. #X connect 114 0 116 0;
  350. #X connect 115 0 122 0;
  351. #X connect 115 0 134 0;
  352. #X connect 116 0 115 0;
  353. #X connect 116 1 115 1;
  354. #X connect 118 0 127 0;
  355. #X connect 118 1 120 0;
  356. #X connect 119 0 128 1;
  357. #X connect 120 0 127 0;
  358. #X connect 123 0 125 0;
  359. #X connect 125 0 124 0;
  360. #X connect 126 0 128 0;
  361. #X connect 127 0 119 1;
  362. #X connect 128 0 129 0;
  363. #X connect 129 0 123 0;
  364. #X connect 131 0 115 0;
  365. #X connect 132 0 118 0;
  366. #X connect 134 0 132 0;
  367. #X connect 134 1 135 0;
  368. #X connect 135 0 136 0;
  369. #X connect 135 1 137 0;
  370. #X connect 136 0 127 1;
  371. #X connect 137 0 127 1;
  372. #X connect 139 0 58 0;
  373. #X connect 140 0 56 2;
  374. #X connect 141 0 56 1;
  375. #X connect 142 0 56 3;
  376. #X connect 143 0 146 0;
  377. #X connect 143 1 144 0;
  378. #X connect 144 0 145 0;
  379. #X connect 145 0 146 1;
  380. #X connect 146 0 106 0;
  381. #X connect 146 0 130 0;
  382. #X connect 146 0 110 1;
  383. #X connect 148 0 149 0;
  384. #X connect 149 0 150 0;
  385. #X connect 151 0 153 0;
  386. #X connect 153 0 152 0;
  387. #X connect 154 0 94 0;
  388. #X connect 164 0 163 0;
  389. #X connect 165 0 163 0;
  390. #X connect 166 0 165 0;
  391. #X connect 167 0 164 0;
  392. #X connect 168 0 164 0;
  393. #X connect 170 0 171 0;
  394. #X connect 171 0 172 0;
  395. #X connect 171 1 173 0;
  396. #X connect 172 0 174 0;
  397. #X connect 173 0 174 0;
  398. #X connect 175 0 78 0;
  399. #X connect 175 0 79 0;
  400. #X coords 0 -1 1 1 325 230 1 80 150;