Author Topic: i-Trilogi Simulation Issues (Beginner- Help Required)  (Read 9098 times)

bowyer_2k6

  • Newbie
  • *
  • Posts: 5
  • I'm a llama!
    • View Profile
i-Trilogi Simulation Issues (Beginner- Help Required)
« on: May 04, 2014, 04:38:56 PM »
Hello all,

I'm hoping that somebody may be able to help me.

I am in my final year of a mechanical engineering degree, and have a module in Control Technology.  I have llittle to no experience in regards to programmable logic, and what I know about i-Trilogi has been learned in the past 5 weeks (From class hand-outs and internet tutorials). As part of the module, I have been asked to write a program for a drinks vending machine. I believe I have given it a reasonable go, although I've having issues when simulating (I believe sometime I'm doing must be fundamentally incorrect).

When I simulate the program, sometimes relays are latching, sometimes they are not. Similarly sometimes the correct message is being displayed (In the View panel), other times the Custom functions are not working. (Even though nothing has changed).

I'm hoping somebody would be kind enough to have a look at the program. (I've used sequencers to split it up, which has writing it a little easier).

If for example the following is undertaken when in 'Simulate mode'

Manually latch Inputs, 9, 23, 56 and 99. Then press Input 7.. Then press Input 75.

I have then used a custom function to count £1.20 credit, depending on what coins are sensed. Once this is complete it goes to next sequence steps, and things start to go a little wrong:

Press any drink (Inputs 1 - 5), then if applicable choose 'yes milk' or 'no milk' then 'Yes Sugar' or 'No Sugar'. Sometimes the relevant relays latch.. which then allows the correct message to be displayed in the next sequence, and other times they do not.

Similarly if I press input 18, the program is temperamental in regards to unlatching all of the necessary relays.  When I click simulate I get many error messages saying "Seq 1 already energized" (My lecturer has told me that this is normal, but I assume this isn't supposed to happen if things are done correctly?).

My lecturer has reviewed the code, and can't find any issues. He's told me that there are software glitches - Again I very much doubt this is the case?

I anyone could  give me some advice on any of the above it would be much appreciated.

Thanks very much,

Jordan

PS -I am running the recommended version of Java.



bowyer_2k6

  • Newbie
  • *
  • Posts: 5
  • I'm a llama!
    • View Profile
Re:i-Trilogi Simulation Issues (Beginner- Help Required)
« Reply #1 on: May 04, 2014, 04:45:36 PM »
Apologies - When I attach the file and click post I'm getting the following error message:

VendingMachine_5_5_141.pc6.
You cannot upload that type of file. The only allowed extensions are txt,jpg,gif,pdf,mpg,png,zip, pc6, pc7.

The file is a .pc6 file?


I have used relays from sequences as highlighted in the attached screenshot. Could somebody please advice whether this is the correct / incorrect way to go about things?

Thanks

« Last Edit: May 04, 2014, 05:04:48 PM by bowyer_2k6 »

Forum Admin

  • Administrator
  • Newbie
  • *****
  • Posts: 20
  • Let's control via the NET
    • View Profile
    • Internet Programmable PLCs
Re:i-Trilogi Simulation Issues (Beginner- Help Required)
« Reply #2 on: May 04, 2014, 06:43:53 PM »
PC6 and PC7 upload issue has been fixed. You can also zip the file and upload with a zip extension.  (Note: file upload can only be done on new post and not on modified post)
« Last Edit: May 04, 2014, 06:45:02 PM by Forum Admin »

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:i-Trilogi Simulation Issues (Beginner- Help Required)
« Reply #3 on: May 04, 2014, 08:00:47 PM »
Jordan,

You can send me your .pc6 file and I'll take a look at it.

Please send your file to the email address in my profile.  

I'm a very concerned, as you are, about the quality of advice that your getting:

Similarly if I press input 18, the program is temperamental in regards to unlatching all of the necessary relays.  When I click simulate I get many error messages saying "Seq 1 already energized" (My lecturer has told me that this is normal, but I assume this isn't supposed to happen if things are done correctly?).


The "already energized" messages from the simulator indicate that your PLC program has many problems.  This type of error is usually the result of attempting to define the state of an output, relay, timer... In more than one rung in the ladder logic in the same program.  


Gary d
« Last Edit: May 05, 2014, 08:29:11 PM by garysdickinson »

bowyer_2k6

  • Newbie
  • *
  • Posts: 5
  • I'm a llama!
    • View Profile
Re:i-Trilogi Simulation Issues (Beginner- Help Required)
« Reply #4 on: May 05, 2014, 02:02:55 AM »
Gary,

Thanks very much for your reply - I have sent an e-mail to the address in your profile.


For anyone else who may be willing to give some advice, I have now attached the program file. (Hopefully it works this time).

There are likely to be many things that I've done incorrectly, although an obvious mistake may be circuit 3. I have used a rising edge trigger to initiate the first sequence, but even though there is a rising edge, could this mean that  SEQ 1:13 is being energized at all times?

Please note: The reason I have put circuits 12 to 28 into a sequence is so that the machine will still deliver a drink if the water level becomes low midway through the drink being poured.  


If anybody could recommend how I could achieve the same functionality, but written in the correct manor that would be great.


Thanks,

Jordan

bowyer_2k6

  • Newbie
  • *
  • Posts: 5
  • I'm a llama!
    • View Profile
Re:i-Trilogi Simulation Issues (Beginner- Help Required)
« Reply #5 on: May 05, 2014, 02:04:33 AM »
Apologies - Didn't attach the first time. Please find program attached below:
« Last Edit: May 05, 2014, 02:05:29 AM by bowyer_2k6 »

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:i-Trilogi Simulation Issues (Beginner- Help Required)
« Reply #6 on: May 05, 2014, 11:15:17 AM »
Jordan,

I received your .PC6 file via email.  

When I attempted to compile it in i-TRiLOGI V6.47,  the compiler found at least 29 cases where you attempted to define the state of a coil (RELAY, OUTPUT, TIMER, COUNTER, Special Function...) on multiple ladder rungs.  This construct is not supported by relay logic.

You will need to fix all of these duplicate coil problems.  There is no need to attempt to debug a program that cannot compile.

The screen shot shows the first of the 29 "Duplicate Coil" errors.  Included in this screen shot is a single rungof ladder logic that could replace the two ladder logic rungs that you were attempting to use.


I was not able to attach a file to demonstrate the problem that you are having.  I tried ".jpg" and ".pdf" formats.  Neither format appears in the post.
[/b][/size]

I will send you the .pdf via email.


Best Regards,

Gary D
« Last Edit: May 05, 2014, 08:27:31 PM by garysdickinson »

bowyer_2k6

  • Newbie
  • *
  • Posts: 5
  • I'm a llama!
    • View Profile
Re:i-Trilogi Simulation Issues (Beginner- Help Required)
« Reply #7 on: May 05, 2014, 12:27:51 PM »
Hello all,

Gary has provided me with a detailed reply, which explains the many fundamental issues with my program. I now understand these issues, so will not be requiring any further help.


Thanks very much,

Jordan

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3170
    • View Profile
    • Internet Programmable PLCs
Re:i-Trilogi Simulation Issues (Beginner- Help Required)
« Reply #8 on: May 05, 2014, 02:58:11 PM »
Testing of PDF file attachment.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3170
    • View Profile
    • Internet Programmable PLCs
Re:i-Trilogi Simulation Issues (Beginner- Help Required)
« Reply #9 on: May 05, 2014, 02:58:55 PM »
Testing of JPG file attachment
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:i-Trilogi Simulation Issues (Beginner- Help Required)
« Reply #10 on: May 05, 2014, 08:23:29 PM »
This is an attempt to post the .jpg file that was supposed to be associated with reply #6

Gary D