Spedley

MrPLC Member
  • Content count

    147
  • Joined

  • Last visited

Everything posted by Spedley

  1. If I remember rightly the PanelView multiplies the Tag by the scale value and then adds the offset. So if the Analoge card is set to read 4-20mA then the value from e.g I:1.0 would be 0-32768 (exclusive) so you would put 0 in the offset and 0.030517578125(1000/32768) in the scale value. and in general if Lo is the lowest value read from the input and Hi is the highest value read from the input then: Scale = (1000-0)/(Hi-Lo) Offset = (Lo+0) ... or something like that !
  2. I once wrote a program for a machine like that. There was a table that went fron horizontal to vertical to allow for operations on the part but if you pressed the e-stop, all air was vented and the table would slowly drop down. The problem was fixed with a 3 way valve but why it was designed with a fundamental flaw I don't know?
  3. If you are familiar with 'normal' programming it may be easier to think of ladder logic that way. for example with OTE: XIC SW1 XIC SW2 OTE M1 is actually: if (SW1 and SW2)=1 then  M1=1 else  M1=0 endif and another with OTL: XIC SW1 XIC SW2 OTL M1 is actually: if (SW1 and SW2)=1 then  M1=1 endif and another with OTU: XIC SW1 XIC SW2 OTU M1 is actually: if (SW1 and SW2)=1 then  M1=0 endif The whole program runs from start to finish with each scan which is somewhat different to 'normal' programming but as you can see if the above bits of code don't get run (i.e a subroutine that isn't called) then the they don't change. There is nothing special about Ladder Logic, it's just often easier to understand than 10 lines of 'if', 'and', 'or' etc. It is just a normal computer with a normal program.
  4. 121

    Is there not a FLL insruction on the PLC 5? FLL 0 #N36:1 40
  5. I wouldn't if I were you. I don't know about the rest of the world but in the EU the machine needs a double safety circuit which isolates the electrics and air etc where there is any risk of danger. This means it must be hard wired and that anything which could still be moving after an emergency stop (or breaking the light curtain) must have a physical guard. You would not get a safety cirtifcate here and the machine would literally have to be isolated and cordoned off until it was corrected.
  6. Unwind Control

    I don't see why you thinks it's non-linear? Surely the unwind rate is the circumference of the drum x the rotation speed and the the circumference is the diameter x PI. I assume the value from the sensor is linear giving a distance from the sensor to the drum. All that is required is to find the correct speeds with a full and an empty drum and then put those values in a SCP instruction (scale with parameters). P.S. controlling input to inverter because obviously it will be a non linear reponse ie higher rate of change of speed as roll gets smaller Does that mean you control acceleration rather than speed?
  7. Subroutine Instructions

    I searched your code chakorules but could not find any SBR instructions? Do you mean JSR?
  8. Subroutine Instructions

    That would make sense Alaric. I never thought of that but then again, I've only ever used PLC5's once.
  9. Subroutine Instructions

    I havn't used SBR in years. I remember that it caused problems with online edits and as far as I can tell it has no explicit use.
  10. Am I right in thinking I can not run a PV600 using the 24V output from P2 power supply?
  11. Is it possible to connect an SLC5/03 to a PV600 via the DH485 port and program them both with a standard seral cable connected to Ch.0 of the SLC?
  12. Mmm, it would be easier to buy a 1747-PIC. Do they make a smaller 1747-PIC, when you are crammed in the corner by a machine they really get on my nerves?
  13. I've recently borrowed an SLC503 for development (and learning) at home and now I've borrowed a spare PV600 which I was hopng to do further research with, however the PV is 24V and I don't have a 24V power supply at home. It would have made life easy and much tidier (I'm running out of plugs) but now I'll have to make space for another power aswell.
  14. But I can from a P4
  15. Karnaugh Maps

    The only place I've ever used Karnaugh Maps is in electronic circuitry design. I think they are more for reducing the number of logic gates - which are at a premium in a circuit - and not to improve efficiency.
  16. I used to post on the RSLogix forum but for some reason (I can't remember now) I stopped. I do recognise a few User Names from here which are also on the RSLogix Forum and I remember a large thread similar to this on there. P.S. Ihad a look why I left and here is the reason http://www.rockwellsoftware.com/forum/rslo...8&threadid=8343
  17. Oh yes, and I'd like to be able to cancel a deleted rung when editing online. Several times I've made changes to many rungs and then accidentally pressed delete on one. This means you have to copy and insert the rung again because you can't cancel the edit because it cancels all edit. Or can you?
  18. Allen Bradley Programming

    It looks like I owe you a pint! I haven't tested it yet but by Jove I think you've got it! JAKE
  19. Yes, why do I have to enter a binary number into a bit address (in the ladder logic)? Also, I'd like the option to turn off the displayed values (with a little icon/short-cut key) so I can see more ladder logic. e.g.    +--MOV--------+ ---+ Move        +----    | Source N7:0 |    |          44 |    | Dest   N7:3 |    |          22 |    +-------------+ would become:    +--MOV--------+ ---+ Source N7:0 +----    | Dest   N7:3 |    +-------------+
  20. Allen Bradley Programming

    I'm using (testing) a USB to Serial Adapter (prolific) which cost me about £10 It works great for about 10 mins - connected to an SLC5/04 through the serial port (Ch.0) and then kicks me off line and can't establish a connection for more than 10 seconds. I haven't yet found out why but I don't think is the adapter, I think it's more to do with Win XP (?) P.S. Win XP SP2
  21. I don't think RSLogix is capable of determining whether a subroutine has been scanned. A subroutine can be called from anywhere, multiple times and with conditional logic. I would prefer it to check that all subroutines are called from at least one file when you verify the programme. If you search for ^A that will find all edits. I also think that under the File menu; Save, Source Control and Sumary Info should have different short cut keys. Alt F-S does not save the program.
  22. Rolling average

    The only way is to log the data and then average it and the most efficient way is to keep a rolling total. Keep a list of previous values. When a new value is read, subtract the oldest value from the total and and add the new value, then store the new value over the top of the old value. Either perform a division to calculate the average on the total or on each value as you use it (if you are not too bothered about accuracy) If you are very new to programming then the indirect addressing required will stump you. Remember if the rolling total exceeds 32767 then you will either have to use 32-bit maths or floating point numbers Failing that, there is probably an example somewhere on this site but if not then give a bit more info (input ranges and number of sample) and someone here may help further.
  23. If your product codes are sorted in order then I would do some kind of binary search. A binary search is where you have 3 pointers, one points to the bottom of the list, one to the top and one to the middle. Because your data is sorted in order, if the item stored at the middle pointer is greater than what you are searching for you can then consider your table to be from the bottom to the middle and keep repeating this until you find what you are looking for. This following would require a maximum of 9 loops to locate the correct value and the value in N7:5 would point to it. This is just a quick example and has a couple of bugs in it. If you don't understand then there are many people on here who can either help further (myself included) or offer alternatives. It goes a little like this ... >Initilaise the table from 0 to 499, >Calculate the middle >If the table is the minimum size (i.e. last check) then goto the end >If the number is less than that in the middle of the table then resize the table and jump back >If the number is greater than that in the middle of the table then resize the table and jump back >the end: check to see if the value is found. Example (N10 contains the 3 word values): (why the thumbnail image is over 1Mb and the actual GIF is 72Kb no-one knows - sorry, not my fault)
  24. I usually find if a timer file is 50 in length then not all of the timers are used anyway.