ParaffinPower

MrPLC Member
  • Content count

    453
  • Joined

  • Last visited

Posts posted by ParaffinPower


  1. BnB NP <> NQ ! Gary Use a project script to copy the plc tag to s003. Think you need to trigger the screen trigger flag too. I avoid the NQ these days so am talking from memory. Pp

  2. Hello Bob I know how much you love function blocks, but there's no better way, I'm afraid! This FB wants the multiplier, the D location of the input table, and the D location of your results table. The D area is implied internally, so it just wants the address. All data types are UINTs, but changing to another is easy. In the example, the input table starts at D0, and the results appear at D40. The multiplier is hard coded as &4; make this your variable. Pp ForBob.cxp

  3. You need two MSKS instructions. The first one determines which interrupts are to be enabled; the unit number (0 or 1) for N and which inputs you require to be enabled as an interrupt for C (as a binary pattern). If your interrupt input was wired to bit 0, then this would be &1. Multiple inputs can be specified. &9 would enable bits 0 and 3, for example. The second instruction needs the unit number. This time N is 2 or 3 which relate to unit 0 or 1 respectively. The edge you wish to invoke the interrupt from is defined in C; again in a binary pattern with 0 relating to a rising edge, and 1 a falling edge. This depends on if your sensor is configured light-on or dark-on. The inputs 0-15 are fixed to interrupt task numbers 100-115 respectively. The task will be invoked once per interrupt. Pp

  4. You are right; you need the 482 card for ethercat io even if you don't need the motion. I'm not sure if that supports third party io though. I have only used their GX block io with that card. Pp

  5. Hello The NCx supports 'Interrupt Feeding'. This is exactly what you're trying to achieve. It requires the sensor to be wired into the drive directly. (Manual W426) This will be very accurate. Another method is to issue a Move command. You can change the target position (on your sensor) and re-issue the move command flag. Probably easier, in truth. Pp

  6. Hello First, you will need the manual. Set the dip switches according to your application. Without any other changes, this will give you temperature control! I usually change the control period from 20 seconds to 2 or 3 maybe. If necessary, run the autotune. There is example ladder in the manual that shows exactly how to do it. Pp

  7. Hello Have you put the alarm messages on different screens, or are they shown in the alarm viewer? If you've 'allied' the $SW memory to plc memory, the plc can make a screen change, if that helps? Pp

  8. Hello I'd use an array within a ST function block. Declare a variable MyINT[2]. The array length doesn't matter. Use AT addressing (D0 would be good) example code MyINT[Pointer] := ValueToLog; Pointer := Pointer + 1; If Pointer > MaxNumber then Do Something; end_if; You can offset from D0 by: MyINT[Pointer + 1000]; (* This will start at D1000 *) Obviously, the 1000 can be an input to the FB giving you flexibility. From within the ST, you can use the WRITE_TEXT instruction to get your numbers on the CF. This will write ASII text, so you'll need to convert each value just before writing using the in line conversion (INT_TO_STRING and its variants) You may want to log 10 values (for example) then add a line feed. This is buried in the help file showing how you code non-printable characters: $$: $ mark (ASCII code: #24) $': single quotation (ASCII code: #27) $L or $l: line feed (ASCII code: #0A) $N or $n: new line (ASCII code: #0D0A) $P or $p: form feed (ASCII code: #0C) $R or $r: Carriage return (ASCII code: #0D) $T or $t: Horizontal Tabulation (ASCII code: #09) Pp

  9. Avoid BCD; the NCF card and servos use DINTs for speed and position commands. As your BCD numbers are interpreted as DINTs by the (incredible) NCF card, the low WORD for hex 25000 is decimal 5 (very slow), where the low word for hex 24999 is 18000 or so (faster). Are you using a MOVL to move the speed into the axis operating output area? That's your problem I bet. Pp

  10. If it's going backwards then the position will be decreasing regardless of where you monitor it. You must be telling it to go backwards, though. You would be able to put the units into m/min in the drive (or a multiple thereof) and read directly - this will still be negative though. Either multiply by -1 or do it on the hmi. You could reverse the servo (see my first post) and save yourself a job. Pp

  11. If it's going backwards then the position will be decreasing regardless of where you monitor it. You must be telling it to go backwards, though. You would be able to put the units into m/min in the drive (or a multiple thereof) and read directly - this will still be negative though. Either multiply by -1 or do it on the hmi. You could reverse the servo (see my first post) and save yourself a job. Pp

  12. Hello When you say cw, is that looking at the shaft or from behind the shaft. Looking at the shaft, cw is reverse hence negative values. Pn00 (I think) in the drive swaps to cw being forward. The axis current position appears in the 'axis operating input' memory area automatically; you don't need to use an Fb. I use ncf often, and never use the fb's. I've made an xls to generate all the axis and ncf symbols If you want it? Pp

  13. Hello Andy Don't confuse the CP1E with the new CP1LL-E and CP1LM-E. These are CP1L and CP1LM equivalents, but with ethernet in lieu of USB. Pp

  14. Hello Herewith my comments: 1. I don't know what the ADD instruction on the ENO is supposed to be doing 2.The DistanceBetweenPulses is a REAL, so needs to be entered in the format +1.0 3. The Pulse and Running parameters need to be something other than Always Off 4. The other addresses are all 0; the inputs need populating, the outputs are optional (but the result will appear in one, or both, of them 5. Bare in mind, this was an example rolling average FB; it won't produce wotsits/hour 6. The 'Tweak' parameter was intended to give a bit of calibration; +1.0 yields no calibration will be applied, +1.1 will give 10% over. Hope this helps point you in the right direction. Pp

  15. The oneshot fb is nested; don't worry about it. The idea of a fb is to encapsulate some code so you would rarely (never) address its internal memory. Anything you need from, or presenting to the outside world would be presented as an input or output parameter. This is the case on the example fb provided. Clear as mud? Pp