Language AWL
Date: | 04/20/05 |
Author: | Marzhuhin Alexandr aka Sly |
URL: | n/a |
Comments: | 3 |
Info: | n/a |
Score: | (1.70 in 23 votes) |
+--------------------------------------------------------+ | This is program "99 botels of beer on the wall" on AWL | | of Simantic Siemens STEP7 (with simply output) | | by Marzhuhin Alexandr aka Sly AlMRu@Beep.ru | | more info about STEP7 www.ad.siemens.com | +--------------------------------------------------------+ declare variebles: --------------------- db2.dbw "Botels_of_Beer" dec 99 --------------------- address decl name type comments 0.0 in take_botel_of_beer bool Signal for take on botel 2.0 in Timer_Function timer timer function used for take-off delay 4.0 out Process_Message char Message XXX Botels of beer on the wall 6.0 out End_Message char No more beer :-( in_out temp -------------------- AUTHOR Sly FAMILY The Program 99 Botels of beer NAME : 99 Botels of beer VERSION : 1.0 FUNCTION_BLOCK FB20 VAR_INPUT Botels_of_beer: INT; END_VAR BEGIN CONTROL:=FALSE; INDEX := 99; Process_Message := "Botels of beer on the wall"; End_message := "No more beer :-("; Botels_of_beer := 99; FOR INDEX:= 1 TO ENDVALUE DO Botels_of_beer := Botels_of_beer - 1; IF Botels_of_beer >0000 THEN CONTROL = TRUE OUT := Botels_of_beer; OUT := Process_Message; END_IF END_FOR; OUT := End_Message;
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
thomas heuser said on 07/16/05 12:35:15
this code doesn't work
[paZx] said on 09/09/07 20:35:10
This is SCL not AWL
hpl said on 09/20/09 11:06:54
this is completely bullshit and doesnt represent anything of the awl language exclamated the header. its not a valid function that would do anything on a s7 controller. it should be deleted. maybee i write it down and send it in sometimes.