mr_electrician

MrPLC Member
  • Content count

    292
  • Joined

  • Last visited

Posts posted by mr_electrician


  1. On 10/1/2021 at 8:35 AM, photovoltaic said:

    You'll need to use something other than D registers at first as they don't have bit-access. W or H I would recommend. You could simply map the CIO bit to the W bit in the correct MSB-LSB order.

    Thanks for the reply.

    I ended up mapping my 10 inputs to W15 and then grapping only the first 10 bits of that word.  Works like a charm!!

     

    Turnhead.jpg


  2. Hello guys.  Been awhile since I have been on here.

    I am wanting to integrate a 10 Bit Automation Direct Encoder into some logic that will reside in a CP1H Processor.

    I have used the first 10 inputs of the CP1W-40EDR expansion module and need to get those inputs into a word, which then hopefully would be used in the GRY (474) function.

    Does anyone have any insight on how I would gather those 10 inputs into a word?

    Encoders (automationdirect.com)


  3. Now that this is solved I need to figure out why the screen is soooo sluggish when changing from one screen to the other.

    I have my update rate as fast as it can go however when I select a screen to go to it takes around 2 to 3 seconds to finally load the buttons and indicators.  The background and various shapes load instantly.

    Any thoughts on this one?


  4. Thanks for the tips to delete the object and recreate.  Not only did this work but it also verified that FT is nothing but a piece of garbage.  I should not have to waste my time creating simple text just to have to delete it and recreate a runtime file and re download.......just to then recreate my simple text object and re recreate a runtime file so I can download.

    OMRON is so much better.....make a change and download.  No special runtime file needs to me made first.


  5. Hey there forum guru's!!!

    I am trying to read through the manuals for an NX-HAD401 High Speed Analog Input Card.  It is not very clear as to where you assign your variable in order to grab a channels analog input value.  Can you point me in the right direction?

    I am thinking it is in the "Analog Input Values 1 to 10" and if so why is it set up as an array?  Is it because it takes the average of the samplings and uses the result as the channels input value?

    I am sure I will have more questions but this may clear up a few.

    HAD401 Configuration.jpg


  6. Hello group.  I am having difficulties selecting a specific ARRAY position that comes from a CJ PLC into SYSMAC for NA5 HMI's

    I have created a Symbol called Bump_Lift_Offset as a DWORD and an array size of 5 resulting in DWORD[5] starting at D8740

    I am trying to show on the HMI the value listed in each array address but the software keeps crashing when I type in for example Bump_Lift_Offset[1] which would be my second position in the array resulting in address D8742.

    I have tried various Data Types on the Sysmac side with no luck.

    I have attached a few images to provide a better explanation.

    Truck Type Bump Array.jpg

    CJ Variable.jpg

    Sysmac Variable.jpg

    Sysmac Errors.jpg


  7. 1 hour ago, Michael Walsh said:

    Where I saw the extra space was in the equation for the Global Event that he had.  I think it just triggered him to just remove all references to the _HMI_CurrrentPageIndex and start over.  

    That's exactly what I did.  I deleted all the global events I created and re mapped the registers.  

    I wanted to give a shootout to @PMCR as well.  My code worked but I think his code example was cleaner!

    Thanks everyone for your extra set of eyes!!! I knew it was something simple but as we know, sometimes the forest drowns out that one tree you need to see!


  8. Just an update…..I finally got it working at 10 o’clock last night using my code.

     

    This issue was somehow I had _HMI_CurrentPageIndex instead of _HMI_CurrentPageIndex . 

     

    What’s the difference you ask…….well one of them has a space after the word Index and the other did not.

    Thanks @Michael Walsh.  Once again you have saved my day!!


  9. 14 hours ago, chelton said:

    I don't have 2 x NA's to test, but why cant you have a single global DINT in the PLC that both _HMI_CurrentPageIndex are mapped too? I can't see why the ladder code is needed at all?

    I elected to use ladder code instead as I will also be mapping the current screen over to a CJ PLC that will allow some functions to work in it's code based on what screen the user is at.


  10. 15 hours ago, chelton said:

    Is it possible you have accidentally mapped both screens _HMI_CurrentPageIndex to the same global variable? or left the global event in?

    Nope, I have mapped the _HMI_CurrentPageIndex separate in each HMI under its respective HMI name.  I have also deleted all my Global Events that I was trying before.


  11. 23 hours ago, PMCR said:

    I am not sure why your code is always 1 screen behind.  I loaded the code that I posted into an NX102 and a pair of NA5 HMIs, and it tracks correctly, regardless of which HMI switches pages.  I only tested with 3 pages, but I don't think the number of pages matters.

    I am getting close.  I have one screen now following the other, however, the other screen will not change even though the _HMI_CurrentPageIndex number has updated.

    I noticed in your example that your HMI's are both the same IP address??????  How is this possible without getting a conflicting ip address error msg?

    My system had dedicated ip addresses for each piece of hardware.  for the screens they are 10.3.65.2 and 10.3.65.4

    I do notice when the screen that does not respond has it's Ethernet cord unplugged and then plugged back in, it will then update the other screen to where it is currently at????

    Hopefully some others can chime in and give some clues.

    Perhaps @Michael Walsh could chime in?

    Screen Mirror Ladder 2.jpg


  12. 3 hours ago, PMCR said:

    I am not sure why your code is always 1 screen behind.  I loaded the code that I posted into an NX102 and a pair of NA5 HMIs, and it tracks correctly, regardless of which HMI switches pages.  I only tested with 3 pages, but I don't think the number of pages matters.

    I think I see how you did it now.  Once I looked into the variable mapping I seen how you tied it to _HMI_CurrentPage.

    I was trying to use global events.  I will try your method tomorrow as it's time for some Inductive University #Ignition training!!!


  13. 1 minute ago, PMCR said:

    I am not sure why your code is always 1 screen behind.  I loaded the code that I posted into an NX102 and a pair of NA5 HMIs, and it tracks correctly, regardless of which HMI switches pages.  I only tested with 3 pages, but I don't think the number of pages matters.

    Are you using any global event in the HMI?  For example, the PLC only knows what screen the respective HMI is on when I set up a global event called interval, set at 100ms, and set variable Current Screen = _HMI_CurrentPageIndex


  14. On 8/14/2020 at 9:40 PM, PMCR said:

    OK.

    So I think this is fairly simple, but I have not tested it.

    See the attached sample program.

    I am tracking the screen names for the 2 HMIs in the PLC, not in the HMIs.

     

    Screen Mirroring Updated.smc2

    Thanks.  This seems very similar to what I am doing except that I am using page index.  The issue I am having right now is the page seems to be lagging and always one screen behind.

    I noticed you are using the page name.  I don't think it matters if I am using page name or page index?  Any idea on what is causing the screen to lag behind by one button push?


  15. Hello group.  I am struggling to mirror screens on a machine that will have 2 NA5 HMI's.

    I want to have it so the screens match no matter where the initial screen change started,

    For example if an operator selects a screen by way of a GoTo button, I want the other HMI to also follow to that screen.

    I am trying to use the _HMI_CurrentPageIndex and the _HMI_IsPageSwitching tags in each HMI.

    Each HMI has it's own name and IP address.

    I can see the registers updating in the PLC so i know that the page index is being sent to the PLC.  What I cannot get to happen is commanding the other HMI to change to a page index.  

    I also have logic to flag who is leading, or in other words.....who to follow.

    Could someone give me a suggestion or hand what I need to do.

    I have attached some screen shots.  One is trying with ladder logic which did not seem to work so I falsified it so i could try doing it as a sub routine that is called when the page switching is active.

    Screen Mirror.jpg

    Screen Mirror Ladder.jpg

    Global Events.jpg


  16. Hello group.  There does not seem to be a lot of information or guides on how to do this but I am having errors pop up when I build my project due to wrong data type.

    I am creating a log in screen for the NA5 and will send the information to an NJ PLC.

    I have selected the keyboard entry to be querky which will allow the user to enter an alphanumeric entry.  I figured this would need to be a STRING and so I have set up as such.  I also linked it to the PLC tag that has the same attributes as I want all the security to be handled in the PLC.

    Does anyone have experience with sending to/from an NA5 and NJ PLC a text entry using the DataEdit feature?

    SecImage1.jpg

    SecImage2.jpg

    SecImage3.jpg


  17. Hello group.

    I am practicing ST programming and am doing this by converting an existing Ladder Logic program into Structured Text.

    I have created the following attachment and I can see my BOOL objects change state when I touch the respective buttons on my HMI.  The issue I am having is the Accumulating Timer will not start timing when the conditions are met.

    Can someone with experience in ST advise me what I am missing or doing wrong.

    Thanks

    ST.jpg


  18. 10 minutes ago, Michael Walsh said:

    Library project is for building Libraries.  A library is a file that contains custom data types, functions, function blocks, etc. that you would want to use in other programs.  When you include a library in your project, the functions and function blocks will show up in your toolbar for you to use.

    IAG project is for creating custom objects that can be used on HMI screens.  Similar concept to a library but for the NA screen.

    Interesting.  I am attempting to create custom Log In screens and programming as my employer does not like the NA5 on board security. 

    This new logic involving pop up's and a combination of Ladder and ST would be used in multiple projects so this may be what I should be creating.