-
Posts
3,325 -
Joined
-
Last visited
-
Days Won
241
Content Type
Profiles
Forums
Gallery
Events
Blogs
Downloads
Articles
Media Demo
Posts posted by Flex727
-
-
Much better!
1 hour ago, dhuggins88 said:but I'm not getting what I need out of it
What, specifically, isn't working?
-
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
-
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.
-
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.
-
On 6/19/2019 at 5:28 PM, Flex727 said:
Not 100% certain, but I believe you can. You must use the correct connection cable though.
By the way, the direct replacement for the EX-A1 is the EX-A2X, not the EX-RC1. The EX-RC1 connects to the PLC using CanBus and is a REMOTE expansion adapter. The EX-A2X is a LOCAL expansion adapter, like the EX-A1.
Sometimes when I'm driving I feel like my car is invisible too.
-
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.
-
You should always endeavor to avoid conditional subroutine calls for this very reason. Write your code so that every ladder rung is executed on every scan.
- 1
-
2 hours ago, Flex727 said:
While you're online, manually Reset MB 12, then Set it again to see if the MI increments.
Did you do this yet?
-
21 minutes ago, Ausman said:
(Which Flex nicely replied to!)
I'm going to have to take back my nicety. You must have MB 33 there because of MB 30. MB 33 being set allows the function to wait if there is a Function in Progress until MB 30 goes low. Without MB 33, then if MB 30 is high, that MODBUS transaction will not occur.
-
46 minutes ago, Ken Hoang said:
I've checked and the state of MB12 is definitely HIGH during the above operation.
Remember that power flow will only occur on the scan with the positive transition. MB 12 can be high all day and there will be no power flow to MB 33 except on the scan when the transition occurred. While you're online, manually Reset MB 12, then Set it again to see if the MI increments.
-
27 minutes ago, Ausman said:
Why do you have MB33 at all? MB12 can go straight in front of MB30 in your ladder.
Leave it to Ausman to see what should be blindingly obvious to the rest of us, but we missed.
-
I moved this post because Remote Access is actually a software program that allows you to view the PLC remotely. You use VisiLogic to download programs, whether locally or remotely. Yes, you can connect to your PLC remotely if you have set up an internet connection to the PLC (i.e. have port forwarding or VPN, etc) and have an Ethernet module installed in your V570.
-
You use the Real Time Clock on the HMI for both display and to enter the date & time.
-
Everyone encounters this type of problem from time to time. Rest assured that the PLC is executing the code properly. You can troubleshoot by placing an Increment function with an unused MI at strategic places on the suspect rungs. Here is how I would go about it:
First, perform a search to make sure MB 12 & MB 33 are not being used elsewhere by mistake.
Second, confirm the subroutine is being called by the Main Routine.
Third, place an increment function just after your MB 33 Set coil.
Fourth, place another increment function (different MI) at the end of your logic thread with the MODBUS FB.
Then download and go online and watch what happens.
I have one more question. You addressed how MB 33 was being Reset. How about MB 12?
- 1
-
Just now, viscoelastic said:
Is that the entire ladder? Do you have a reset for MB33?
If the Reset for MB 33 is just to the right of the screen capture you posted, you won't see MB 33 turn on when you're online, but it will still activate your MODBUS FB. I notice there are many sessions and acknowledements - is there some reason you think the code isn't working?
-
The two most likely reasons are:
1) MB 33 has a coil elsewhere in the program which is overriding the Set coil activated by MB 12.
2) These ladder rungs are in a subroutine which is not being called by the Main Routine.
-
7 hours ago, Saragani said:
The Slider feature request was implemented and scheduled for next version.
VisiLogic or UniLogic?
-
@Cara Bereck Levy, is there something wrong with the Help file associated with the new version 9.8.80, or is it just me? I can't seem to get to the left pane tree list or the tabs to search, etc.
-
The RTC is stored in SI 30 - SI 33. System Integer (SI) addressing starts at 9000h and are standard 16-bit signed integers. If you have difficulty writing directly to SIs, then write to MIs and trigger a bit in your PLC program to Store Direct the MIs to SIs when you want to set your RTC.
-
Please don't duplicate post. This forum is staffed by volunteers, not Unitronics employees for the most part and is moderated. It can sometimes take a few hours for someone to approve the post as we also have real lives and jobs away from this forum. You, appropriately created a new topic and have a couple of responses there already - let's keep the responses there.
-
We need to see your program in order to offer any help. At the very least we'll need to see a screen capture of the relevant ladder rung with the Ethernet Card Initialization FB and with it opened up to see the details.
FYI - the project settings in VisiLogic have no effect on the PLC.
Help with Modbus TCP IP
in Vision & Samba PLC + HMI Controllers & VisiLogic Software
Posted
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.