Spedley

MrPLC Member
  • Content count

    147
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Spedley

  • Rank
    Sparky

Contact Methods

  • Website URL http://cv32.com/
  • ICQ 0

Profile Information

  • Location Warwickshire, England
  • Country United Kingdom
  1. Would it not be possible to put at a proximity switch on the spray head. When an object is detected (by the proximity switch) then turn the spray on. It would not reduce the travel of the spray gun much but it would save paint (?) and it is a very cheap, simple and effective solution ... unless you specifically want to decrease the spray head travel i.e. to increase the coveyor speed. It may also help if you can push the part to one side of the conveyor, then you only have to measure the distance to one side of the part or, use the proxy I suggested above to detect the edge with the spray head if that is any use. What are the actual goals are you trying to achieve (e.g. increase conveyor speed - not measure width of part)
  2. Truncation is mostly used when you are using integers. It is used when you when you want to process part of a number rather than the whole, i.e. using 32-bit maths on a 16-bit processor. or simliarly when converting integers to strings.e.g. to convert 456 to a string (assuming the processor does not have a [pseudo-]instruction to do it. (456 DIV 100) MOD 10 = 4, then add the ASCII value of zero (i.e. 48) and you get 52 which would output as '4' (456 DIV 10) MOD 10 = 5 ... would output as '5' (456 DIV 1) MOD 10 = 6 ... would output as '6' without truncation (with rounding) you would get (456 DIV 100 =rounded upto 5) MOD 10 = 5 ... would output as '5' (456 DIV 10 =rounded upto 6) MOD 10 = 6 ... would output as '6' (456 DIV 1=6) MOD 10 = 6 ... would output as '6' Does that make sense?
  3. I personaly think that AB made a mistake when they decided to round results to the nearest value. What do you think?
  4. I'm not sure if the unround value is left in S:13 (or perhaps S:14) when using floats but it should be relatively easy to subtract your rounded number from the original to determine if it was rounded and then adjust it.
  5. The easiest option if the float is within range is to move the float into an integer and convert that, then subtract the integer to be left with the decimal part and multiply it by 1000 and convert that. Then join the strings together. Quite quick and better than nothing.
  6. RSLogix 500 scan times

    There are no overheads involved in multiple rungs but there are with multiple/nested branches, however if conditional logic has to be repeated for each rung this may have an impact on scan times and memory usage. I usually group similar rungs in branches to make a program easier to read. A program is often written more efficiently when it's easier to read so this would probably cancel out any negative effect from the overheads.
  7. Time for my NOT training

    Also, XOR I:1.0 255 N7:3 performs the same function as NOT the bottom 8-bits. and if you want to invert a number then subtract it from zero. There is no need to do logic unless you are working in electronics - if there is then try changing your program.
  8. Time for my NOT training

    I think the encoder is probably wired as NPN rather than PNP, i.e. a 1 is represented by a low voltage - I've found this common with Japanese components (I'm no electrician but I think it allows several different voltages to be connected to one sink card and is also more reliable for testing faulty circuits) If this is so then the input 11100000 would need to be NOT'ed to convert it to to it's true value of 00011111 or decimal 63. If it is 8-bits then it's unlikely it is using negative numbers.
  9. Has anyone else encountered the bug in PanelBilder32 V3.80 where you can have an embeded variable with no tag and it lets you download it to a PanelView. I could not get the PanelView to reset, it kept coming up with Error 60 and did not show up in RSlynx (PV600 touch/keypad). Fortunatley I was able to get it to the Config screen and I could correct the problem from there. It was only a bit of development work but see if it verifies with no errors and then have a look at the states for Zones 1 to 8 on screen 4. QuickPRESS.PBA
  10. AWT, ST FILE and CH0

    ST9:0.LEN is a word value containing the strings length. It is the same as ... ST9:0.DATA[0] This is the start of a 42 word array. ST9:0.DATA[1] to ST9:0.DATA[41] contain the ASCII data as two characters per 16bit word - although they are annoyingly in the wrong order (if I remember correctly). If possible it is much easier to use the ASCII instructions such as ACI, AEX, AIC etc which means you can dont have to use DATA[] at all. Also like OkiePC says, use AWA instead of AWT unless your messages are longer than 82 characters. Also, watch out for the bug when you setup CH0 as user, if sometimes sets it as system and you cant change it back unless you fiddle about. Vey annoying.
  11. Viruses

    Ooops, just noticed the "clean up information" in the topic above. Doh. No, I don't have an unprotected system but nothings perfect.
  12. Has anyone had any virus warning appear when visiting this forum? I visited earlier on today and a few windows popped up saying 'script ...' and lots of unprintable charaters and then dissappeared only to be followed by a virus alert and AVG jumping into life. Then later, I returned to this site only to be warned that downloading a file called forum.mrplc could be dangerous? Also, the font on the menu accross I.E. (File, Edit, View etc) has changed? I haven't worked out why or how to change it back yet? Anyone noticed anything strange or is my problem elsewhere (this is the only place I've seen it)? P.S. I did a full virus scan which came up with the usual benign(?) Java.byteverify in the cache but nothing else?
  13. In Mitsubishi you put PLS M0 - M0 is the one-shot. In AB you put OSR B3/0 B3/1 - B3/1 is the one-shot and B3/0 is the state from the previous scan I believe Mitsubishi (I don't know) modifies the instruction in the actual program (Argh - nasty!) to remember the previous scan's state so you can't reuse code with a one-shot in it (it's been a long time since I used Mitsi so I may be a bit off there)
  14. I have to point out (again) that I avoid the use of OSR. They are relatively pointless when you have to specify a bit for them to use (unlike Mitsubishi etc) and they can make it hard to track down bugs. I prefer to use: B3/0 B3/1 | ...---+--]/[----( )--+ | | | B3/0 | +---------( )--+ | where B3/1 is a one-shot or logic to be 'run once' ================================================== ... or with XIC instead of XIO, B3/0 B3/1 | ...---+--] [----( )--+ | | | B3/0 | +---------( )--+ | in conjuction with the following for detection of 3 states. | B3/0 +--]/[---... (false) | | B3/0 B3/1 +--] [----]/[---... (rising) | | B3/1 +--] [---... (risen) |
  15. Use it as an input, i.e. inplace of XIC