Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 08/26/2021 in Posts

  1. Every time you see a "!" in STL the compiler is starting it's own logical statement. It's kind of like assembly language and it takes liberties and re-arranges your rung. It can only make one decision at a time and writes results to the temporary memory. For example, look at the first few lines- ! MB 6 / MB 38 = LB 0 Translation- Look at MB 6 OR MB 38 and store the temporary result in LB 0. ! TD 4 = LB 1 Store TD 4 in LB 1. You can see here that it's looking at TD 4 before it's even called !N MB 35 & LB 0 = TD 4 Look at NOT MB 35 AND my LB 0; if true run TD 4 And so on. The more lines you have in STL View with "LB" in them, the more the compiler is performing somersaults to get your code to work. It's mission is to get it all in. Other brands of PLCs force you to finish a rung and number each one. Unitronics does not have that limitation but it can get you in trouble. When you create a new network, the slate is wiped clean and the result much more resembles what you were thinking. Compare the STL views after you break it up an you'll see what I mean. Joe T.
    2 points
  2. Think about what ladder logic is all about. It's a high level language where each ladder rung is intended to encompass a single line of code. It's not just a blank slate with some random lines drawn. Separate lines of code belong in separate ladder rungs. You tried to put 4 lines of code in a single ladder rung. Sometimes you can get away with it, but it's fraught with risk and is very poor form.
    1 point
  3. Standard computer troubleshooting - https://www.youtube.com/watch?v=nn2FB1P_Mn8 Joe T.
    1 point
  4. Never had such a request, so I did it as an exercise. As suggested in topic @kratmel posted when dealing with time intervals it's best to use RTC to UTC functions, so you manipulate only with one DW variable. That's also my experience. Sedmica.vlp
    1 point
  5. Use the function "Load Timer/Counter Current", divide by 10, then display as you would any other number, selecting one decimal place.
    1 point
  6. I ran face-on into an application where I wanted to concatenate the time and date into one string. The RTC to ASCII function in the examples considers every permutation of Date OR Time, but not both. I tried following my own advice and using the Insert String function but it didn't work the way I thought it did. I studied the RTC to ASCII example and realized the best way to manipulate strings is to make use of buffers, controlling exactly where characters land using the Copy Tag to Buffer, Fill Buffer, and Copy Buffer to tag functions. The thing that worked best for me was to start from scratch and write a generic Concatenate function that takes two strings as arguments as well as the number of spaces wanted between the strings. I only need one space, but this could easily be modified to pass the separating character to it. I'll leave that as an exercise to another. Enjoy. Joe T. Concat.ulle
    1 point
  7. I found a solution to this problem (it helped in my case, I was programming on another computer and at home project opening the same error occurred) The solution is as follows: 1. Open the project, do not click "OK" in the dialog box. 2. Open Task Manager, and shut down VisiLogic. 3. Restart the project, use recover, and click OK 2 times (in 2 dialog box). 4.Your project is open.
    1 point
  8. The only reason I caught it so fast it that I've done it myself a few times. Only other advice most of the forum guru's would give is to break up the three lines in rung 1 into individual nets. I'm sure it works fine as coded but in some cases line stacking in a single rung (net) can give unexpected results. Something to do with the compiler, not sure... I'm loosely re quoting others. Glad you got it working to your satisfaction.
    1 point
  9. No! Either place both sets of conditions in the same ladder rung leading to the coil, or create two intermediate coils, one with each set of conditions, and use those intermediate coils in parallel to activate the original coil.
    1 point
  10. Hell Y.INDS. It does seem that when leading spaces are present in the string, the function will not convert (unlike leading zeros). Try to remove the leading spaces first.
    1 point
×
×
  • Create New...