Sign in to follow this  
Followers 0
Tigamaroo1999

Buzzer Question

7 posts in this topic

How do I turn on and off $SB12? I have written a macro in a command button that: When a user pushes the button, the screen will change to one or another depending on whether or not a proximity sensor "sees" the material. This works fine. However, all I want to do is have the buzzer buzzing when one screen pops up. How do I do this? Thanks in advance. Tigamaroo

Share this post


Link to post
Share on other sites
This is just of the top of my head, I haven't tried it but can you just put the line: $SB12 = 1; in the 'When Loading a Screen' macro of the screen in question? This macro is accessed by looking at the screens properties. Also, you could put the line: $SB12 = 0; in the 'When Unloading a Screen' macro of the same screen to turn the buzzer off, if that is what you desired. Indeed, these bits can be manipulated from within any macro. (I believe.) Further, you can control the '$SB' bits from the PLC. You should have an area set up by looking at the 'Initial' tab of the Settings>Sytem Setting menu. If the 'System Memory', '$SB Allocation Address' is set to HR100 (for example), $SB12 represents the twelfth bit of this allocation, in this case HR100.12. Toggling this bit from the PLC will toggle the screen buzzer. Hope this helps. Apologies if I have some of my facts wrong, but it's been a long day! Andy.

Share this post


Link to post
Share on other sites
I swear that I tried that about 100 times on Friday. I got to work this morning, plugged it in, and it worked fine. I guess that getting near a weekend really distracts me! THANK YOU FOR YOUR HELP! Tig

Share this post


Link to post
Share on other sites
I know what you mean. Amazing what a weekend off can do isn't it? Presumably you are using the function SHOWPAGE(n); in your macro. One point to note, if you haven't found out already, is that anything written after this line in a macro will not be executed. Wrong: SHOWPAGE(n); $SB12 = 1; <--- This line is not executed Right: $SB12 = 1; <--- This line is executed SHOWPAGE(n); Andy.

Share this post


Link to post
Share on other sites
Good thinking, Andy_P, very astute!

Share this post


Link to post
Share on other sites
Good point. I started out trying to incorporate the buzzer into the macro programming, but soon realized I needed to dumb it down a bit to find my issue. I'm sitting pretty well right now...the machine operators are going to *love* me!

Share this post


Link to post
Share on other sites
I find if you keep it simple and make it look flash, the managers will love you too! Andy.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0