Michael Walsh

MrPLC Admin
  • Content count

  • Joined

  • Last visited

Community Reputation

237 Excellent

About Michael Walsh

  • Rank
    Omron Expert
  • Birthday 07/22/73

Contact Methods

  • Website URL http://

Profile Information

  • Gender Male
  • Location Charlotte, NC
  • Country United States

Recent Profile Visitors

13177 profile views
  1. DWord to Data Types

    You are quite welcome.  This of course works with structure variables and simple arrays.
  2. Good Morning I am a beginner in PLC programming using the Sysmac Studio software and please help me if you can :-D I'm trying to make an omron NX1P2 PLC read some message via Socket UDP to my PC through the Socket Test program, do you have or know any program with an example application in ladder? thank you

    1. Michael Walsh

      Michael Walsh

      Ok, I cannot attach any files to the site as it is having some technical issues.  I have however placed them on a site for you to download.  Check this out:


  3. From the author: The print statement is printing raw bytes as that is the response from the PLC. By default Python’s print will format any printable characters as ASCII, which you can detect by the fact that they are not preceded by the \x statement indicating they are hex. With this in mind the % character is ASCII value hex \x25 and U is ASCII value hex \x55, which leads me to believe it is a process value and the least significant byte is noise (hence the 55 vs 57 difference from the memory table). Normally the programmer would slice the bytes that they read off the response and format them the way that the intend to use them (FINS doesn’t know if that hex value is an integer, unsigned integer, real, etc.). If you always want the response in hex, you can use the binascii.hexlify library.
  4. DWord to Data Types

    You can comment on the bits.  I cannot attach the picture of this as there is something wrong with the website. Go into the global variables after you have created the union and then created the variable of that union type.  Double click in the comment field and a little gray button will show up.  You can then comment the DWORD and all the BOOLS.
  5. Good Morning I am a beginner in PLC programming using the Sysmac Studio software and I believe you can help me with any doubts, I am trying to make an omron NX1P2 PLC send some message via Socket UDP to my PC through the Socket Test program result yet, do you have or know any program with an example application? thank you

    1. Michael Walsh

      Michael Walsh

      I was going to suggest that you make a forum post on this.  I do not have any code.  I will look around and if I find something, I will reply to your post.  There is a problem with the website and attachments cannot be made right now. 

  6. I received a reply from the author of the library (his email is also in the source code and on the contact page at the link provided above): It is all hex according to the memory address designation of FINS so 1234 would be \x04\xd2 and since it is a DM, the bit designation is \x00, so it would be:   mem_area_dm_word = fins_instance.memory_area_read(FinsPLCMemoryAreas().DATA_MEMORY_WORD,b'\x04\xd2\x00') print(mem_area_dm_word)
  7. DWord to Data Types

    A union will do exactly what you want.   I cannot post an image to illustrate it for you (something is wrong with the site), but you can create a Union that looks like this: Name                           Base Type TestUnion                     UNION      DWordLevel            DWORD      BitLevel                   ARRAY[0..31] OF BOOL   Then create a variable (lets call it MyVar) that is of type TestUnion in your global variables.   Then you can do a move DWORD#16#F into MyVar.DWordLevel The bits can then be monitored on contacts or coils as MyVar.BitLevel[0] as an example.  
  8. A colleague of mine has done extensive work with Python and communicating with Omron PLCs.   Here is some FINS Python stuff that might be useful: https://aphyt.com/index.php/projects
  9. You can simulate both, but the NB-Designer software simulation does not have the ability to connect to another simulation.  Omron's NS and NA screens can do this, but not the NB.  It only has Offline Test Mode.
  10. De-Normalize the binary Data

    I am not clear on what you are trying to do here..... is this some kind of custom number format that you are trying to use?  I think what you would need to do with a custom format like this is to create a union.  The union will allow you to look at individual bits as well as a WORD or DWORD value.
  11. cp1w-cif01

    You have to set the port up to RS232 mode in the settings and then use the TXD command.  Of course you have to wire the printer serial port properly to the port first. Pinout here:  https://www.myomron.com/downloads/1.Manuals/PLCs/UNITS%20CJ_CP_NJ/CP1W-CIF01_CIF11_CIF12%20Pages%20from%20W471.pdf  
  12. Did you set it as an absolute encoder in the axis setup?
  13. continuously writing Retained tags

    Ah, I understand.  Writing constantly to a retained variable will not reduce the life of the memory.  The retained memory is only stored when the processor is powered off.  The capacitors in the CPU give it time to do so.  
  14. Set values

    Double click on Memory in the Project Workspace.  If some windows open up with the data in them, you can download the memory areas (usually DM area, perhaps HR area).  If no window with data opens up, you can click the open button and browse for a file that may be separate from your project.  If this file does not exist, then there is no way to get the data back in the PLC besides manual entry.  I would add some pictures, but something is wrong and is not allowing me to do so.  
  15. continuously writing Retained tags

    There is a search function, but it appears to be broken right now.  I am not sure what you mean by " The fact we cant read or write function blocks from the HMI".  Do you mean you cannot access the function block memory by name, like FBName.Done?  If that is what you mean, you are correct.  The FB instance is a local variable and only Global variables can be accessed by the HMI. With respect to not splitting the parameters and working-values in different structures, did you look at In/Out variables as an option for the FB?  You can have Inputs and Outputs of the function block in the same structure using the IN/Out variable when designing the function block.