-
Posts
3,276 -
Joined
-
Last visited
-
Days Won
239
Content Type
Profiles
Forums
Gallery
Events
Blogs
Downloads
Articles
Media Demo
Posts posted by Flex727
-
-
Hello,
I am new to ladder logic and the Unitronics system, and I had two questions:
1) Is there any way to simulate a project WITHOUT connecting the PLC controller to it? I want to see how some of the example projects run but I don't have the actual console yet.
2) How would I make the program wait for a specific condition to be met before moving on with the code? For example, I want to open a valve, and then once the pressure goes down to a certain level, shut off the valve. However, if I use a positive contact saying "If pressure is <= x" and then write a coil that shuts the valve, won't the program just skip the rung (because in the beginning it would just evaluate as false) and end the program without waiting for the condition to be fulfilled?
Thank you in advance!
It's important to understand the PLC workflow. Here are the basics:
1) Read inputs.
2) Evaluate ladder logic.
3) Write outputs.
4) Repeat steps 1-3 continuously.
Normal software is linear and runs from beginning to end. PLC software is a loop - it executes and repeats infinitely. You cannot have the program stop and wait - it will create a watchdog timer alarm.
The important thing to remember is that each Output Coil should exist in only one ladder rung. Think out every condition that turns the output on and place it in a single rung. (The exception is SET & RESET coils)
If you need to wait for a condition to be true before executing code, set a bit to be true when that condition exists and use it as a gate for that logic or subroutine.
Use the Main Routine to execute subroutines and execute initial (startup) actions only. All program logic should take place in subroutines.
-
The programming cable is a crossover cable, just like ones used for landline phone service. You probably need a data cable, which is a straight-thru cable, for your modem.
-
Thank you, HigHTech! I learned something very useful from you today!
-
1
-
-
I'm not sure I follow how the TCP/IP FB applies to my situation. I've never used it before and probably don't understand it properly. I'm always looking to learn something new - can you elaborate, Cara?
-
The typical RJ-11 cable (like used for phones and like what comes with the PLC) is a crossover cable. If you add an additional cable between the PLC and the coupler it must be a straight-thru cable like this one:
http://www.monoprice.com/Product?c_id=102&cp_id=10222&cs_id=1022201&p_id=928&seq=1&format=2
You are probably doing a double crossover which will not work. Two crossover cables WILL only work if the coupler is also a crossover.
Where I work we do exactly what you are trying to do and encountered the same issue you are having. A straight-thru cable inside the box works perfectly.
-
1
-
-
This would be very simple to do. Create a blank screen and have an MB that is on when the screen is displayed and a pushbutton that calls the screen. Run a timer while the screen is displayed. If there are no touch elements on the screen, it is effectively "frozen". When the timer expires, call the screen you were previously on.
-
As a followup, I need to say that I really needed to transfer much more than 160 registers. My intent is to move 96 user-entered names of 10 characters each stored in 480 MIs from one PLC to another so that the customer doesn't have to enter them twice (they were in 3 vectors of 160 MIs, hence my need to read 160 in my original question). These names might change from time-to-time so I wanted a pushbutton to grab the names off the other PLC when needed. I broke the read into 5 pieces and tried executing them all at once without any delay and, surprisingly, it worked perfectly. The PB SETs 5 MBs. Each read is the standard line of code where the MB is N.O. and the power flows through the usual check for connected Socket and no other comm in progress, then a RESET of the MB at the end. Even though every single read is initiated in the same PLC cycle, they all execute properly. I may add the delay in anyway just for safety, but apparently Unitronics has some well-written MODBUS function code.
-
-
I am fairly experienced with Unitronics PLCs and have done quite a few projects requiring communications with no major problems encountered until now. On this project I am sending data from one V570 PLC to another using MODBUS IP over Ethernet. My need is to send 160 registers (MIs) using R.H.R #3. I've found that I cannot send more than 125 registers without encountering status errors 4, 5, & 6. Is this to be expected? Are there any tips on how to handle this? If I were to break it down to two separate reads, what would be the best procedure - should there be a delay between the two reads?
Thanks.
-
With 5 you can easily do it in less than 1 second. Remember you just need about 100 ms/slave.
I haven't been successful at getting the total time down to 100 ms. Either the socket doesn't properly close or the data exchange fails, etc. Can you post some code, or even just a step-by-step algorithm that can make that happen?
-
Fieron is referring to the 4 socket limitation. You will need to connect and disconnect to each slave as needed, or on a regular cycle, depending on your application. Just be aware that it will take a large fraction of a second (or two) to perform the disconnect/reconnect process. I have done this successfully, but I sure would like to see an optimized routine for accomplishing this published as a best practice by Unitronics or an experienced programmer.
-
I looked all through the Help file and never saw that function. Thanks, Joe.
-
I've got a problem that I need to perform some manipulations with an ASCII string, but it's possible there are NULL characters (0) in the string. The NULL character may only be one of the 2 bytes in one of the MIs that are part of the vector. I need to check the vector for NULL characters and replace them with H-20 (space). Is there a way to do this?
-
Shouldn't Clark1 first just confirm that SI 9 isn't set to zero? It's quick and easy to check (but you'll need your flashlight):
1) Go into Info Mode by touching an empty spot on the screen for at least 4 sec.2) Touch the big button "Enter Info Mode".
3) Enter password (the default is 1111), and press the Enter key on the right.
4) Touch the button near the top labeled OPERANDS.
5) Touch the button labeled "Sys int" (2nd row, 3rd column).
6) SI 9 will be in the 3rd row in the middle. The numbers in the 3rd row will likely be "8", "1", SI 9, "0", "0". The 3rd number (SI 9) should be a value between 0 and 100. If it's near zero, touch the value and enter 50 then the Enter key. If the value is already greater than about 10, then you truly have a dead backlight.
Alternatively, if you already have Visilogic installed and a programming cable (and a USB-to-serial adapter), you can check it by going online with the PLC and checking the value directly in the Operands window of Visilogic.
-
SB 172? That can't be right, can it?
Excuse me - I forgot I was viewing the U90 Ladder forum (thought I was in the Vision forum).
-
SB 172? That can't be right, can it?
-
I don't see how copying a vector of inputs or outputs to an MI aids in displaying the state of inputs and outputs on the screen. Can you post a screenshot of what you're trying to do, perhaps one for the inputs that you've successfully done?
-
Just SI 9 for the V1040, right? I don't think SI 7 does anything in the color vision products.
-
I've found that you can even run two copies of the same version of Visilogic simultaneously and connect to two different PLCs simultaneously (I think at least one has to be through ethernet). This can be useful in a networked environment where two PLCs talk to each other and you want to know what is going on in both places.
-
My experience is that a coil remains in the state it was last in when the ladder rung stops being executed. This makes sense since the coil had no logic executed to turn it off (if it was last on, for example). This will also crop up when a subroutine is conditionally executed.
Any state change, whether bit, integer, or what-have-you, must be actively executed in order to occur - either off or on.
-
2
-
-
As Joe said, no need to initialize Socket 2 - it's already set to communicate with your PC. Make sure of the following:
1) NAME the PLC with the Set PLC Name function block tied to a Power-Up contact (SB1) Should be SB 2.
2) Address both PLC and PC to the same subnet and make sure there aren't any duplicate addresses. (Looks like you've done that)
3) Use a CROSSOVER cable or an ethernet switch between the PC and PLC.
4) Go to Connection / Communication & OS (or CTRL-F9),
- Select Connection Type TCP/IP (Call)
- Click on Project Settings and enter the correct IP Address for the PLC, Protocol TCP, Port Number 20256, and the correct PLC Name. Click OK.
5) Confirm settings work by clicking the "Get PLC Information" button.
-
Good to know! Thanks, Simon. Indeed I was using the newer V570s.
-
Connect both PLC's to an ethernet cable (in the future you can add a switch to the network and establish data reporting via mail server).
Without a switch it will need to be a crossover cable, won't it?
-
I accidentally bought a 12v power supply for development work with a v570 and used it for months before I discovered my mistake. I certainly wouldn't want to install a 12v power supply on a project at a customer installation, but I never had a hiccup. Yes, I didn't have any I/O modules attached and that might make a difference, but the Unitronics PLCs are very forgiving when it comes to voltage.
Visilogic 9.7 clone files corrupting graphics
in Vision & Samba PLC + HMI Controllers & VisiLogic Software
Posted
He's talking about the SD password, not the Info Mode password. In order to save a program file to the SD card from the PLC, you must have an SD Password function block in the program. The FB should be executed by the Power-up bit (SB2). With that FB in the program, SD files can be saved using the password assigned in that FB.