Author Topic: Programming Help  (Read 10040 times)

floorballer

  • Newbie
  • Posts: 5
    • View Profile
Programming Help
« on: May 21, 2006, 07:39:06 AM »
I doing a final year project for my sch and i still new to this TRiLOGI.

This is what mine project about: When the postman open at the back of the letter-box, put letters in, sensor 1 will detect, if got letters, the front door LED will light up. If the letter-box is going to be full, will send a sms to the owner telling him/her. Beside this, after every 5 days and still got letters inside, it will also send a sms to the owner. Then it will reset everything.

I know my project is very messy, hope you all understand how it works.
Thanks.  :)

evanh

  • Jr. Member
  • Posts: 59
  • y=A+B*(1-cos(2*Pi*x))
    • View Profile
Re:Programming Help
« Reply #1 on: May 21, 2006, 01:32:49 PM »
Here's a hint, there is two parts to the job:
 - Proceedure for transmitting SMS blips.
 - Logic.

As you can prolly work out the logic is done with ladder and the proceedure is done with basic.  The actual coding I'll leave to you for two reasons.  One is because that's why you have been given the exercise in first place and the other is logic is always harder to think about than first appears so I'd just be providing an incorrect ladder program for you.


Evan

floorballer

  • Newbie
  • Posts: 5
    • View Profile
Re:Programming Help
« Reply #2 on: May 21, 2006, 08:22:34 PM »
oh, but the i already try, it does not work.
Anyway, i don't mind to see yr program, at least i can understand from it. Thanks for yr help.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Programming Help
« Reply #3 on: May 21, 2006, 09:16:07 PM »

     Sensor          LED
|----||------------(OUT)
    LED  CLK:1min    C1
|----||----||------(CTR)
     C1             SendSMS
|----||------------{dCusF}



C1 has a preset value == 5 days in minutes = 60 x 24 x 5
= 7200 minutes.

The  SendSMS custom function uses TBASIC PRINT command to sent SMS through a GSM modem. The details you have to work out. The ladder logic portion should be obvious enough. If you don't understand you should go refer to your basic ladder logic text because it is fundamental.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

floorballer

  • Newbie
  • Posts: 5
    • View Profile
Re:Programming Help
« Reply #4 on: May 22, 2006, 06:39:06 AM »
Oh ok. i will go try it out. Support thanks alot for yr help. Sorry to trouble you.  :)