navigatoru Posted February 22, 2015 Report Posted February 22, 2015 Hi guys, I tried to do a logic for some MBs such us: If MB01=1 AND MB02=1 then MB03=1 Else MB03=0 End If I've found the AND, OR and XOR gates in the Logic menu, but looks like these gates don't accepts as input the MBs (just MI, XI, ML, etc). There is a reason for not accepting MBs as inputs? There is any option to have these gates for MBs? Cheers for help, Marius
EduMarg Posted February 22, 2015 Report Posted February 22, 2015 Hello Marius, The AND/OR/XOR logic functions evaluates the state of two integers. This gates can not be use with MB directly. You can convert a two vectors of MBs to MIs then use the gates between this two MIs. VIsiLoigc uses Ladder diagram to program the PLC In ladder diagram you can do what you wish with two dirrect contacts and a direct coil as fallow. ---[MB1]----[MB2]------(MB3) regards.
navigatoru Posted February 22, 2015 Author Report Posted February 22, 2015 Hello Marius, The AND/OR/XOR logic functions evaluates the state of two integers. This gates can not be use with MB directly. You can convert a two vectors of MBs to MIs then use the gates between this two MIs. VIsiLoigc uses Ladder diagram to program the PLC In ladder diagram you can do what you wish with two dirrect contacts and a direct coil as fallow. ---[MB1]----[MB2]------(MB3) regards. Hi EduMarg, Thanks for reply. I tried to find in the manual how to convert the vectors of the MB to MI. It is something as MB1=1 -> MI1=00000001 or MB2=0 -> MI2=00000000 ? Could be a silly question, but I am not sure about Visilogic philosophy ... Cheers, Marius
EduMarg Posted February 22, 2015 Report Posted February 22, 2015 Marius. The memory on Vision PLC is a diferrent from other PLCs in Vision MB1=0 is not the same as M1=00000001. There is not direct relation between MBs and MIs as opose for example with siemens where MB0=1 is equal to MI0.0=1 or MI0=00000001. This means you can use in VisiLogic MB0 with out interfering on the value of MI0. To convert from MB to MI you need a function block called bit to num. you can read information about this FB on the help file of VisiLogic. Is there any specific reason why you whant to use the and/or/xor FB instead of ladder logic? regards. 1
cantcliff Posted February 23, 2015 Report Posted February 23, 2015 I think the confusion is that an and/or function block is designed to work with MI type data sets. When working with MB, you don't need to use the function block, you use the design of your ladder diagram to make your AND/OR on MBs.It sounds like you don't have a good understanding of relay ladder logic (RLL), which is where you should start first.Using your example: If MB01=1 AND MB02=1 then MB03=1 Else MB03=0 End If [MB1]----[MB2]-----(MB3) In this case, when MB1 and MB2 are both active (AND), MB3 is turned on. This ladder is identical to your IF/Then/Else statement in terms of functionality. If you wanted an OR function it looks like this: [MB1]----|-----(MB3)[MB2]----|If MB1, or MB2 is on, the circuit to MB3 completes. This is the same as: IF MB1 OR MB2 THEN MB3=1ELSE MB3 = 0ENDIF There's a lot of "Gotcha" situations you need to keep in mind when working with RLL.
navigatoru Posted February 25, 2015 Author Report Posted February 25, 2015 Hi Cantcliff, You are right, I am not too familiar with RLL as I am used more with the structured text programming than the ladder diagram. My confusion it was that in other PLCs I have seen function blocks already built for OR/AND/XOR gates, including for MBs as compared with Visilogic where the function block is just for MIs (and similar data types). Thanks for your reply, much appreciated your help. Cheers, Marius
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now