Jump to content

Recommended Posts

Hello, I am programming the Vision 350 in Visilogic.  In the design of the process loop some conditions lead to simultaneous (or parallel) outputs.

In the program, some of thoses outputs are represented internally by memory bits to be true or false before actual output in the scan cycle.

The problem: putting coils (the "internal" MBs I mentioned above) in parallel does not trigger all of them. See net below:

image.png.ad83827d4c3f8645d23d30d3efd5c614.png

Trying an alternative doesn't work either:

image.png.ac5d32b54d6ae6515fa34e798645f561.png

 

Any suggestions?

 

Link to comment
Share on other sites

Hi;

Where are you using these coils as coils else where   in your program?  

If you use a coil  as a coil say 3 times in a program, only the last state of  the coil is  valid at the end of the program scan.

Remember a PLC Scan starts at the top and ends at the bottom.

Coils  MB 312,313,314 and 317    must have other factors controlling them.

Can you post a copy of your program.

 

DanT

Link to comment
Share on other sites

  • MVP 2023

Search your program for each coil that is not working properly. Almost certainly you have duplicate coils. Ladder logic does not allow duplicate Direct or Inverted coils (you can have duplicate Set & Reset coils). You can also perform a Project Optimizer under the Build menu to get a list of all duplicate coils.

Also, there is no difference between coils set up in parallel or series in VisiLogic (other programming software can differ).

I would also suggest avoiding using inverted coils routinely. It can be a bit confusing and it's usually just as easy to change the logic a bit and use direct coils. This is just a matter of programming style and won't affect the way your program works.

Link to comment
Share on other sites

  • MVP 2023

As I was about to post, Flex's answer popped up with a bit of stuff I've already written, so I'll leave it in anyway.

In the Help files, go to Search and search for Ladder Net. 

On top of this knowledge, my personal preference is to NEVER use Inverted Coils.  I've said a similar thing elsewhere on the forum, but the gist of it is to only use a particular way of operating something throughout your program.  Using controls that invert the coil can get very confusing and hard to keep track of.  This is probably why you've got the result you have.

Bearing a whole host of other potential things in mind, you can easily do the idea  of what you want to do using Vector Store, addressing a sequential number of MBs in one hit.

cheers, Aus

Link to comment
Share on other sites

Thanks for the helpful comments.

A description of the program :

There are several modes of operation:

1- Standard process according to set points (3 temperatures and 1 relative humidity) by which some of 8 outputs are ON and some OFF in 8 states (combination matrix of 3 temperatures and 1 rh).

2- external (by modbus) main switch. When on - the operation is same as (1), otherwise shut down of all outputs in particular order.

3- operation in case of operational problems (detected by digital inputs). In this case, and depending on the detected fault , some of the outputs go off and stay that way for several minutes.

Based on this I decided to dedicate each mode of operation to its own subroutine which run one after another, wherein 8 internal MBs change state before actual output.  Thise are overriden in order:  mode  1 then 2 and last 3. So the last mode turns off relevant MBs set beforehand.

The snippets I posted above are from the third subroutine (events).

Now, I see that I should have used resets instead of inverted coils, because I need only to turn false some of the MBs. DanT -so yes because of this coils were true instead of just going false in this subroutine.

Ausman, I'll consider your suggestion on using vectors instead of MBs.

I tell you all this because maybe you have another idea for the design of the entire program.

 

 

Link to comment
Share on other sites

1 hour ago, salt said:

Hello, I am programming the Vision 350 in Visilogic.  In the design of the process loop some conditions lead to simultaneous (or parallel) outputs.

In the program, some of thoses outputs are represented internally by memory bits to be true or false before actual output in the scan cycle.

The problem: putting coils (the "internal" MBs I mentioned above) in parallel does not trigger all of them. See net below:

image.png.ad83827d4c3f8645d23d30d3efd5c614.png

Trying an alternative doesn't work either:

image.png.ac5d32b54d6ae6515fa34e798645f561.png

 

Any suggestions?

 

Your problem is somewhere else on your code, I bet you.

Those rungs both are correct.... assuming you are not using both at the same time because as mentioned by other you can not use a coil twice

 

1 hour ago, AlexUT said:

You use Inverted Coils - look Help for description.

It will be good if you create test project with onlu elements you use and test.

Then post project if you have trouble.

 

I dont think that this is the case that @salt has mistaken inverted coils with normal coils

Link to comment
Share on other sites

1 hour ago, Ausman said:

As I was about to post, Flex's answer popped up with a bit of stuff I've already written, so I'll leave it in anyway.

In the Help files, go to Search and search for Ladder Net. 

On top of this knowledge, my personal preference is to NEVER use Inverted Coils.  I've said a similar thing elsewhere on the forum, but the gist of it is to only use a particular way of operating something throughout your program.  Using controls that invert the coil can get very confusing and hard to keep track of.  This is probably why you've got the result you have.

Bearing a whole host of other potential things in mind, you can easily do the idea  of what you want to do using Vector Store, addressing a sequential number of MBs in one hit.

cheers, Aus

I agree, and inverted coils is a thing that I have never seen before using unitronics... its confusing

however there is one use case that works greate with inverted coils.... Hide bit for HMI elements 😅 now you have an Show element instead of hide

  • Thanks 1
Link to comment
Share on other sites

  • MVP 2023
1 hour ago, Fernando Castro said:

however there is one use case that works greate with inverted coils.... Hide bit for HMI elements 😅 now you have an Show element instead of hide

👍

Wouldn't it be great if they offered a checkbox on the HMI element to allow the bit to be used for either hide or show.

Link to comment
Share on other sites

6 hours ago, salt said:

Based on this I decided to dedicate each mode of operation to its own subroutine which run one after another, wherein 8 internal MBs change state before actual output.  Thise are overriden in order:  mode  1 then 2 and last 3. So the last mode turns off relevant MBs set beforehand.

Hi Salt

Looking at your statement above I am wondering how you are calling your sub-routines.

If you are using conditional calls on the subroutines you will get situations like you describe in your first post. If the routine is not being called continuously coils may just hold the last state before you stopped calling the subroutine.

Regards

Denis

Link to comment
Share on other sites

10 hours ago, sgull said:

Hi Salt

Looking at your statement above I am wondering how you are calling your sub-routines.

If you are using conditional calls on the subroutines you will get situations like you describe in your first post. If the routine is not being called continuously coils may just hold the last state before you stopped calling the subroutine.

Regards

Denis

The subroutine are called one after the other with the intention of holding a bit's last state unless one of the subroutines makes it chagnge its state.

I tried before to implement conditional subroutines with  several layers of parent subroutines but it really brings ladder diagram programming to its limits.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...