-
Posts
3,325 -
Joined
-
Last visited
-
Days Won
241
Content Type
Profiles
Forums
Gallery
Events
Blogs
Downloads
Articles
Media Demo
Posts posted by Flex727
-
-
It's no different than connecting a single master to the slave. You have 4 sockets available for MODBUS TCP. Just initialize up to 4 sockets to TCP, each with a different port number and do a MODBUS TCP configuration for each. Then have a separate SCAN_EX FB for each. There are example projects that came with your VisiLogic installation that will show you the best way to set up MODBUS TCP for both master and slave.
-
2 hours ago, Milosh said:
What if we need read/write from different locations addresses which is not in seqence? Can we call more RHR whit different addresses in one requst?
Each interaction would be a different conversation. As Joe Tauser said, only one can be active at a time. Just as I said you would have to separate reads and writes, if you want multiple reads or writes, they are each separate conversations. Every MODBUS TCP interaction through a single socket must be dealt with independently.
-
2 hours ago, Joe Tauser said:
Vision has been around for 15 years and it's features are very static.
As I understand it, it's because there is no more room in the firmware for major changes or additions to the PLC line. To increase the space would require re-engineering the product line and every previous Vision PLC sold would instantly become obsolete.
-
-
Unless you're using a V700, the most devices you can communicate with by MODBUS TCP is 4 (without socket sharing, which I won't get into here). Yes, if your data exchange ladder rungs are set up properly you can communicate with up to 4 devices simultaneously.
I'm just showing 2 of the 4 here. Just make sure your timer is long enough to make it through all 4 devices you're communicating with. If you're both reading AND writing to non-Unitronics devices, I would do it a bit differently. Instead of the timer Setting the comm requests, I would have the timer toggle another bit and use a positive transition of the bit to initiate all the reads and a negative transition to initiate all the writes.
If you're communicating with other Unitronics PLCs, there is a handy Read/Write Mixed Data FB that will do both the reads and writes in one operation.
-
The OP isn't asking about socket status, but rather asking how to set the Keep Alive parameter.
-
@Cara Bereck Levy, I can find nothing on this in the Help file. Am I missing it?
-
When you're local you can connect to it with a USB or serial cable and avoid all the Ethernet issues. That makes troubleshooting much easier.
- 1
-
What are your connection settings in VisiLogic? I recommend that you be local to the PLC when trying to set up and troubleshoot communications.
Communications between VisiLogic and the PLC do not use MODBUS. The MODBUS settings should have no effect on your connection using VisiLogic unless you are stepping on port 20256 inadvertently.
-
8 hours ago, Milosh said:
When I was online I changed Network ID
Exactly where and how did you do this. Also, please answer my other questions if you want help.
-
I typically just use SB 13 to increment an ML. You can then divide that by 360 to get you hours to the tenth of an hour for display.
- 2
-
2 hours ago, Milosh said:
I change Network ID for modbus_ip_config block. After that I can't connect to plc
Can you explain this in more detail? Where did you change Network ID? From what to what? What are you using to connect to the PLC? Are you within the local network or outside? All these details are important.
-
You'll need to post your program here. I need to see inside all the function blocks in order to help you.
-
Don't forget that you also need a Scan_EX FB for the MODBUS slave and addressing from the Siemens PLC will likely be "off by one" since Unitronics addressing starts at address zero and MODBUS addressing starts at one.
-
Not sure I understand your question. You must use a socket initialization FB anytime you wish to assign a different configuration to the socket than the default assignment. Many programmers initialize all the sockets anyway just to have visibility into each socket's assignment and to help make sure there is no duplication of port numbers.
Any socket that will be used for MODBUS communications (whether master or slave) must also have a MODBUS configuration FB. All the initializations, configurations, etc, should be activated by SB 2.
-
9 minutes ago, Milosh said:
What I should to put in other parameters especially to Network ID, and how to populate Slaves table?
Network ID is usually not important for TCP (but may depend on what device you're communicating with). The slaves table is only needed if the PLC is the master.
-
11 minutes ago, Milosh said:
For Unitronics, as I understand I should use Socket 3 for non-unitronics PLC in Fb MODBUS_IP CONFIG. Right? Can I use Socket 2?
You can use any socket for any purpose. Those are just the defaults, but don't inadvertently assign the same port number to two different sockets.
-
Yes, you have 4 sockets available to you for Ethernet communication in the Vision line of PLCs (8 if you are using a V700). Simply initialize any sockets you wish to use if you want the sockets to be a protocol or port number different than the default.
Here is the default (available in the Help file):
-
Yes. There are example projects that came with your VisiLogic installation and there are YouTube tutorials and webinars available. Review those and make an attempt at what you're trying to do. If you still have difficulty or questions, drop back by and someone will help you.
-
I've never encountered this situation, but I would contact Unitronics support directly. This error message looks to me like VisiLogic is out of memory, not the PLC. Is there some special situation with your PC that might result in insufficient memory space for VisiLogic?
-
3 hours ago, Arberhaziri said:
I think the best way to stop the user to get in display where the outputs are controlled manually is to "disable " that button which opens that display .
Sounds right to me!
-
9 hours ago, Arberhaziri said:
Also I want to ask about "Choose "On unload" Subroutine" , how can we use it ?
I neglected to answer this question. This option does create a conditional subroutine which is why I never use it. There may be a specific need for it that I haven't encountered which is the reason Unitronics included it. I rarely use any of the "display controls" and prefer to create all my HMI calls in ladder. The only exception to that would be PLCs with physical buttons that need to be associated with different screens in different ways.
I just now see Joe's response, which I totally agree with. With his single subroutine for Outputs (and Inputs, perhaps in a different subroutine) he is creating I/O "buffering. This is excellent programming practice which allows for easy code revision, easier testing, and reduced confusion at a later date.
-
12 minutes ago, Arberhaziri said:
Also is it better to create a subroutine and to call that bunch of code only when needed (in this case the code to be read only when I turn AUTOMATIC MODE ON) , or the code to be read all the time ? , is it better not to let microcontroller read unnecessarily?
The PLC doesn't care whether the code runs or not. The poor programming practice is due to the fact that conditional subroutines can often execute in ways you don't expect (for instance, coils being left in limbo). There is no reason to do it that way.
Ladder logic is not the same as regular computer programming and should not be treated that way. Except for very unusual circumstances, the only purpose for subroutines (in ladder logic) is to break your code up into manageable chunks. Every line (ladder rung) in the entire program should be executed on every scan. This avoids unexpected behavior and ensures that you don't trigger the Watchdog Timer.
Bear in mind, I am giving my opinion on best programming practice. Other experienced programmers may have a slightly different opinion and there is no absolute right or wrong here. I am providing the benefit of my experience and skill which you may accept or ignore.
- 2
-
If you want a button to be inactive during certain times, use the "Disable mode" function, but your solution doesn't solve the problem you're stating. Since you can only push the button when you're on a certain screen and the only check you're performing is to check to see if you are on that screen, then you aren't accomplishing anything.
- 1
PT 100 SIGNAL TREATMENT
in UniLogic Software
Posted
Do you have the jumpers set correctly on your V200-18-E3XB module?