skyfox

MrPLC Member
  • Content count

    111
  • Joined

  • Last visited

Everything posted by skyfox

  1. Where can I find all data types used in Sysmac Studio? Thanks.    
  2. NX1P2 CPU. Sysmac Studio 1.45.1 I am trying to find out the fastest way to clear part of a large array short of looping using a for/next loop. Array1[25000] elements I want to clear 5,000 elements by giving a starting index and an ending index. I was looking at the "MemCopy" function. To use that for this purpose, one would need to have an Arrray of [5000] elements with blank values just sitting around using up memory. Would like to avoid that approach if there is a better way to do this. Can some one point me in the right direction? Cheers.  
  3. SetBlock did the the trick. THANK YOU ALL!!!  
  4. NX7 PLC Fatal Error

    Not familiar with that PLC. Just a guess. According to the error message above, it states unable to to save to battery backed up memory during a POWER-OFF condition. Was the power off done by someone or did the system lose power? Could it be because of a bad battery? 
  5. Who sets this "P_On" Bit? Is it described anywhere in Sysmac or NX1P2 manuals? Looked thru the instruction set and didn't find anything. Thanks.  
  6. Sysmac + NX1P2 - P_On Bit?

    Thank you both!!! Cheers.
  7. What does CX Server do?

    Thank you both for the explanation.
  8. Yes. There was an NA HMI in the project. I removed it and deleted the unused libraries and was able to get the size down to 1.9MB. Trying again. NX11P2_MODBUS_TCP.smc2
  9. Few days ago, I came across a Sysmac Studio library file that allows MODBUS TCP communications with an NX1P2 CPU. This was published by OMRON France. Viva La France. I was able to find these files thanks to a member on this Mr.PLC forum named "nanie1991" from Malaysia in a reply on 7-2-2020 to a post named " OMRON PLC with Modbus TCP/IP", that was started on 11-13-2017.Using this Sysmac library, I was able to successfully communicate with an NX1P2 PC using a VB program that I created. I was using the free "EasyModbus.dll" library file available at Source forge with my VB.Net program. That DLL allows you to create a MODBUS TCP Client that can then be used for communicating with a MODBUS TCP server. It also allows you to create a modbus server as well. Basically, you can use any TCP client to talk to the OMRON PLC once you have the SYSMAC library. It only takes 1 rung of code and few tags to make it happen. The EasyModbus home page is at the link below.  I am using the latest version which is 5.06. There are plenty of code examples and library documentation available at the site. I am writing my program in Visual Basic Net (2010) free express edition. I also have tested it using Visual Basic Express 2017. Examples on EasyModbus site are in C# for the dot Net platform. Those can be easily adopted for VB. If anyone is  interested, I will upload my VB.Net project files when done. I am currently working on finishing up the data logging portion of it to a PC and should have it done in a couple of days. I am only reading 16 Tags. But the source code can be easily changed to allow read/write coils and registers etc.     See the attached PDF on using the function block. Attached is a working MODBUS TCP server Sysmac project for an NX1P2 PLC. You should be able to find a free Modbus client to test it out or create your own using the EasyModbus.dll library. Be sure to put the SERVER in a periodic task. I was not able to find or access the TCP/IP Keep-Alive settings on Sysmac side that PDF talks about on page #3. Nevertheless, I was able to successfully communicate with the NX1P2 while it was attached to an NB series HMI as well as being online with it with Sysmac Studio all at the same time. Did not notice any adverse comms issues or with my regular program with 4 Ether Cat slave nodes. Then again, I am only reading in 16 registers with a polling rate of 1 sec.   MTCP_Server_NJNX_E.pdf   Cheers.   EDIT: Unfortunately, forum is not allowing me to upload my Sysmac project file. Throws a warning saying only allowed to upload a 3.91 MB file, Not sure because this post has several uploads. I will try again after posting this. My Project file is only 4.03MB and it does not compress to any lower either. Follow the link in the PDF to get the OMRON library file and the screenshot above shows the only logic needed to get started with MODBUS TCP comms with an NX1P2 PLC.    
  10. Still can't upload my Sysmac project file for my reply above. File size limit of 3.91MB limit seems rather odd. Project file is 4.03MB (after compressing) and I can't reduce it anymore in Sysmac Studio. I only have two total rungs of code and few tags. It won't now even allow me to paste a 32Kb png file showing the file size of my Sysmac project. Throws the same you are only allowed 3.91MB upload. Is that size for one topic? Anyone knows how I can upload my project file on to this thread? Cheers.      
  11. Have you looked in to using OMRON's FINS protocol? Do a Google search for Omron FINS protocol to VB .NET. Someone actually had a video explaining how to do this with a link to his web page for the file. 
  12. Thanks. I did not know one could do that. I thought each array element had to be manually mapped in to the address translation. As far as why I want to copy the array, it is for saving the data in one array after an process ends. So the original array can be used for collecting new data for the next run. Cheers.
  13. I have an array of 30 Reals.   "Pressure_1"   declared as  30 reals. How do I transfer/copy this to another array of same length? I want to copy... Pressure_1.0   to %D0 ... ... ... Pressure_1.29 to %D59   Without having to explicitly enter %Dxx in to the "AT" designation 60 times manually. This would be sheer insanity if I have arrays of thousand elements etc. Is there an easier way to do this?   Thanks.    
  14. New to OMRON's ecosystem. I have been trying to figure out how to get data from NXIP2 to an NB HMI. It appears that NB HMI data is not tag based and therefore, I need to develop the program using CJ-series memory types available for NX1P2 in Sysmac Studio. Problem is, I have no idea what following memory area types are. CIO, WR, HR, and DM. I have not been able to find any useful information regarding definitions for these nor the syntax that is to be used. I speed read thru over 20 different  OMRON pdf's in the last 3 or so days that were related to Sysmac Studio, NX1P2, & NB Designer without much luck. From what I discovered, I have to enter these variables (depending on which type I end up using), in to Global Variables "AT" column.  Can someone point me in the right direction as to where to find information and usage syntax for these memory areas? I am guessing these are 16 bit data words. That begs the question. How does one pass a floating point number from NX1P2 to an NB HMI? Does the HMI have the ability to convert integer values to the floating point number that they represent?   Thanks.  
  15. I have a screen with several variables displayed to an end user that indicates results of a test run. How do I save this data values to the plugged in USB drive?   Display screen will have the following format. Run ID # (integer) User Name (String - 20 characters - 11 Bytes) Batch ID# (integer) Test Data 1 (Real) Test Data 2 (Real) Test Data 3 (Real)   All these are contiguous %D Memory addresses (D100 to D119) read from the PLC that will be shown on a HMI screen. Upon a button press, I would like to write this data on to a CSV or a text) file shat will be saved to the plugged in USB drive. Is this possible? File name can be either the RUN ID or the BATCH ID. Thanks.
  16. Data memory registers %D300   to %D399 which are not part of an array - How do I clear the contents of these registers without having to clear each one individually? Is there an instruction that can clear this or a similar range? Thanks  
  17. Thanks. I was wondering if there was a function to do this by providing a starting address and then #of contiguous addresses to clear. Doing it this way by declaring an array, does it increase the memory consumption or does the declaration act as a pointer?
  18. How does one go about exporting a function block from one project and import it in to a another?
  19. Anybody else annoyed by this? It is 2021. That is not how Windows OS work. OMRON NEEDS TO FIX THIS. Is it just me and my misplaced disappointments? It is barely 1:45 AM in the beautiful Pacific Northwest and I am all out of Scotch. The next state sanctioned liquor store doesn't open for another 10 + Hours. I am going to stop programming now.
  20. I couldn't find an option to take an existing screen from a project and re-use it in another. Is this functionality not available with NB designer?   Sorry. Wrong forum,. There wasn't an option to delete this. Can an admin move this to the correct forum? On that note, how about an option for an OP to delete a posting, if no one has replied to it? My Apologies.
  21. Perfect. Thank you!