-
Posts
3,261 -
Joined
-
Last visited
-
Days Won
236
Content Type
Profiles
Forums
Gallery
Events
Blogs
Downloads
Articles
Media Demo
Everything posted by Flex727
-
Help with Modbus TCP IP
Flex727 replied to dhuggins88's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
You're too kind. My approach, as is most of the other experienced members on this forum, is not just to answer questions, but to teach. More education helps the user and anyone else browsing these boards. I could have written your program for you in about 2 minutes flat, but you would not have benefited as much. We all learn best while doing, not watching. -
Help with Modbus TCP IP
Flex727 replied to dhuggins88's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
Me too. Their input is the best on this forum. -
Help with Modbus TCP IP
Flex727 replied to dhuggins88's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
I haven't had time to review your code yet, but I'll make a general statement. Typically there isn't an easy or elegant way to have a master control in two different places. In any system there can only be one master if you want straightforward code, at least in my experience. If you need two different masters controlling the same thing you generally have to think it through very carefully and the algorithm will have to be tailored to the exact situation. You have to deal with communication timing and register overwrite. It can easily become a mess, especially if you don't fully understand the underlying mechanics. If someone smarter or more experienced than me comes along with elegance, I am definitely interested in learning along with you. -
Help with Modbus TCP IP
Flex727 replied to dhuggins88's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
-You don't need anything in the bottom part of the MODBUS Configuration in the slave. -You really don't need anything gating your SCAN_EX FB in the Slave. Just hang it directly on the left rail. -Place your MB 0 (Ready to connect) after you MODBUS Configuration, not before. You're NOT ready to connect until you've configured your MODBUS communications. It doesn't really matter since the config does occur before MB 0 gets used, but it's the principle of the thing. -Use a Direct Contact of SB 13 instead of a Positive Transition of SB 3. -You don't really need the delay timer TD 0. None of these things would stop your program from working, but I'm trying to help you with best programming practices. MODBUS is simple and straightforward. It's also very universal. I use it whenever possible. The only thing you have to watch for is getting all the details right. Once you've done that it's smooth sailing. Feel free to ask about any of these suggestions if you're curious. -
EX-A1
Flex727 replied to brdle2002's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
Just for clarity to everyone following this saga. The EXL-CAB295 is for the EX-A2X, NOT the EX-A1! -
EX-A1
Flex727 replied to brdle2002's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
I know this is a stupid question, but I've been caught by this. Do you by any chance have an Ethernet module installed in the PLC and is there any chance you're plugging the expansion cable into the Ethernet port instead of the expansion port? -
Store the value in a temporary location immediately after transferring it. Compare the new value to the stored value (+/-5). When the new value is greater than stored value +5 or less than the stored value -5, then send the new value and store it again to the temporary location.
-
Help with Modbus TCP IP
Flex727 replied to dhuggins88's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
I just caught this. Sorry, I was referring to your rung comments in the PLC program. Have you had any luck in getting a single slave to communicate? -
Blinking green lights after upload, online mode still works
Flex727 replied to chand345's topic in UniLogic Software
Confirm that you are using the correct cable (it's not the same cable as that used with the EX-A2X) and confirm that you are plugging the correct end of the cable to the module and the correct end to the PLC (the cable can only be oriented one way). Also, confirm that the I/O modules are identical, and in the same order, as in the hardware configuration in the PLC program. -
Help with Modbus TCP IP
Flex727 replied to dhuggins88's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
What does "I went in to all the Socket Parameters" mean? In my post above I was suggesting you use Socket 2 in the slaves and initialize to 20261 - 20263. It doesn't matter which socket you use as long as the port number is correct. Also make sure they're all initialized to TCP Slave. The default for Socket 0 is UDP. My other suggestion is to limit your code to a single slave and get that working properly before trying to tackle communicating with 3 slaves simultaneously. -
Help with Modbus TCP IP
Flex727 replied to dhuggins88's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
What does this mean? I didn't see any glaring problems, but the issue with comms is that every single detail must be exactly right in order for everything to work. It requires going through every entry of every FB, loading into the PLCs, and observing operation - something I didn't have time to do. -
Help with Modbus TCP IP
Flex727 replied to dhuggins88's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
Much better! What, specifically, isn't working? -
Help with Modbus TCP IP
Flex727 replied to dhuggins88's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
1) When commenting, use full sentences. 2) Use the port numbers I suggested, Leave Socket 1 as 20256 for PC-PLC comms. 3) You cannot initialize more than one socket to the same port number. 4) Don't try to initiate a MODBUS command immediately on the heels of the previous one. Give it a little delay (maybe 20-50ms) You seem to be confusing local ports and remote ports. For simplicity, and to avoid confusion, I always use the same port number for master and slave, that way it's impossible to confuse them. Same port number for master and slave means the following: Master PLC: S0=20261, S2=20262, S3=20263 Slave 1 PLC: S2=20261 Slave 2 PLC: S2=20262 Slave 3 PLC: S2=20263 -
Help with Modbus TCP IP
Flex727 replied to dhuggins88's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
If you would add comments to the rungs telling us what you're trying to do it would help immensely. Your code doesn't really match that well with your post and there is no way to tell if what you're doing is right if I don't know what you're trying to do. A few small items: 1) You do not need a ladder rung to set SB 168. Just the Power-Up as Set is sufficient (which you have done). 2) Try to avoid using Port 502 for this (just as a convention) as that is normally used for communicating with SCADA and other Ethernet connected devices. To help with identification, use Port 20261 for Slave 1, 20262 for Slave 2, etc. (just a suggestion, the PLC doesn't care what port numbers you use). 3) You don't really need to perform reads and writes separately since you have the handy Unitronics function for R/W. 4) If you have separate sockets for each slave there is no need to disconnect the socket, ever. 5) What is Socket 3 being used for? 6) Name your MODBUS_IP Configs to match the slave it will be used for. -
It's impossible to tell what you have from a screenshot of 3 rungs. Post your entire project with very specific questions and we'll try to help. Please keep in mind that nearly everyone on this forum is an unpaid volunteer with actual jobs, not Unitronics employees. We want to help but no one has time to write your program for you.
-
Sounds like a fun project. Is this a classroom exercise? Regardless, take your best shot at it and post your project here. Someone will be happy to assist.
-
It would help a lot if you showed us what was underneath those warning messages.
-
Connection via internet?
Flex727 replied to Mia's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
This is an IT question, not a PLC question. The PLC doesn't behave any differently than any Ethernet connected device. You do not need a computer in the network with the PLC. All you need is to have the PLC connected to the internet in some fashion. The most common simple (most simple, but not the most secure) connection is to have the modem connected to a router and the router connected to the PLC. Within the router setup you would set up port forwarding to have port 20256 forwarded to the IP address of the PLC. Then you would connect to the PLC from outside the network with VisiLogic by connecting to the static IP of the modem and port 20256. -
V570 to EX-A1?
Flex727 replied to gerard339's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
Sometimes when I'm driving I feel like my car is invisible too. -
V570 to EX-A1?
Flex727 replied to gerard339's topic in Vision & Samba PLC + HMI Controllers & VisiLogic Software
The EX-A1 is NOT a remote expansion adapter. It is a LOCAL adapter. Local adapters do not need to be specified in the Hardware Configuration. Just place your IO-DI16, IO-RO16, etc, modules on the DIN rail in the Hardware Configuration. The local expansion adapter is assumed.