1/26/2015 11:47 AM | |
Posts: 6 Rating: (0) |
Hi I hope you can give me some assistance, I’m new to S7 and completeing some exercises for testing. In my program I have 2 faults caused by pushing a pushbutton. I’ve done this using in, out, in-out and stat parameters using a fucntion block and calling it twice originally and all worked out as expected (similar to example 1).However, while doing the exercise with Functions I’ve notcied something happening which I can’t explain. In the first example below everything works correctly fault 1 causes display 5.1 to activate and fault 2 causes display 5.2 to activate. However in example 2, when using a local temp varriable instead of an IN_OUT varaible for Edge_Memory (p) when one fault is set both display lights are coming on. From investigating it looks like after fault 1 is triggered the out parameter is staying high with out the flip flop being set when the function is called the second time. ( I've observed both the inputs into the FF when the fuction is called for the second time after the first fault has been set, both remain low but out display is high) Can anyone explain why this has happened because it doesn’t make sense to me I thought when the function is called for the second time. The out parameter Display would be dactivated because the flip flop is not set. If the out is staying high how come example 1 works where only one display comes on? When I used an FB and used a STAT variable for Edge_Memory the system behaved as expected with only a single display light coming on at a Time. Thank you in advance for your help! Please see attachments AttachmentSeimens.zip (114 Downloads) |
Last edited by: AutoGen_778447 at: 1/26/2015 11:49 AMLast edited by: AutoGen_778447 at: 1/26/2015 11:48 AMLast edited by: AutoGen_778447 at: 1/26/2015 11:48 AMLast edited by: AutoGen_778447 at: 1/26/2015 11:48 AM |
|
Follow us on