MechEngi
MrPLC Member-
Posts
18 -
Joined
-
Last visited
Profile Information
-
Country
Canada
MechEngi's Achievements
-
Ding ding, we have a winner! Thank you very much! It's weird that this instruction is not in the "Conversion" section of the instructions list, but rather in the "Floating-Point Math" section.
-
Hi, Is it possible to convert a number (a REAL or DINT in my case) to an ASCII string equivalent in CX-Programmer (I'm using a CP1H) ? For example : REAL = -12.3456 -> String (starting from W0 for instance) = [2D 31][32 2E][33 34][35 36] [- 1] [2 .] [3 4] [5 6] [W0] [W1] [W2] [W3] For a DINT, the process would be the same but there would never be any decimal point (but there could be a minus sign AKA 0x2D in ASCII). This operation is trivial in Sysmac Studio, but seems quite tedious in CX-Programmer.
-
That's very clever. Thank you photovoltaic !
-
EX144 and EX1030 Error Code
MechEngi replied to Mendon Systems's topic in Website Suggestions or Problems
I'm having the same issue when I do a search and if I create a new post. -
Is there a way to quicky (using a built-in instruction) to compare ALL values of two variables that have the same structure data type? I naively tried the "<>" instruction but the Help says that only singular values and enumerations can be specified. I'm pretty sure AryCmpEQ won't work either. My goal is to check if all values of both variables are equal. In my application, the structure data type is quite deeply nested and it would not be very elegent to manually compare every single substructure value by hand.
-
This was my first tought, but I'm unfamiliar with how that works in CX-Programmer. I tried something but it did not work. Here is a screenshot of the parameters that I tried in the FINS/UDP menu : Here are the current (unchanged) network settings: What did I do wrong?
- 10 replies
-
- communication
- cp1l
-
(and 2 more)
Tagged with:
-
After asking the IT guy, we do have a VLAN on subnet 10.1.46 (VLAN 20). Yes that is the case. I even have a central HMI that connects easily to both PLC's. That is also the main reason why I posted here. I figured that if my PC and the central HMI can both easily connect to either PLC's, then the PLC's can certainly communicate with each other rather easily.
- 10 replies
-
- communication
- cp1l
-
(and 2 more)
Tagged with:
-
That's a very interesting summary. Thank you for taking the time to write that down. After furter investigation, it seems that our plant's netword is as follows : A bunch of equipment on subnet 10.1.14, wired to a few switches A bunch of equipment on subnet 10.1.46 wired to a few switches, sometimes on the same switch 2 routers for the whole plant into which all the switches are connected That means that our current network architecture is viable for my original intent, is that correct? The end router will eventually receive the packet and somehow (this is the part I'm interested in, if there's a setup to do) send it back to the right place ?
- 10 replies
-
- communication
- cp1l
-
(and 2 more)
Tagged with:
-
To my untrained eyes, these two devices are interchangeable, so I may have used the wrong term. In any case, as mentionned, they are both physically connected to the same device (be it a switch or a router). I'm guessing there is nothing special to do in that device to allow communications between the two PLCs?
- 10 replies
-
- communication
- cp1l
-
(and 2 more)
Tagged with:
-
Following my post from yesterday and the fix proposed by @chelton, I went ahead and expanded the solution to multiple PLCs in the shop. Now I'm stumbling on another layer of difficulty : I have to RECV in a CP1L-E (10.1.14.214) from a NJ-301 (10.1.46.118). Both PLC's are physically connected to the same Ethernet Switch in the shop, but the IT guys decided to add a new subnet for PLCs and equipment some time ago. I read Michael Walsh's answer on this post but I couldn't figure out how to set things up properly with 2 subnets that are not consecutive. What do I need to setup in the CP1L-E to be able to RECV properly? There is certainly a routing table setup that I need to add but I cannot figure it out by myself. Here is the current setup : In the NJ, I have a UINT variable mapped At %W0, Network Publish set to "Output" The RECV command in the CP1L-E is as follows: C0 = 0001 (1 word) C1 = 0001 (Port 0, network 1) C2 = 7600 (node 118, unit address 0) C3 = 0203 (port 2, 3 retries) C4 = 0032 (5 sec timeout) The Built-in Ethernet parameters in the CP1L-E are attached Thanks !
- 10 replies
-
- communication
- cp1l
-
(and 2 more)
Tagged with:
-
Well, that was it ! Works like a charm now ! You're right about receiving instead of sending too. I originaly wanted to send data based on an updated in status of the sender PLC, but it makes more sense to ask for data when needed in the sequence.
-
I'm trying to simply send 1 word of data from 1 CP1L-E to another one, on the same subnet. I dont have any CP1W-EIP61 adapters and wish to know if it's possible to do it using only the built-in Ethernet Port on the PLCs. Setup: Sender PLC's IP address is 10.1.14.62 Receiver PLC's IP address is 10.1.14.214 1 word of data needs to be sent from W20 in the sender to W20 in the receiver Both PLC's are connected to the same network switch in the plant My current control word parameters : C = 0001 (1 word of data) C+1 = XX00 (XX = which port number should I use?) (00 = local network) C+2 = D6FA (D6 hex = 214 decimal, which is the node address of the receiver PLC) (FA = Unit address setting for CPEL-E Built in ethernet port) C+3 = 0005 (0 = Response required, 0 = port #0, 05 = 5 retries) C+4 = 0064 (10 sec monitoring time) In the receiver PLC, the W20 word never changes. In the sender PLC, the Error flag (A202.00) always turns on. What am I doing wrong?
-
Get Event Name string from Troubleshooter / Event Code
MechEngi replied to MechEngi's topic in NJ Series / Sysmac Studio
Happy to, but again, @JYG 's solution is simpler and efficient. I coded another script in Python to import all these Event Name to an array variable in Python. The setup is again pretty simple : Create a Structure Data Type with 2 members: Name : "Code", Base Type : "DWORD" Name : "EventName", Base Type : "STRING[100]" Create an array variable called OmronAlarmList[2220] (could be 2357 if you have Sysmac version 1.55 as @JYG mentionned). Make sure to make it "Retain" Download to the PLC Export your variables while online with the PLC Tools -> Backup -> Backup Variables and Memory In the XML generated by Sysmac, scroll to the 1st entry of variable OmronAlarmList[0].Code and delete everything up to the last entry of OmronAlarmList[2219].EventName Paste the following text to replace the values of the variable with the ones I imported through my script (file is attached) Make sure to select the line that was previously occupied by <Item Name="VAR://OmronAlarmList[0].Code" DataType="DWORD"> Save the modified XML Import in Sysmac while online with the PLC Import only this specific variable to prevent any corruption It worked like a charm for me ! Omron Alarm List.xml -
Get Event Name string from Troubleshooter / Event Code
MechEngi replied to MechEngi's topic in NJ Series / Sysmac Studio
For anyone interested, I extracted the "Code" and "EventName" attributes of every entry of the XML mentionned by JYG (very simple in Python), and exported it to a CSV file. File is attached. AlarmList.csv