Codesys help - Step transition to ladder

mehrab

Member
Join Date
May 2014
Location
ontario
Posts
6
Could use some help.

New to Codesys.

Was told to convert some logic from Step transition into ladder.

Having issues with 'Wait' transition/command.

here's a screenshot
http://snag.gy/KMw1s.jpg

the pulses I can convert to one shot rising, but how can I program the waits?

This is for a conveyor belt.

It gets to the wait section and then resets 2 signals, then continues

Any help?
Thanks
 
you have to divide your ladder in three parts.
a step part for each step one rung
example (trans0 OR step1) AND NOT step2 >>> step1

a transition part where you tell the program if step is active and the transition is true goto stepx.
timer1.Q AND step1 >>> trans1
a action part where you tell what to do in each step.
step1 >>> reset conveyor
step1 >>> reset conveyor2
step1 >>> start timer1
you can also send an EXPORT file to me and i will make your example in Ladder
please comment your program
have you made a visualisation?
what plc is used?
 
...
you can also send an EXPORT file to me and i will make your example in Ladder
please comment your program
have you made a visualisation?
what plc is used?

Thank you so much for your help

here is the .exp file

https://drive.google.com/a/rdcontrols.com/file/d/0B5u-gXCnSlv5M3BZb2FDaU1IQnM/edit?usp=sharing

Using an Ormec SMLC 160 processor
It's also got a Delta DVP28SV processor which is simply used as an i/o block.

Using a Maple HMI to interface with it all.. There is current visualization in Codesys but I wanted to add an external HMi.. which I'm having a few issues with as well addressing MX addresses within the logic, but I'll tackle that later.

For now, they want these all in simple to read ladder. Thanks so much
 
Here's an unrelated question I had..

The program I'm trying to edit has internal memory bits which work with the visualization within Codesys.

Like let's say:
Conveyor_in_pos_sensor1 AT %MX1300.1 :BOOL;

But my HMI cannot read those memory information. (using Maple Systems HMI).
It can only read bits such as QX bits.

So right now I have a rung in the logic where it takes the bool and outputs to QX bit.

Can I just rewrite the variable as such:

Conveyor_in_pos_sensor1 AT %MX1300.1 :BOOL:= %QX130.1;

??

Does that make sense?
 
Hello mehrab,

Disclaimer:
I've not seen your code, neither your uploaded files.


Be careful, when you define the addresses your variables will be, you have different channels:

Inputs => %IX, %IW...
Outputs => %QX, %QW...
Memory => %MX, %M...

Those are different channels that start at different places.

Depending on the kind of signals you send to the HMI you can have problems writing/reading the signals. The best would be using a M signal as it can be read and written at the same time. If you need to read and write at the same time from the HMI it could be a problem with %I or %Q.

You should link the right variables into the System Manager to be sent through Profibus (I guess) that should allow you to send the M variables to your HMI.

Anyway, keep in mind that two variables should not use the same memory space (unless you do it per se).

Three variables using the same memory space sample:

A : %IX0.0;
B : %IX0.0;
C : %IW0;

Those three occupy the same memory space even the C variable occupy more space than both A and B.

Going back to your "business", if you replace in your system manager the Q signals for the M ones in your Profibus configuration probably you won't need to change anything in your PLC.

Hope this helps!
 
Hello mehrab,

Disclaimer:
I've not seen your code, neither your uploaded files.


Be careful, when you define the addresses your variables will be, you have different channels:

Inputs => %IX, %IW...
Outputs => %QX, %QW...
Memory => %MX, %M...

...

Hope this helps!

For some reason, I can't target the hmi to read the Memory addresses. MX or MW ..

I've realized that buttons that light up are using MX. I'm wondering if the original programmer did this perhaps because he was running out of i/o addresses or not?

I've changed a few of the MX to QX and they seem to work.

I'm trying to not change or take away from the visualization on codesys.. trying to make them both work.. codesys and hmi.

When I change the addresses from MX to QX, in Codesys, and target my HMI to that QX bit, it seems to work. But I wonder if I'm taking away from any other funcionality.

I guess I won't know until I actually go online with everything, drives, robots and all. As far as monitoring from codesys it looks like everything is turning on and off accordingly.
 
If it works... :D

If you need to write a different value to one of those %Q variables from your HMI this should not work as they are declared as outputs...

If that is not the case, then you are safe as in TWinCAT you'll be able to write to those Q exactly in the same way than in those M variables...

Good luck!
 
for this simple solution is available, make separate program that reads the MW and puts it to the QW desired.
you can do it also via bits but it takes more programming and the effect is same.
this way the variable is still available for the visualisation (however it does not need a Marker.
 
i made a small example,
you can do same with the programs, however not with all I/O and markers as they are hardware coded. but the names can be done.
 

Similar Topics

Hi, Has anyone ever done indirect addressing /instantiation in CodeSys 3.5? I have an application where I have a lot of similar...
Replies
3
Views
2,917
Hi I am fairly new to codesys 3 but I'm currently trying to make a little project using 4 cameras, a sensor and a conveyor belt each camera take...
Replies
7
Views
3,696
http://forum.codesys.com/viewtopic.php?f=21&t=5621#p9967 Can anyone help me with this attachment? I can't see it because I am not 'approved' - I...
Replies
2
Views
2,025
Hi there, We have a German machine with an Eaton XC-202 plc. I purchased the X-soft CoDeSys software and XT-SUB-D/RJ45 cable for programming...
Replies
3
Views
4,066
Hello, I'm trying to run simple Codesys 3.5 patch3 example for quickstart. But, when I set gateway (Devices->Device(Codesys SP Win V3)->...
Replies
4
Views
12,364
Back
Top Bottom