Jump to content

Damian

UniStream & UniLogic Beta
  • Posts

    534
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Damian

  1. Fabios,

    Your right! I was wrong about being wrong.

    Some other considerations ..........

    I don't know what your scan time is, but if it is large compared to the 2.5ms resolution it would help to make the code interupt driven.

    Also, I was just playing with the "Debug" interval function. It gives a resolution of 0.001 ms on the time value. The actual measured resolution will still end up limited by your actual scan time or interupt reaction time, but it would be the most accurate time possible from what I see.

    D

  2. For the first time today thought I might check out the PING FB.

    For some reason, the PING is only successful "every other time" I enable the PING block.

    I am enabling it with a one-shot.

    I noticed in the help file PING is shown directly connected to the rail with no conditional logic.

    I am using this wrong?

    Is their any obvious reason why the FB would alternate the successful condition?

    D

  3. Software test

    Damian, please look image in the link "software test". I have only a doubt: MF2 (TimeBetweenPulses) remain ever > 0, also when the wheel is stop. Second your opinion is a good way to insert a timer (TD 1 sec) and ceck if for 1 sec no arrive impulse from I47 then MF2 = 0?

    Regards

    Fabio

    Hi Fabios,

    Here is a reworked example.

    gallery_93_13_114812.jpg

    I noticed after testing that you needed to divide from 300000.0 and not 30000.0

    Let me know if you have an questions.

    D

  4. Hi Fabios,

    I have often had to do very similar to what you are doing. If you want better resolution on your measurement you will need to take a different approach.

    If I were doing this I would instead measure the time between pulses (bolts).

    So

    For the below I have defined the variables as........

    XDW25 = CapturedTimeCount

    XDW26 = OldCapturedTimeCount

    XDW27 = TimeCountDifference

    MF2 = TimeBetweenPulses in (ms)

    regular DW will work just as well as the XDW

    post-93-036861100 1298223871_thumb.jpg

    Make sure trigger is a "transition" unlike what is shown in the picture.

    1) Rising edge of pulse is seen

    2) Store CapturedTimeCount into OldCaptureTimeCount

    3) Store the clock value (ie. SDW3) into CapturedTimeCount

    4) Subtract OldCapturedTimeCount from CapturedTimeCount and Store in TimeCountDifference

    5) Multiply TimeCountDifference by the float 2.5 and place in TimeBetweenPulses "this will give you the time between pulses in miliseconds as a float".

    6) Repeat from Step 1

    Now to get RPM, RPM = 30000 / TimeBetweenPulses (this accounts for the 2 pulese per rev)(Just make sure you compare for TimeBetweenPulses > 0 before the division)

    If the numbers are a bit jumpy, you might want to perform a running average over 3 or 4 values. The Filter FB is handy for this.

    D

  5. I had this exact same problem last year. I was using the "silver" setting in XP. It blacked out a lot of text fields. It is burried somewhere on the old Forum.

    As someone who has done some PC programming with VB and VC, I don't think it can easily just be blamed on windows. There are methods available to the developer to overcome changes in the windows settings.

    And no, I'm not from Jersey .............. however I just visted NJ for the first time ever a couple days ago. Possibly maybe it is something contagious?

  6. Hi Vidmas,

    There is no point in continuously trying differnet sockets and different ports. You will save yourself a lot of time by restricting yourself to port 502 and Socket 2.

    Can you please send a new screen shot (like you did before) now showing your code with the modifications that were suggested?

    What value did you use for a slave address?

    It doesn't make sense to me that you have a value of 0 in SI147 if you have SB142 on with the setting we suggested. What is value of SI143 after running the suggested settings?

    Are you going through a switch, or are you directly connecting the two devices? If it is a direct connection, are you using a crossover cable?

    D

  7. I have an Allen Bradley SLC 5/03 that I'm using as a DF1 master to pull data from a Unitronics V570. Everything usually works just fine except for one really strange issue. If one of the Integer values that I'm accessing is greater than 4095 and less than 4352 then the message fails and I get no information. All I can guess is that it is probably somehow related to the binary significance of those numbers but other than this, I'm at a loss. I don't even know how to tell which end of the communication is causing it. It is completely repeatable on any of the integer values that are being polled and so far I haven't found any other numbers that duplicate the symptom. I'd really love to hear some theories on what might be causing this. Thanks.

    So as soon as you get a bit set in the 2^12th place, your numbers are hosed until you then get a bit set again in the 2^8th through 2^11th place? Most likely the DF1 block on the UNI side. What memory address are you mapping to and from? Can you post the configuration parameters you are using?

  8. Thank you a lot:) It was silly ot to use full size editor:)

    So here's the snippet of the code I used to connect to SAPHIR. Maybe I do something wrong?

    When you say "socket didn't initialize". Do you really mean that "socket didn't connect"?

    Check these status bits and post the results.

    SB141 should be on

    SB142 should be on

    SB142 will come on once the socket "initializes"

    SB149 will come on once the socket "connects"

    SB151 must be ON

    What is value of SB167?

    Do you have SB168 set to 1?

    What is the value of SI147

    Make MB151 a normal contact (not positive transition)

    In your IP config, your slave address is set to 255. Your device may have a modbus address you need to set this to. A good guess would be 1

    Your communication timeout is pretty small (25) try increasing to (100)

  9. Hello,

    Thank you for the answers! The idea to read 7 registers and etc is good, but the question was not how to make a shortcuts or workarounds, but about the principle: is my ladder code bad and what may be the reason of such behavior.. I did't get a chance to test code with dealys so far, but maybe until next week I do. Thank you!

    The honest answer to that question is that your code isn't very robust. There is no error handling. There is nothing to check how successful the communications are.

    If you search the topic "Modbus Wha?" in the forum you will find a discussion on modbus communication and how various users have chosen to handle it. Some guys even poseted snippets of their code. If you want your code to be robust then this thread should give you ideas on how to make it so.

    Delays can sometimes help, but I have rarely seen times where it is necessary. All of the modbus I have done to date with Unitronics has not required any artificial delays inserted.

    In your case as well, it would be helpful to buffer your incoming data. Set the buffer to all zeros before your read request. This way, after your read request the buffer remains zero you know that you didn't receive new data.

  10. Some more "Next Generation" requests .............

    Give the product line a different name than "Vision". It gets confused because people thinking we are talking about "Vision Systems" (i.e. Cognex, Keyence, etc.) instead of an HMI/PLC.

    Make it so that you can open screens and subroutines in their own windows. It is nice to be able to have one window open with say an HMI page while the other maybe has the ladder for that page.

    Allow the windows that hold the screen and ladder subroutines to be scaled and zoomed at will.

    Make an additional Properties/Colors tab just for Ladder. Allow us to choose to different colors for the background/text of comments, variables, function blocks and such.

    Build the functionality of "Remote Operator" into the development software.

    or

    At the very least, allow the battery backed values of the operands to be uploaded, saved, and downloaded to the PLC using the developement software.

    Allow us to customize the toolbar with our most used elements.

    Do away with the current Copy/Paste behavior that virtually everyone dislikes.

    As an option, allow elements to be moved around with the mouse while the connections automatically reform to fit.

    As an option, allow connections between elements/function block to be made by simply choosing the two nodes you wish to connect and having the software automatically generate the wires.

    As an option, allow an insert mode that will shift ladder elements over and down automatically to accomodate the new elements.

    NEVER make me have to perform more than 3 clicks to get to a property I need to change. Especially in a copy/paste scenario where I'm maybe just changing the operand.

    Allow me to type my operands in directly into the pertinent fields rather than invoking another layer of windows to select the operand.

    Add most of the HMI element setup properties to the properties window (i.e. Link, Hide, View, Max, Min, Format, etc.)

    When I am doing a copy and paste of several HMI data entry variables, Usually all I want to change are the Linked variable, the Min range and the Max range. If these were in the properties window it would speed that process up tremendously.

    Don't make me have to hit "zoom out" to find the page linking.

    Allow me to use an indirect variable to jump to a label. Or in other words, allow me to jump to a numbered step and not execute and code in between. If JumpTo value is invalid or out of range either just jump to the last RET statement, or allow for an "out of range" or "Other" label that gets all jumps to undefined numbered steps.

    Allow me to have a floating watch window for operands while online.

    Allow me to make online changes.

    Don't limit me to only 9 colors on 3D buttons.

    Give me an option to default timers to units of milliseconds.

    Give me an HMI scratch pad off to the right that allows me to develop and size HMI elements off to the right and just drag them over to the actual screen once they are the way I want them.

    Scrutinize everything with the questions (Could this be made easier or more intuitive? Does this arrangement maximize the speed of development (both ladder and HMI)? Are we forcing the code developer to perform operations that could more easily be automated?

    And most importantly, keep up the good work on what is undoubtedly the best "free of charge" development software on the market.

  11. I think part of the problem was also because of the complexity of the program. It had around 2000 kines of ladder several DTs and several FIFO DTs , one DT had 1000 rows used as a FIFO. The scan time was 15ms. And there were 6 inputs used in an interrupt routine for measuring fast counts of flow meters. Not sure what specific thing made any difference. Not sure if any of it made a difference.  

    I am pretty sure we discussed this when I was having the problem. I sent some examples of the rungs that did not work back then, but a solution was never found.  So I found a way that works and let it go.

    Now I just follow a couple simple rules I have discovered to make it work better.

    If I have time, I will try to simulate the problem and post it.

    Hi Dah,

    The 15ms scan time you were getting .............. was this the average scan time or were you performing all your data table operations every scan? Did you ever do anything in regards to trying to capture the max scan time?

    With what you and Tim are explaining, it almost sounds as though during the DT execution the PLC may suspend operation and goes to service something else momentarilly (perhaps checking IRQ states, etc) and when it returns to complete the DT execution it forgets the proper state of the transition that enabled the function.

    D

  12. Hi Damian,

    In general you are right but since there was major change between version 8.6.x to 9.0.x then there is a need also to to update the BinLib and Boot.

    As I mentioned above there is no option to clone boot and BinLib since the SD card works on those layers.

    Please note that the Boot and the BinLib versions are changed very rare compared to OS version.

    Possible workaround:

    First you can prepare 2 clone files - one for version 8.6.x and one for 9.0.x

    Then you need to check the versions of the Boot and BinLib of the new PLC and download the relevant clone.

    Version 8.6.x - Boot 2.2(02), BinLib 1.3(04)

    Version 9.0.x - Boot 2.2(05), BinLib 2.10(00)

    Hi Ofir,

    Thanks for your reply. I do understand where you are coming from with the SD card "working on those layers". Is it possible though that a function that clones just the BinLib and Boot from the SD could be placed on the same layer that services the communication (or in other words the same layer that allows them to be downloaded by communication)?

    Has Unitronics given any consideration to adding a feature that allows the unit to "boot" directly from the SD card?

    Damian

  13. Cloning transfers all the data and files in the PLC including the OS but not the including Bin Lib and Boot.

    Therefore, if there is a mismatch with these files, you are required to download them manually via VisiLogic.

    Hi Stein, Emil, Cara........

    Is there are reason for doing this way? In reality, the whole point of cloning is so that someone using only the SD card can get a new PLC to act identical to their replacement without having to hook up with a computer. Otherwise it defeats the purpose of it all. Why not have it clone everything? Is it just physically impossible for it to perform the tranfer of the Boot and BIN from the SD?

  14. But just by using the Hide property the top level text is hidden but the bottom level text isn't visible.

    I can't use list of text because i wan't different font size for each text.

    Thank you

    I never noticed this until you just pointed it out. If it is just going to be this one occurance, as a work around, you could use a binary image instead and create the text as an image. I know its a crummy workaround, but it is guaranteed to work.

    Hide really should cause the thing to completly disappear though. IMHO i would consider this a bug.

  15. Greetings all and Happy New Year!

    I'm poking around some more on trending, and I saw again something I would like in this feature.

    My current project involves recording the lifespan of a product under test. I'd like to record the processing time of each test cycle, and trend the results on screen.

    Unfortunately, trending is strictly time-based, and these tests can be several minutes long, and as the product wears, duration increases. This could be solved with an operand that, when transitioned low to high, would input a data point into the trend. Basically, a "manual record" feature.

    Thanks!

    TM

    Hi TM,

    I like that idea as well. As another alternative, maybe they can make the trending axis a variable. That way you could either assign Unitronics system integers to it if you are looking for a time based axis, or you could assign a User integer for this and have complete control over it. Kind of like a "virtual" time axis.

    D

  16. I was searching for free HMI graphics (e.g. LEDs, Toggle Switches) on the web but didn't find much.

    The ones that come with Visilogic are adequate but i wanted to see if any of you know where i can find some other good ones.

    Thanks!

    There are many other HMI software packages out there that are free. Often their graphics are installed as pic (gifs, bmps, etc). Sometimes if they are imbedded, you can do an export to a file (usually a feature to allow you to customize). I've been know to share graphics between systems.

  17. Hi everybody

    We have a problem with a PTO we use this to control a servomotor, in a bag maker machine, but when we use a sensor to stop it the PTO this take a little time to stop, then the machine stop few centimeters after the signal has been received. And when we increment the frecuency (speed) the distance of stop becomes higher. Somebody have any solution?

    Not sure what exactly your doing, or what you hope to achieve, but it sounds like you are performing a simple "registration" type move. In these types of systems the sensor is not meant to stop it immediately. It is normally setup with an offset between the sensor and the actual desired stopping point. This gives the servo some distance to make corrections and ability to decelerate to a controlled stop. This would also make the stopping point non-speed dependent (within reason).

    I think for us to provide you with better suggestions you will need to better explain exactly what your system is and what your expectations are.

  18. There can sometimes be a few issues Upgrading to a much newer version of VisiLogic and some older files are left behind.

    Best thing to do is fully uninstall any VisiLogic Software, then delete the C:\Program Files\Common Files\Unitronics folder and also delete the C:\Program Files\Unitronics\Unitronics VisiLogic_C folder.

    Now you can install VisiLogic 9.0.0 and no old files will be left behind causing you problems :)

    P.S. - If you have a 64-Bit OS, remember to go into the Program Files (x86) folder instead.

    This is one of the reasons I think the software should install alaways in a "versioned" folder instead of always having the most recent as "VisiLogic_C". Make is so that you don't have to uninstall other versions just to re-install more. Make "Version Swapper" obsolete.

  19. The Rockwell samplecode website has code for Modbus. I have looked at it in the past, but never used it. I dug it up again and see that it is serial only, so no ModbusTCP support. My number 5 is in error, so it becomes:

    5. Convince AB to support ModbusTCP. Good luck! The Logix5000 series support it in code.

    Hi Bill,

    I have used the Modbus routine you speak of for the compact logix and a serial connection. In fact I used it to communicate to a V570 and it has worked really well. I will never understand why they don't make a real fucntion block out of it and be done with it. I have often wondered why someone couldn't make it work for Modbus/TCP using almost all the same code. It looks like it is mostly the lack of ability to handle "socket" connections. It irks me to no end that my L35E and the V570 are both connected by etherenet to the same switch and I still needed a serial cable between the two to achieve communication. Hopefully someone sufficiently clever and endowed with lots of free time will figure it out some day.

    Damian

  20. I understand and appreciate Unitronics concept as constantly developing and upgrading. So every user is strongly advised to update VisiLogic regularly (as well as the OS), and to use Version Swapper for being able to fully interface with the applications created with some of the previous VisiLogic versions. Understood in this way, it seems quite natural always naming the latest version "current". Once you get used to it, it makes no problem at all.

    My situation was this.

    I had installed Version 9.0.0. to mess around with on my new PC. Then I decided to install 8.6.3. for the actual work I had to do. To do this I had to Uninstall 9.0.0. first (or at least i chose to do this way for fear of some kind of conflict with 8.6.3). Just about every other software package I use installs the software in a directory with nomenclature to designate the version. I can't think of any "advantage" not to do it that way.

×
×
  • Create New...