Shop OBEX P1 Docs P2 Docs Learn Events
I/O programming ! set/reset with input ! — Parallax Forums

I/O programming ! set/reset with input !

Johan1968Johan1968 Posts: 22
edited 2008-02-13 03:41 in Propeller 1
I have a problem with I/O prog.


I tries to make a set and reset funktion ! (in a PLC this funktion have bean made in 10 sec. but this is more main .. and faster wen you can handel it, so i decide to learn this system ).

i tried to make it in several ways. with a counter that (expletive) 1 and then sets thi Output.

I trie to start a Out pout like P0 to get set wen o press P1 with selfholding and get reseted wen i press P2, but no succsess at all only get P0 Hig wen i hold P1.

Have you some sample to do it on a simple way ?

P0=Out
P1=Input this will set P0
P2=Input this will reset P0


Best regards Johan

Comments

  • OzStampOzStamp Posts: 377
    edited 2008-02-12 21:19
    Hi Johan

    In Spin or assembly...


    ?? ron mel oz
  • Johan1968Johan1968 Posts: 22
    edited 2008-02-12 21:38
    Hello !

    In SPin.....

    Best regards Johan
  • bambinobambino Posts: 789
    edited 2008-02-13 01:21
    Johan,
    I noticed you have double posted this thread.
    If you will log in and open the other thread, there is an X in the top Right corner that will delete it.
  • OzStampOzStamp Posts: 377
    edited 2008-02-13 03:41
    Hi Johan.

    See attached this works ..I used TV terminal to debug .. not really needed
    but you can see·what the values are in the respective commands..

    this is one way to do it.. I am sure there 3 or 4 other way's to do it.

    The self hold bit part of it you need to be aware of..
    As you say this is a trivial task in a PLC but not an obvious easy task for a Propeller.

    I posted something awhile ago to see if there is anybody out there writing an interface software
    package that would convert Relay ladder logic to SPIN or ASM code.. funny enough nobody responded..
    I think most people that are on this forum are not familiar with·PLC's ..

    cheers· ron mel oz..




    Post Edited (OzStamp) : 2/13/2008 6:52:21 AM GMT
Sign In or Register to comment.