-
Posts
3,325 -
Joined
-
Last visited
-
Days Won
241
Content Type
Profiles
Forums
Gallery
Events
Blogs
Downloads
Articles
Media Demo
Posts posted by Flex727
-
-
46 minutes ago, JMorel said:
I tried with SB 2 and SB 142 but still nothing
SB 2 _AND_ SB 142? Do NOT use SB 142 here. SB 142 turns on when the Ethernet card is initialized. It will never activate the Ethernet card initialization function block.
Is your PC on the same subnet as the PLC (i.e. does your PLC Ethernet address begin with 192.168.100.xxx)?
-
Use SB 2 instead of SB 142 to activate your Ethernet function blocks.
-
A few other items of note:
1) Do NOT place multiple logic threads in a single ladder rung, as you are doing in the Szamlalo subroutine.
2) Do NOT use Direct Contacts to call an HMI screen - use Positive Transition Contacts.
3) No need to call the Start-Up Display with SB 2 - it will be called automatically at start up.
4) No need to set or reset operands with SB 2. Use the Power-Up checkbox for MIs and SET or RESET selection for MBs.
-
Not sure what you're trying to do here. All operands are retained through a power cycle (if there is a functioning battery installed). If you want the register to assume a particular value at start-up, then you use the Power-Up value to accomplish that.
Looking at your program, MI 0, 1, & 9 have the power-ups checked. If you want MI 0, 1, & 9 to retain their last value, then uncheck that box.
-
Hey @Joe Tauser, I notice you place an inverted contact of SB 2 in front of the SCAN_EX FB. I've seen other people do this also, but I have never done it in any of my hundreds of projects over the last many years and never experienced a problem related to the slave scanning. Is there really a purpose or any advantage for this?
-
Briefly, (and perhaps over simplified), a Port is an address that is visible to the outside world. A Socket hosts the Port for the communications. You have 4 Sockets in your Unitronics PLC (numbered 0-3) and therefore you have 4 paths for communications over Ethernet. You can mix and match protocols as you wish, but you only have 4 that you can use at one time. Each of the 4 Sockets has a default configuration, but you can change that with a Socket Initialization FB. If you're going to use MODBUS TCP, you must have a MODBUS IP configuration FB for each Socket that will be using MODBUS TCP. Both the Socket Initialization and the MODBUS configuration should be activated with SB 2.
-
16 minutes ago, Edilson Adriano Lucas said:
So I will be setting the socket 20256 as master in my network
Also, don't confuse Sockets with Ports. They are different and you need to understand what each does.
-
I recommend leaving Socket 1 and Port 20256 for your communications with VisiLogic. You have 3 other Sockets and thousands of Port numbers - use something else.
-
There are example programs that came with your VisiLogic installation that show you the proper way to set up MODBUS TCP communications. You can have a continuous connection with up to 4 MODBUS TCP devices by using the 4 available sockets. You will need to initialize the sockets with the proper protocol and port number, as well as set up your MODBUS IP configuration for each.
-
28 minutes ago, ncbc said:
Perhaps I am using the wrong datatype?
Yes you are. Use MI, not ML. For the above ASCII String, you will need a vector of 3 MIs to hold the 6 characters of your string. (I believe you can use MLs and hold 4 characters per register, but why complicate things.)
In the Read Row FB, you need to assign an operand to every column in the Data Table Row. You can certainly make the operands contiguous so that you have a vector to operate on later, but you need an assignment for each element.
-
There is no simulator software from Unitronics. The PLCs are inexpensive enough that purchasing a PLC for development purposes isn't an undue burden.
There may be some third-party simulation software, but I've never used it and cannot say if it is reliable.
-
2 minutes ago, am091 said:
Is it possible to make it save to a read-only .csv file?
That would be logically impossible. You're asking the PLC to log to the file - it can't be read-only if you want to write to it. You can always change the file attribute after you remove the SD card from the PLC and transfer it to a PC.
- 1
-
An experienced programmer should be able to do it in a few minutes (up to a few hours depending on the complexity of what you're logging). It can easily be logged to a .csv file that can be opened in Excel on a computer.
-
Moved to correct forum.
-
I suspect you're trying to read too often. Create a self-resetting timer of at least 100 ms that SETs a bit to comm with a slave, and a RESET of that bit after the comm FB. Serial communications tend to be a bit slow, give it the time it needs to deal with all the overhead.
-
Moved to the correct forum.
-
-
This simple program was posted on this forum some time ago. It's for VisiLogic, but you may be able to adapt it. Here is a screenshot of the relevant logic in case you don't have VisiLogic installed:
- 1
-
Has anyone come up with a way to set a Vision PLC clock from the internet? I have a V1210 connected to the Internet and I'd like to keep the clock reasonably accurate. I can go online with it at any time and set it from my PC through VisiLogic, but I need to find a way to automate the process to keep it accurate.
-
Also, do NOT use SB 3 for your communications. If one second intervals are sufficient for your communications, use SB 13. SB 3 will cause the PLC to attempt comms on every PLC scan for fully half of each second. You want to trigger communications with a transition contact or SB 13, which is automatically a transition contact.
And place an inverted contact of MB 100 in front of the comms FB.
-
First of all, you need to Read Holding Registers (R.H.R #3), not Read Input Registers (R.I.R #4).
Also, you can read and write bits (coils) directly using Read Coils #1 and Force Coils #5 or #15.
But the simplest method when you are communicating between two Unitronics Vision PLCs is to use the FB Read/Write Mixed Data. This FB allows you to enter a mix of operands and read or write them directly using a single function call.
- 1
-
Be sure you are running Version Swapper from the latest version of VisiLogic you have installed. Do not use the Version Swapper from the older versions of VisiLogic.
-
On 5/5/2019 at 3:54 AM, Yuri7811 said:
Can you explain how i can read output bit O25 ( adress i have put in Kepware ?)
Output coils start at address 4000h (16384 decimal). Or you can assign an MB to the Output coils and read those instead.
-
1 hour ago, Yuri7811 said:
problem was fixed by changing Socket 2 to 502 in setting touch panel (not in a program)
The Socket will revert to Port 20258 when the PLC is power cycled or Reset. Add the Socket 2 Initialization block to your program to prevent that.
Retaining Memory Integers
in Vision & Samba PLC + HMI Controllers & VisiLogic Software
Posted
When you create the operand there is a setting to retain its value.