SETTING UP TWO FLASHING BITS

This set up creates two flashing bits: 1 every 0.5 second, the other one at every 0.25 second. Those bits will be “Flags 19 and 20”. Timer 10 will be used.

 

(You will find a downloadable  mceclip3.png PDF version at the end mceclip5.png of this page .)

 

 DURATION

+/- 30 minutes

  RECOMMENDATION  

---

 

VIDEO TUTORIAL

 

STEP BY STEP

FLAGS CREATION

      1. PRESS --> [ I/O ]
      2. PRESS --> [ F1 ] [ TYPE ]
      3. SELECT --> [ 0 ] 0 NEXT 
      4. SELECT --> [ 2 ] 2 FLAG (see screenshot mceclip1.png)
      5. Using Arrow, --> Scroll down to F[19]
      6. PRESS --> [ F2 ] [ DETAIL ] (see screenshot mceclip1.png)
      7. PRESS --> [ ENTER ]
      8. ENTER--> Pulse 0.5s
      9. PRESS --> [ ENTER ]
      10. Using Arrow, --> Scroll down to F[20]
      11. PRESS --> [ F2 ] [ DETAIL ]
      12. PRESS --> [ ENTER ]
      13. ENTER--> Pulse 0.25s
      14. PRESS --> [ ENTER ]

BACKGROUND LOGIC PROGRAM CREATION

      1. PRESS --> [ SELECT ]
      2. PRESS --> [ F2 ] [ CREATE ]
      3. ENTER --> Program name with no space. You can use Option/Keybd feature to enter the name. To do so, select Keybd, press F5 for KEYBOARD, write what you want then press EXIT. (Use BG as a prefix to your background logic program name: BG_FLASH).
      4. PRESS --> [ ENTER ] (if name written using F1 to F5 keys) (see screenshot mceclip1.png)
      5. PRESS --> [ DETAIL ]
      6. ENTER --> A comment on third line. (You can use Option/Keybd.) 
      7. Using Arrow --> Scroll down on fourth line.
      8. PRESS --> [ F5 ] *
      9. PRESS --> [ F1 ] [END]

TIMER SET UP

      1. PRESS --> [ MENU ]
      2. SELECT --> [ 0 ] 0 NEXT 
      3. SELECT --> [ 4 ] 4 STATUS
      4. SELECT --> [ 8 ] 8 PRG TIMER (see screenshot mceclip1.png)
      5. Using Arrow --> Scroll down on tenth timer. 
      6. PRESS --> [ ENTER ] 
      7. ENTER --> A comment for timer 10. (You can use Option/Keybd.) FLASH_BIT  (see screenshot mceclip1.png)
      8. PRESS --> [ F2 ] [ DETAIL ]
      9. Using Arrow --> Scroll down on Local/Global. (see screenshot mceclip1.png)
      10. PRESS --> [ F4 ] [ GLOBAL ]
      11. PRESS --> [ F2 ] [ LISTING ]
      12. PRESS --> [ EDIT ]
      13. You should be back to BG_FLASH program editing screen.

WRITING PROGRAM

      1. PRESS --> [ F1 ]  [ INST ]
      2. SELECT --> [ 3 ] 3 IF/SELECT 
      3. SELECT --> [ 8 ] 8 NEXT
      4. SELECT --> [ 1 ] 1 IF (…) THEN (see screenshot mceclip1.png)
      5. SELECT --> [ 8 ] 8 NEXT
      6. SELECT --> [ 8 ] 8 NEXT
      7. SELECT --> [ 3 ] 3 TIMER [ ] (see screenshot mceclip1.png)
      8. ENTER --> 10
      9. PRESS --> [ ENTER ]
      10. PRESS --> [ F1 ] <INSERT>
      11. SELECT --> [ 8 ] 8 NEXT
      12. SELECT --> [ 7 ] 7 >
      13. SELECT --> [ 8 ] 8 NEXT
      14. SELECT --> [ 1 ] 1 Constant
      15. ENTER --> .5
      16. PRESS --> [ ENTER ]
      17. Using Arrow --> Scroll down one line. 
      18. PRESS --> [ F1 ]  [ INST ]
      19. SELECT --> [ 2 ] 2 I/O 
      20. SELECT --> [ 8 ] 8 NEXT
      21. SELECT --> [ 2 ] 2 F[ ]=(…)
      22. ENTER --> 19
      23. PRESS --> [ ENTER ]
      24. PRESS --> [ 5 ] 5 F[  ]
      25. ENTER --> 19 (see screenshot mceclip1.png)
      26. PRESS --> [ ENTER ]
      27. Using Arrow --> Move cursor back on 19.
      28. PRESS --> [ F5 ] (!)
      29. Using Arrow --> Scroll down one line. 
      30. PRESS --> [ F1 ]  [ INST ]
      31. SELECT --> [ 7 ] 7 Miscellaneous
      32. SELECT --> [ 7 ] 7 Parameter Name (see screenshot mceclip1.png)
      33. SELECT --> [ 1 ] 1 $...=…. (see screenshot mceclip1.png)
      34. PRESS --> [ ENTER ]
      35. ENTER --> TIMER[10].$TIMER_VAL (see screenshot mceclip1.png)
      36. PRESS --> [ ENTER ]
      37. SELECT --> [ 2 ] 2 Constant
      38. ENTER --> 0
      39. PRESS --> [ ENTER ]
      40. PRESS --> [ F1 ]  [ INST ]
      41. SELECT --> [ 3 ] 3 IF/SELECT
      42. SELECT --> [ 8 ] 8 NEXT
      43. SELECT --> [ 3 ] 3 ENDIF (see screenshot mceclip1.png)
      44. Using Arrow --> Scroll down one line. 
      45. PRESS --> [ F1 ]  [ INST ]
      46. SELECT --> [ 3 ] 3 IF/SELECT
      47. SELECT --> [ 8 ] 8 NEXT
      48. SELECT --> [ 1 ] 1 IF (…) THEN
      49. SELECT --> [ 8 ] 8 NEXT
      50. SELECT --> [ 8 ] 8 NEXT
      51. SELECT --> [ 3 ] 3 TIMER [ ]
      52. ENTER -->  10
      53. PRESS --> [ ENTER ]
      54. PRESS --> [ F1 ]  <INSERT>
      55. SELECT --> [ 8 ] 8 NEXT
      56. SELECT --> [ 7 ] 7 >
      57. SELECT --> [ 8 ] 8 NEXT
      58. SELECT --> [ 1 ] 1 Constant
      59. ENTER -->  0.25
      60. PRESS --> [ ENTER ]
      61. Using Arrow --> Scroll down one line. 
      62. PRESS --> [ F1 ]  [ INST ]
      63. SELECT --> [ 2 ] 2 I/O
      64. SELECT --> [ 8 ] 8 NEXT
      65. SELECT --> [ 2 ] 2 F[ ]=(…) 
      66. ENTER -->  20
      67. PRESS --> [ ENTER ]
      68. SELECT --> [ 6 ] 6 ON
      69. PRESS --> [ ENTER ]
      70. Using arrow --> SCROLL DOWN one line.
      71. PRESS --> [ F1 ]  [INST]
      72. SELECT --> [ 3 ] 3 IF/SELECT
      73. SELECT --> [ 8 ] 8 NEXT
      74. SELECT --> [ 2 ] 2 ELSE (see screenshot mceclip1.png)
      75. Using Arrow --> Scroll down one line. 
      76. PRESS --> [ F1 ]  [INST]
      77. SELECT --> [ 2 ] 2 I/O
      78. SELECT --> [ 8 ] 8 NEXT
      79. SELECT --> [ 2 ] 2 F[ ]=(…) 
      80. ENTER -->  20
      81. PRESS --> [ ENTER ]
      82. SELECT --> [ 7 ] 7 OFF
      83. PRESS --> [ ENTER ]
      84. Using Arrow --> Scroll down one line. 
      85. PRESS --> [ F1 ]  [INST] (see screenshot mceclip1.png)
      86. SELECT --> [ 3 ] 3 IF/SELECT
      87. SELECT --> [ 8 ] 8 NEXT
      88. SELECT --> [ 3 ] 3 ENDIF

START TIMER 10

The TIMER[10] has to be started only once per controller power up.

      1. PRESS --> [ SELECT ]
      2. Scroll down the list and SELECT --> POWERUP Program (see screenshot mceclip1.png)
      3. PRESS --> [ ENTER ]
      4. Scroll down to an empty line.
      5. PRESS --> [ F1 ]  [INST]
      6. SELECT --> [ 7 ] 7 Miscellaneous
      7. SELECT --> [ 3 ] 3 TIMER[] (see screenshot mceclip1.png)
      8. ENTER -->  10
      9. PRESS --> [ ENTER ]
      10. SELECT --> [ 1 ] 1 START
      11. Using Arrow --> Move up one line. (see screenshot mceclip1.png)
      12. PRESS --> [ STEP ]
      13. PRESS --> [ SHIFT and FWD ]  (to run this live)
      14. PRESS --> [ STEP ]
      15. PRESS --> [ MENU ]
      16. SELECT --> [ 0 ] 0 NEXT
      17. SELECT --> [ 4 ] 4 STATUS
      18. SELECT --> [ 8 ] 8 Prg Timer
      19. You should see the timer count rising. (see screenshot mceclip1.png)

START BACKGROUND LOGIC PROGRAM BG_FLASH

In order for the flags 19 and 20 to flash, you must put the background logic program et running mode

      1. PRESS --> [ MENU ]
      2. SELECT --> [ 6 ] 6 SETUP
      3. SELECT --> [ 0 ] 0 NEXT
      4. SELECT --> [ 5 ] 5 BG LOGIC (see screenshot mceclip1.png)
      5. Scroll down to an empty line.
      6. PRESS --> [ F4 ]  [ CHOICE ]
      7. Using Arrow, Scroll Down to--> BG_FLASH (see screenshot mceclip1.png)
      8. PRESS --> [ ENTER ]
      9. PRESS --> [ F2 ]  RUN
      10. If the program has no error, you should see in the STATUS column that it is running. (see screenshot mceclip1.png)
      11. PRESS --> [ I/O ]
      12. PRESS --> [ F1 ]  [ TYPE ]
      13. SELECT --> [ 0 ] 0 NEXT
      14. SELECT --> [ 2 ] 2 FLAG
      15. You should see Flags 19 and 20 switching from ON to OFF state. (see screenshot mceclip1.png)

 

mceclip24.png

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.