Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/15/04 15:15
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#83156 - Isn't a PLC an overkill for this?
Responding to: ???'s previous message
In Basic52 it would be like (not tested, may be buggy):
10 CLOCK 1: PORT1 = 0FFH
20 P = 1: GOSUB 1000
30 D = 1: GOSUB 2000
40 P = 2: GOSUB 1000
50 D = 1: GOSUB 2000
60 P = 8: GOSUB 1000
70 D = 1: GOSUB 2000
80 P = 2: GOSUB 1000
90 D = 1: GOSUB 2000
100 P = 2: GOSUB 1000
110 D = 1: GOSUB 2000
120 P = 2: GOSUB 1000
130 D = 1: GOSUB 2000
140 P = 4: GOSUB 1000
150 D = 15: GOSUB 2000
160 P = 1: GOSUB 1000
170 D = 10*60: GOSUB 2000
180 GOTO 20

1000 REM BUTTON PRESS
1010 PORT1 = PORT1.XOR.P
1020 T=TIME
1030 IF TIME-T < 0.25 GOTO 1030 : REM A QUARTER SECOND PUSH
1040 PORT1 = 0FFH
1050 RETURN
 
2000 REM DELAY
2010 TIME = 0
2020 IF TIME < D GOTO 2020
2030 RETURN



10 minutes, too, and I was tempted to optimize :-)
Hardware is a 89C51RD2, level shift for RS232 (for future upgrades :-), Xtal, reset, power, 4 relays+diodes (if needed), some C and a PCB (maybe a proto board). $30 worth, guess I right? A couple of hours to make it go from scrap.

Well, not so pro.

Jan Waclawek


List of 46 messages in thread
TopicAuthorDate
8051 controlling switches            01/01/70 00:00      
   Switches            01/01/70 00:00      
      Medical Device?!!            01/01/70 00:00      
      51 probably really controlling switches            01/01/70 00:00      
         maybe it is...            01/01/70 00:00      
            ... although ...            01/01/70 00:00      
               elementary            01/01/70 00:00      
                  Switches            01/01/70 00:00      
                     Crouzet            01/01/70 00:00      
                        SAmple            01/01/70 00:00      
                           Isn't a PLC an overkill for this?            01/01/70 00:00      
                               Isn't a PLC an overkill for this?            01/01/70 00:00      
                                 PCB ?            01/01/70 00:00      
                                    Depends on circumstances, I said.            01/01/70 00:00      
                                       Pictures in the post            01/01/70 00:00      
                                 I doubt it            01/01/70 00:00      
                           PLC            01/01/70 00:00      
                              MII            01/01/70 00:00      
                                 Re:MII            01/01/70 00:00      
   Switch or Relay?            01/01/70 00:00      
   Is a PLC an overkill for this?            01/01/70 00:00      
      I wrote this is not pro...            01/01/70 00:00      
         you forgot            01/01/70 00:00      
            Repeating myself...            01/01/70 00:00      
         plc cost            01/01/70 00:00      
            ...includes case            01/01/70 00:00      
            Make the bet!            01/01/70 00:00      
               I do not bet, but            01/01/70 00:00      
                  No compilation,            01/01/70 00:00      
                     Re: Basic            01/01/70 00:00      
                        BASIC details            01/01/70 00:00      
                           BASIC details            01/01/70 00:00      
                              BASIC 52            01/01/70 00:00      
                              BASIC details            01/01/70 00:00      
                                 re:            01/01/70 00:00      
                                    Oh yes you would            01/01/70 00:00      
                                       BASIC does not need line numbers            01/01/70 00:00      
                                          It was nice            01/01/70 00:00      
                                             It was 10 years ago...            01/01/70 00:00      
                                                line numbers            01/01/70 00:00      
                                                   Not necessarily            01/01/70 00:00      
                                    BASIC for ADuC            01/01/70 00:00      
                                       re:Basic52            01/01/70 00:00      
      Totally agree            01/01/70 00:00      
         Ladder logic ?            01/01/70 00:00      
            ladder            01/01/70 00:00      

Back to Subject List