Author Topic: Message display  (Read 32111 times)

TTCSR

  • Newbie
  • Posts: 30
  • I'm a llama!
    • View Profile
Re:Message display
« Reply #15 on: January 21, 2013, 10:53:32 AM »
That is helpful, however, it still won't work for my application as there will still be times that an error message will be displayed for a brief moment, every five seconds.  I will definitely use this for future programs on other projects.

I do have another question.  I have a sequence that advances every 1 second unless an error occurs.  Is there a way to monitor the sequence and set a bit on if the sequence does not advance for more than a second?  If there is a way, it will totally solve my issue since I can use that bit in my HMI to change screens when that bit turns on.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Message display
« Reply #16 on: January 21, 2013, 11:39:53 AM »
You can use a 1 second clock pulse to trigger a custom function which is used to advance a sequencer counter if there is no error. If an error is detected (that is determined by your software) then the custom function can stop advancing the sequencer or set an alarm bit which is monitored by another custom function for actions.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:Message display
« Reply #17 on: January 21, 2013, 11:42:49 AM »
I would suggest the use of a TIMER.

Gary d

TTCSR

  • Newbie
  • Posts: 30
  • I'm a llama!
    • View Profile
Re:Message display
« Reply #18 on: January 22, 2013, 03:49:12 AM »
My sequence is advanced by each cutom function via an IF THEN ELSE statement (shown below).  Each completion of a test sets the CTRPV to the next sequence for the next test, hence, I cannot use a clock pulse for advancement.  However, I am not sure how I could use a timer though?

IF TESTBIT (INPUT[1],1) THEN
   IF INPUT[1]+INPUT[2]+INPUT[3]+INPUT[4]+INPUT[5] & &HFFFD THEN    'CHECK IF ANY OTHER INPUT #1 TO #16) IS ON
      CALL 2:
      SETLCD 2,1,D$+"A3 &"      
      CALL 8:
   ELSE
      IF CTRPV[1]=1 THEN
         CTRPV[1]=2
         SETLCD 0,0,CHR$(1)
      ELSE
         CTRPV[3]=10
         SETLCD 0,0,CHR$(1)
      ENDIF
   ENDIF
ENDIF

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:Message display
« Reply #19 on: January 22, 2013, 08:36:32 AM »
I'm sorry, but I can not help you.

I think that your coding style has limited your options.

You might consider throwing more hardware at the problem.  Add another PLC to manage the display.  

I know that this adds extra cost to your project but if you can't change your coding style then a second PLC gives you the opportunity to manage the display of messages independently of the execution of your test sequence.

Gary d

« Last Edit: January 22, 2013, 08:40:29 AM by garysdickinson »

TTCSR

  • Newbie
  • Posts: 30
  • I'm a llama!
    • View Profile
Re:Message display
« Reply #20 on: January 22, 2013, 09:18:49 AM »
I figured it out with a timer.  I placed a timer on each test.  If the test remains active for longer than 2 seconds, the timer bit triggers an output bit that I use to enable a display on my HMI.  I had to create 50 timers, one for each test, but it works perfectly.  ;D

I agree the coding has limited my options, however, it was necessary due to the application.

Thank you for all the input and feedback!