baptie

MrPLC Member
  • Content count

    20
  • Joined

  • Last visited

Everything posted by baptie

  1. Encoder Pulses

    I am using PRV881 to track encoder pulses when a motor is turning. On a Limit Switch Rise I am looking to extract the value, when the same Limit Switch Falls I am looking to extract the value. I then take sample 2 from sample 1 to give me a result, and calculate sheet size in mm. Every combination I try I keep getting a rolling count, ideally I am looking for a one shot reading. Is there a function or method to extract just one set of reading for the rise and one for the fall of the limit?
  2. CX-Programmer improvement requests

    Is there a tick box to make all I/O, bool's and variables global instead of clicking the make global button every time.......as I forget in haste from time to time
  3. Encoder conversion

    Worked a treat!!!!!!! Now back down at 3.2 - 3.5ms. Many thanks for all assistance, I may even sleep this weekend now, lol.
  4. Encoder conversion

    Hi, I have a motor outputting 30pulses/rev at the encoder. With output shaft measured I get a calc of 0.1295mm/pulse. I made up a function block with st: Length_x = dint to real (raw_x) Length_x = raw_x * 0.1295 Length_x_mm = real to dint (length_x) when added to the program my scan rate jumps from 3.2ms cycle time to 7.ms as the shaft is moving all the time. I was wondering if I can do the calc in ST but simply bring in raw_x * 0.1295 = length_x_mm without the dint to real/real to dint conversion in a hope that cycle time will decrease? Thanks in advance
  5. Encoder conversion

    Ohhhhh - now that looks like it would work a treat. I will give it a shot first thing, test on test bed first. ........a/w the dawn
  6. Encoder conversion

    I am using a CP1L taking input from High speed Counter. This is a copy of the actual code: Thanks for the above Sergei but the calculation overspilled as the count is actually: *10296 / 100000 The sum is required to cope with 300M conveyor, after 21M the counter overspilled as the calculation was massive.
  7. Encoder conversion

    Is there an alternative in ladder logic that I can: Take a dint, convert to real, multiply with constant and convert back to dint for 'mm' output? What I have works but it's running slower than I wish.
  8. Equals to (UINT)

    I tried CTBL and it kept missing the downward pulse. Altered my way of doing sweep but still not happy as its not right
  9. Equals to (UINT)

    I have used a PLS2 function to sens a servo sweeping Left to right with code inbetween working out limits, stops and home positions. All works great apart from the head requires a little offset, around 1000 steps to clear the area. I have used -(410) to subtract offset from trailing edge = trailing edge offset When scan_Sensor is off: =(301) (Ignore the 'S' I was clutching at straws) to compare the raw encoder value against the above calc. Or LH_Limit activated Scan CW If in the calc I put subrtact 0 - the scan works great. If I subtract or add any number from 1 - 10000 say, the head ignores the =301. Can anyone see where my logic has failed, as it seems a very simple calc? All figures are UINT's
  10. Equals to (UINT)

    I take Leading edge and trailing edge readings fed back from the encoder as a limit passes the film. As the leading edge passes I send the encoder value to leading edge and to an interrupt register. same with trailing edge. Then I am trying to compare trailing edge + offset with the raw encoder value. I am about to attempt altering values to signed, if not successful I am looking at swapping over inputs to give me an input with interrupt capability to do it at source. Hopefully, number is reached, fire interrupt and move number to Leading & Trailing edge calcs in time for compare.
  11. Equals to (UINT)

    no, i am simply using PLS2 for movement, i amaling with the posision via a limit on the sweeping head. repeatable value +/- 50 steps, i need to add offset of around 1000 to move out a bit. so i actually stop and start the PLS2 via CW & CCW wired to plc
  12. Equals to (UINT)

    That was my exact worry Bob.
  13. I am using a CP1L plc and have two high speed counters used for pulse output to servo and main drive. On the servo I am attempting to use CTBL function. I have set up the register with 2 interrupts. One opens a solenoid and one closes it. The problem is that the position alters every time so I cannot hard code two values. I have a sweeping head with solenoid fitted and proximity sensor. When the sensor picks up target I fire the value to first interrupt figure in ctbl and when trailing edge has been picked up I fire this value for the second interrupt value. My query is, is the above method acceptable as I don't seem to be getting the interrupts to run. Can anyone shed some light on this please as I am not 100% on the ctbl function?
  14. Encoder Pulses

    S1 and process active were not needed as S2 will only be active on its own. just cant understand why the first count does not fire on upwards pulse.
  15. Encoder Pulses

    Works great in simulation mode. connect to actual running machine and I get no first count. I removed S1 and process active so I was only looking at S2 upward and S2 downward pulses. The S2 downward works great for some reason but the upward just doesn't fire........where am I going wrong? I have even reduced the input settings for S2 to read every 2ms as the endoder is every 3ms, made no difference. I can run simulation and it works perfectly, does the calculation and outputs the correct sheet length......suprisingly!
  16. Encoder Pulses

    I will give it a whirl online in the morning using the actual encoder. Got head buried in interupts @ 23:13pm........not good! Many thanks, I will test am Friday
  17. Encoder Pulses

    Appologies, I am using a CP1L with NQ3 Attached. Code snippet as is:
  18. Encoder Pulses

    I tried the above and still got the rolling count. I was using 1 pvt and detecting switches then moving sample 1 to -404 then detecting fall of switch and writing it as sample 2 - subtracting 1 from 2. I have 2off limits and a process start command, I have been attempting to latch via set/ rset, 1 shot pulse and mov. All keep returning a rolling count from the encoder.
  19. NQ Designer Simulation Tool

    Ver. 2.0 - Recently reinstalled. I do not have a spare panel to run the simulator on
  20. I have recently started working with Omron products, I have the Full CXOne installed. Programmer is working fine and runs offline as well as online. NQ Designer works great apart from offline simulation Tool. When you run simulation you get the front panel graphic on the screen with the 'F' Keys and nothing else. I was getting a run time error so I reinstalled NQ Designer. Now I only get the panel display and I really need to be working offline. Can anyone shed some light on this please?