Spedley

MrPLC Member
  • Content count

    147
  • Joined

  • Last visited

Everything posted by Spedley

  1. Indirect Addressing

    This should do the trick: SOR XIC I:0.0/0 BST TON T4:0 1.0 3600 0 NXB CTU C5:0 99 0 NXB MOV C5:0.ACC S:24 NXB MOV T4:0.ACC #N7:0 BND EOR I'm almost certain the MicroLogix 1000 supports indexed addressing so the above is the same thing.
  2. This once took me hours to work out. Even technical help was useless. Goto channel configuration tab and change Channel 0 System to DH485. Then click the General Tab and change Chanel 0 Mode to User. Go back to channel configuration and change Channel 0 System back to Shutdown. That should do it.
  3. Only change the slave when the master changes but you must also take into account the current change of the slave. If the master changes by +1 and the slave changes by +2 the slave should change by +3 This especially applies when the analoge signal is noisy.
  4. RSLOGIX 500

    I don't think such an instruction exists. Your only real option (there are other more complex ones) is to have a seperate multiply for each word.
  5. And I've never managed to get a Compaq laptop to work with a 1747-PIC - ever!
  6. Which reminds me, I wish the insert key extended the branch down rather than giving me a list of instructions.
  7. I use mnemonics to program (typing on the line) and usually point/click, copy/paste for small changes. I also use the search and replace a lot - code is often the same just with different addresses.
  8. Do you mean find out what your PLC's node address is?
  9. Doh! I've been using NOP's for the past 2 month's now while I'm learning pic-programming for that very reason. It must be a mental block!
  10. NOP's are useless for almost everything. The only time I've ever used them - never with PLC's though - is to allow the pipeline in a processor to catch up (if you don't know what that is then don't bother). I suspect the reason the instruction exists is to allow program memory to be re-arranged whilst it's still running the program which that doesn't apply to user either.
  11. I presume then that ST19:1 (ST19:1.0) actually points to a word containing the string length and ST19:1.1 is the start of the string (or ST19:1.DATA[0]) ?
  12. Counting bad parts

    How would you set the bits in B3:0 ?
  13. Counting bad parts

    I would do something like this ... SOR BST XIC PART_PASSED NXB XIC PART_FAILED BND OSR OSR_BIT BST XIC HISTORY/0 SUB COUNT 1 COUNT NXB OTU HISTRY/0 NXB DIV HISTORY 2 HISTORY NXB XIC PART_FAILED BST ADD COUNT 1 COUNT NXB OTL HISTORY/9 BND BND EOR SOR GEQ COUNT 5 OTE STOP EOR where: HISTORY is a word containg the last 10 results COUNT is a word containg the number of fails in the last 10 parts It uses divide by 2 instead of bitshift (making sure bit 0 is clear otherwise it will round-up) and stores the latest result in bit 9 to reset clear HISTORY and COUNT
  14. Ladder menus

    Well I never! Very usefull thanks!
  15. adding 3 pv550s

    PanelViews come with several different connectors. One of the options is a DH485 port into the Panelview and a DH485 out of the panelview.   +----+   | PC |   +----+           +=====+ +=====+ +=====+  +-------+  /      \          |PV550| |PV550| |PV550|  |SLC5/03| +-----+--+         +=+=+=+ +=+=+=+ +=+=+=+  +-+-----+       |              | |     | |     | |      |       |  +---+       | |     | |     | |      |       +--|PIC|--/ /--+ +-----+ +-----+ +------+          +---+ Just like above using a DH485 network. The computer and PIC box (or equivalent) are used for programming etc and are not needed but act as Node 0, the SLC as node 1 and then the Panelviews just being nodes 2,3 and 4. I've seen this used with about 10 Panelview and I wouldn't reccomend that many because the network was very slow an unresponsive but 3 should be fine for most applications.
  16. adding 3 pv550s

    You should be able to chain each PV550 directly from the SLC5/03 without the need for any other hardware. If that is what you are asking?
  17. Timers

    You could just copy the contents of the clock S:37-S:42 when your bit goes true (with a one-shot if neccassary) and send this to the spread sheet and let the spreadsheet calculate the difference in time. S:37 = Year S:38 = Month S:39 = Day S:40 = Hours S:41 = Minutes S:42 = Seconds Just XIC MY_BIT OSR TEMP_BIT COP S:37 N7:0 6 would take a snapshot enabling you to send it to the spread sheet. Or you could just use a TON instruction if the period between changes is less that 9 hours and second accuracy is OK SOR XIC MY_BIT OSR TEMP_BIT MOV T4:0.ACC N7:0 EOR SOR XIO MY_BIT TON T4:0 1 32767 0 EOR Or ... maybe I've misunderstood?
  18. RSLogix5000 tagnames

    I only use tags with RSLogix so I usually don't (usually) care wether it's a solenoid or motor or whatever. If I use symbols I use my own method (or maybe other peoples aswell) of giving a description e.g. Right Hand Table Lowered and give it the symbol RHT_L for inputs and Lower Right Hand Table and give it the symbol L_RHT for outputs. Because I think comments are absolutely neccassary and symbols are just and easy way of remembering addresses they don't need to be useful to anyone else and because the comment is easy to remember I never forget the symbol
  19. Or you could buy PLC hardware that has cheaper software. If AB loses sales due to expensive software then perhaps they may change their policy.
  20. panelbulder32 question

    I believe there is also the option of not including tag names in a PVA etc to make the file smaller and quicker to download.
  21. I'd probably do this for the steam valve instead. I don't like latching bits or one-shots because it's hard when debugging to tell when they were set and you usually need an explicit reset BST XIC B3:0/2 NXB XIC B3:0/9 BND BST LES N7:10 160 NXB XIC O:0.0/3 BND LES N7:10 180 OTE O:0.0/3 (just copy the line above, press enter at the start of a rung an paste it into the textbox that appears.) Also if possible and unless absolutly necessary I make all the I/O normally open. In file 4, rung 0 (F4:0) there is XIC STOP_PB Should that be XIO STOP_PB or is it a normally closed contact? It's easy when beginning to confused with logical NOT and hence very confusing with NOT-NOT's. Clicking the right mouse button on the left edge of a branch give you the option to extend branch down which is much better than multiple nested branches.
  22. MSG Integer

    Floating point won't help unless it's 64 bit and a long integer (unsigned) will only go upto 4,000,000,000 - not quite 10 digits. Unfortunatly I don't know what ML1500 is, nor a DVT camera so I can't offer more advice.
  23. MSG Integer

    If you are expecting a 4 digit number and you get a 3 digit one can't you add you own implicit zero to the start? I think there must be a better way?
  24. conversion

    looking it up quickly SLC's use a 32-bit floating point value like this MSB s xxxxxxxx mmmmmmmmmmmmmmmmmmmmmmm where: s - 1 bit is the sign bit (1=negative) x - 8 bit is the exponent m - 23 bit is the mantissa. You can google the basics of floating point arithmatic but the jist is number = (negative if s=1) (1+m)*2^(x-127) and m must be normalised which means the most significant 1 must be to the left of the decimal place and it is left out of the mantissa e.g. 1101.01 would become 1.10101 and the mantissa would be 10101 the binary integer -16874 =1011111000010110 the fp -0.15 = 1 01111100 0010110 .... i.e. - (1/8+1/32+1/64 etc ..)*2^(124-127)