WKTilton

NJ Bits to NA Alarms

4 posts in this topic

I am new to Omron Programming, Sysmac Studio NJ processor & NA hmi.  I am used to being able to create diagnostic PLC logic using BIT addressing from a DINT variable for setting diagnostic signals for an HMI.  I can also use the DINT to do a quick check to see if it is greater than 0, therefore signaling I have a Machine Fault.  I cannot seem to figure out a way to get those BITS setup in the User Alarms of the NA programming.  I have found where you can setup a Datatype/Union to be able to use the DINT scenario and Bit level in PLC programming....but that doesn't help on the HMI side.

Any thoughts??

Share this post


Link to post
Share on other sites

You can use unions for this.

First, create a union like so:

Union.jpg.64bd2ec44bc80f7f9a26da19631728

Then, create a variable that is of that type:

UnionVar.thumb.jpg.093b3bd0ec951ff3285c2

If you click on the comment field, you can select a small button on the left side of the field.  You can go give each of the 32 bits in the variable union a comment:

5e432960d8287_Commenteach.thumb.jpg.4634

Then, when you use that bit in ladder it shows up like this:

coilcommnet.jpg.8220b2dd6ce7328a6c7bed3c

You can then monitor all 32 bits, like this in your code:

5e4329e2bb3a4_dwordmonitor.jpg.e689e5fbb

 

Now, to make an alarm in the HMI.  First go to the variable mapping section:

Type in the name that you want the variable to be mapped to in the HMI.  I just used Currentalarms as my name:

VarMap.jpg.66d3c1511bdee542eb2fdec3a978c

Next, go to your alarms and add an alarm as shown below:

newalarm.thumb.jpg.7df54a482e03e10631e0b

 

Then add an alarm viewer on a screen.  See the simulation below:

5e432b103bddf_alarmsim.thumb.jpg.1c70765

Share this post


Link to post
Share on other sites

Totally what I was looking to do!!  I knew there had to be a way.  I love this Mr. PLC forum.  Thank you for the help....I know I will be back with more question :)

Here is one that is just a "why is it like that when mine is not...."....when you create your Alarm in the HMI, the Name translates to the Alarm ID.....in your pictoral example, you have "MyAlarm0 but it translated to "Group0_MyAlarm1", mine stayed "Group0_MyAlarm0".  Just a curious question.

Thanks again....

Share this post


Link to post
Share on other sites

I may have added two alarms and deleted one... not sure.

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