baptie
MrPLC Member-
Content count
20 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout baptie
-
Rank
Sparky
Profile Information
- Gender Male
- Country Scotland
-
baptie started following Micro PLC Interrupt and HSC Programming
-
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
-
Worked a treat!!!!!!! Now back down at 3.2 - 3.5ms. Many thanks for all assistance, I may even sleep this weekend now, lol.
-
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
-
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.
-
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.
-
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
-
I tried CTBL and it kept missing the downward pulse. Altered my way of doing sweep but still not happy as its not right
-
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.
-
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
-
That was my exact worry Bob.
-
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
-
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?
-
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.
-
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!
-
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