I use CoDeSys 2.3.9. When I enter a conditional jump in the FBD editor like this:
   +----+
   |EQ|in---|  |--->>label
 0---|  |
   +----+
```andthenletCoDeSystransformthePOUfromFBDtoLD, Igetthis:
|Â Â Â Â Â Â Â Â Â Â Â Â Â +----+
|Â Â Â Â Â Â Â Â Â Â Â Â Â | EQ |
+---Â (empty rung)Â ------|ENÂ |
|Â Â Â Â Â Â Â Â Â Â in---|Â Â |--->>label
|Â Â Â Â Â Â Â Â Â Â Â 0---|Â Â |
|Â Â Â Â Â Â Â Â Â Â Â Â Â +----+
```which looks perfect to me.
I just cannot seem to enter the same in the LD editor manually:
- When I start with the box and want to add a jump at the box's output, the menu entries for jumps are greyed out.
- When I start with the jump, adding a box to the jump puts the box in parallel to the jump, not in front of/as the input to the jump, like this:
|---Â (empty rung)Â -+--->> label|Â Â Â Â Â Â Â Â Â Â |Â Â |Â Â Â Â Â Â Â Â Â Â |Â Â +----+|Â Â Â Â Â Â Â Â Â Â |Â Â |EQ||Â Â Â Â Â Â Â Â Â Â +----|ENÂ ||Â Â Â Â Â Â Â Â Â Â in---|Â Â |---|Â Â Â Â Â Â Â Â Â Â Â 0---|Â Â ||Â Â Â Â Â Â Â Â Â Â Â Â Â +----+
(Of course, I can assign the output of the box to a temporary and then jump on that temporary in the next network, but I need it to be in one network only.) Who can help?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use CoDeSys 2.3.9. When I enter a conditional jump in the FBD editor like this:
|Â Â Â Â Â Â Â Â Â Â Â Â Â +----+
|Â Â Â Â Â Â Â Â Â Â Â Â Â | EQ |
+---Â (empty rung)Â ------|ENÂ |
|Â Â Â Â Â Â Â Â Â Â in---|Â Â |--->>label
|Â Â Â Â Â Â Â Â Â Â Â 0---|Â Â |
|Â Â Â Â Â Â Â Â Â Â Â Â Â +----+
```which looks perfect to me.
I just cannot seem to enter the same in the LD editor manually:
- When I start with the box and want to add a jump at the box's output, the menu entries for jumps are greyed out.
- When I start with the jump, adding a box to the jump puts the box in parallel to the jump, not in front of/as the input to the jump, like this:
(Of course, I can assign the output of the box to a temporary and then jump on that temporary in the next network, but I need it to be in one network only.) Who can help?
you are correct in observation, however when converting it looks fine but does not work, it will not jump.
there is a work around
make your own EQ block like BLEQ as a pou (functionblock)
make sure the output is bool and this you can insert into ladder
test it with a coil parrallel.
however i still think jumps are bad practice in ladder.
yes i know siemens and others are full with them.
Hi shooter,
thanks for your answer!
At least in simulation mode, it works for me. I don't have any hardware, so I cannot test.
Lacking any answer from 3S, this may well be the way to go.
I totally agree - jumps are bad practice anywhere. I only allow certain arrangements of jumps to emulate an "IF" as available in Structured Text.
-Oliver
if statement is possible with the enable input.
and in ladder off course.