ngowans

NJ Controller to NA HMI Alarm Setup

7 posts in this topic

I am just starting with Sysmac Studio. I want to setup alarms from my NJ controller (NJ101-1000 v1.10) to my HMI (NA5-12W101B v1.03). I am trying to use the SetAlarm instruction and ResetAlarm instruction. I configured the SetAlarm to trigger event code 1 and Reset Alarm instruction to stop event code 1. I just programmed a button to cause the fault and another button to reset. I see the alarm populate the alarmviewer in the HMI, but it doesn't show the appearance colour that is configured on the HMI alarmviewer. I am still trying to understand how this works and what the best method for doing all my faults. Is there a better way to program the faults for this system?

Share this post


Link to post
Share on other sites

Hi,

The appearance colour you mention relates to the indicator in the "Status" column, but that column is not shown by default so expect that is the issue. See this movie (@3:18) for more details about adding the columns->Introduction To NA Alarms

Also don't forget that for Controller Events, you have the "NJ Troubleshooter" already integrated.  You can just call a method to popup the screen automatically.

Regards,
BB

P.S. Later this year I heard you will be able to set the Alarm Text colour too! 

Share this post


Link to post
Share on other sites

The SetAlarm and ResetAlarm instructions do not have anything to do  with the NA Alarms.  That creates user defined alarms in the NJ.  To set alarms on the NA, you create them in the User Alarms section of the HMI and assign an expression that involves tags from the NJ.  See below:

The alarm is triggered when Alarm1Bit goes high (The expression can be more complicated with logical instructions, but this is the simple form):

HhLw+kUVVv0AAAAASUVORK5CYII=

Alarm1Bit is an NA variable that is mapped to Alarm1BitNJ as shown below:

5JHOTYOUD7UAAAAASUVORK5CYII=

You can then have some condition set on the Alarm1BitNJ variable in the NJ as shown below (and a reset instruction to clear it):

PbWuaEJMFatWqlrQEAAABA3lekaHGFhWV+wV9IEq

Share this post


Link to post
Share on other sites

Thank you for clarifying this for me. I did not have the status column enabled, I have it now and can see the reflected status.

My plan was to find a way to do the faults that didn't involve a new bit for every fault, but I don't think that is possible yet. I like working with the MItsubishi PLC where I can use the "f" bits for faults and then just call the SD64 register to display on the GOT. I thought I might be able to use an integer to configure what event code would cause each alarm by adding the alarm code, but it appears that isn't the case. 

Share this post


Link to post
Share on other sites

You can use an integer.  You just have to enter the Expression a bit differently in the alarm setup.  See below.

Create a UINT variable in the NJ:

wG0GZrmc8pzsAAAAABJRU5ErkJggg==

Map it to a tag in the NA like this:

w9XHiYoCCWwqAAAAABJRU5ErkJggg==

And then use it like this in your alarm setup:

wEN9NeoqSkUlAAAAABJRU5ErkJggg==

You can then use the Union functionality in the NJ to make the alarm integer an array of bits.  That way you can reference the word or the bits.

Share this post


Link to post
Share on other sites

Is there any other way to address alarms in the NJ logic, to the bit level, and trigger Alarms in NA setup to the BIT level rather than INT level?  I ask because there is the possibility of having more than one alarm triggered in the PLC logic and that would not translate to a single INTeger value in the NA Alarm setup.

 

Thanks,

Share this post


Link to post
Share on other sites

Of course.  Just create a bit for each alarm.  Then for the Expression, instead of saying AlarmCode = 1, you might say Fault23 (BOOL data type) = TRUE.

 

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