Michael Walsh

MrPLC Admin
  • Content count

    1796
  • Joined

  • Last visited

Everything posted by Michael Walsh

  1. firstscan sysmac studio

    P_First_Run contact.
  2. firstscan sysmac studio

    P_First_Run contact.
  3. C200HE Backup

    Transferring from the PLC to the PC (I think this was what was intended) does NOT stop the PLC.
  4. Omron Sysmac S6 Program

    For some reason, I cannot post a picture here.  So, here is a link:  https://omca.box.com/s/9golymrzwszr4l6u3bbnqx9f61g79beg I think the drawing is correct.  My mneumonics are a bit rusty.  Edit: Yes, I just entered it (in mneumonics) into CX-Programmer with different addresses (to work with the newer PLC) and it looks like my hand drawn image.  
  5. MQTT_Local_Client for PLC OMRON,Yaskawa

    The Omron Sysmac platform has MQTT Function blocks and works quite well.
  6. simulation nb designer and sysmac

    No. 
  7. Omron CS1D IO redundancy

    It is not automatic, but you could certainly do this with the program.
  8. DWord to Data Types

    You are quite welcome.  This of course works with structure variables and simple arrays.
  9. 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.
  10. 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.
  11. 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)
  12. 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.  
  13. 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
  14. 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.
  15. 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.
  16. 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  
  17. Did you set it as an absolute encoder in the axis setup?
  18. 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.  
  19. 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.  
  20. 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.  
  21. CS1G-CPU43H connecting Kepserverex

    As far as the routing table is concerned, I sent a video on that in my initial response..... https://www.youtube.com/watch?v=kDYP-bUMzEg
  22. CS1G-CPU43H connecting Kepserverex

    ETN21 has an entry for default gateway.  I cannot upload the image for some reason, but it is there. 
  23. NJ501-1520 to ABB ACS880 EIP

    What do you need a function block for?  Set up the tag datalink, set a frequency, turn on the run fwd or rev bit.  Do you need to read and write parameters with Explicit Messages?
  24. MAD44 ANALOG I/O PROBLEM

    Well, my explanation says 103 - 106 are the output words.  So, you are shifted off by 1 word (you used 104 - 107).  Which analog inputs are you trying to use and what type for each one?  I can show you the code to set it up.
  25. CS1G-CPU43H connecting Kepserverex

    This video shows you how to setup the Omron CS1W-ETN21 (it is for a CJ PLC, but the setup is the same): https://www.youtube.com/watch?v=6lWspaNncP8 When it gets to the I/O table part, make sure to upload your I/O table and then add the ETN21 to the I/O table.  You could also do a create here, but if you have some non-default settings it would mess up your addressing, so upload it first, then continue following the video. One thing to note is that you need to set the rotary dials for the unit # different than any other modules that have a green stripe on the top of the face of the module.  Then you need to set the node number to match the last octet of the IP address (for the simplest setup).  It is in hex, so if your IP Address was 192.168.0.50, then your node number would also need to be 50, which in hex is 32 (3 x 16 + 2 x 1 = 50).   If there are other communication modules (green on the top of the face of the module), then you will have to create routing tables that define network numbers for each network (or add to the existing routing table).  This is probably a good idea to do even if this is the first network module.   This is a great video that describes how to do the routing table: https://www.youtube.com/watch?v=kDYP-bUMzEg As far as the Kepware side of things goes, yes, the FINS Ethernet driver is exactly what you need.  There will be some settings where you have to tell it the network number (this will be the number you assign it in the routing table), the node number (the node number dials on the front of the unit) and likely an IP Address. Here is a tech note from Kepware on how to do this: https://www.kepware.com/getattachment/0cc86a2f-5d20-400b-942e-ea86da321791/configuring-omron-plc-with-fins-driver.pdf