Bobodopalus

MrPLC Member
  • Content count

    88
  • Joined

  • Last visited

Everything posted by Bobodopalus

  1. Flip flop in structured text

    i found a work around for timers here posted by roze on this forum, still cant link sadly but that will only work for timers completing i think
  2. Flip flop in structured text

    Hi all i've been trying to make a simple timer in structured text which is turned on and off by a single input, all instances of flip flops i have found seem to be 2 input. any help or examples would be appreciated example of programs; Pulse signal received, start timer Pulse signal received stop timer
  3. Flip flop in structured text

    anyway for this to work on a cp1l? i am very happy with the program though, thank you very much. i work with CJ2M around 80% of the time and CP1L the rest of the time, im fine with doing the CP1L version differently if needed
  4. Flip flop in structured text

    realised my mistake, the error was caused by me putting the FB onto a test plc i have which is cp1l and not cj2m, cp1l does not use timer type in FB. so now its working but it seems to be quite inaccurate, but it does seems to be scaled so this can probable be fixed with maths. im using a TIM block to trigger this now with #40 on the input, the block is activating correctly but for #40 im getting a result of 6 seconds, and for #10 i was getting a result of 1.5 so it seems to be 50% out, im not sure why this is the case.   yes after some testing it does seems to be 50% out, i changed the dividing value to 1500 from 1000 and now its accurate, whats causing this difference though?
  5. Pressure transmitter drift

    im fairly sure the analog input is configured correctly as there is another transmitter working on it correctly. the transmitter should be linear yes,those 2 readings are just a couple i wrote down, we did go up and down the range and raw data would get further and further away as the pressure was increased, using a scaling function block that is proved to work, it would be correct scaling around 9 or so bar and then vary more and more as it raised. when i go back on site i will be testing with an amp meter, unfortunatley i dont have a amp generator or analog output unit i could use to prove the analog unit. i have tested the same transmitter with the same function block just now and the readings were perfect 1 to 1, 1 bar = 100 raw data sadly i didnt install this and couldnt say about the wiring, i believe its only 2 wire so i would doubt thats been done wrong, and the analog unit settings look fine to me
  6. Pressure transmitter drift

    Hello all this isnt strictly omron/programmer but has anyone used much in the way of pressure transmitters? we have a wika s-11 pressure transmitter on one of our machines installed roughly 7 months ago where the scaling does not seem to be linear, i only started working here around that time so i dont know how it was installed etc. but its a 0-40 bar 4-20mA transmitter connected to an ad081 4000 resolution connected to a cj2m. so the conversion should be nice and easy 100 raw data = 1 bar however it seems to be scaling logarithmicly to me as we checked with a 2 different guages and when they were at 2 bar the transmitter was showing 137 raw data and at 8 bar it was showing 737 raw data and this seems to keep scaling in this fashion as we get to higher bar. is this a common fault on transmitters? is there anything else that could be causing this? how often would you normally expect a transmitter to last? i checked my scaling FB on another transmitter connected to a compressor and it worked correctly so its not the maths used   thanks in advance
  7. email is lewis@aerosol-systems.co.uk

  8. Flip flop in structured text

    sorry it is timer1 = timer, i typo'd, can you email it to me if you have made it? or i can send you what i've made if you pm me your email.   really missing being able to upload images
  9. Flip flop in structured text

    sorry this is where my knowledge of plc's really falls apart, in the comment above what does M0 and X0 actually refer to? i really only know the basics of plc's finished uni with very little knowledge and have picked up everything i know since starting this job near the start of the year largely from this website. and i assume chelton's example should work? im trying Timer_SP:= 200; (* Timer setpoint *) TIMHX(TRUE,timer1,Timer_SP); pulse:= input AND NOT oneshot;    (*generate pulse on rising edge of input*) oneshot:=input; IF pulse THEN     IF NOT timer1.CF THEN (*Calculate cycle time only if timer has not timed out*)         inst_cycle_time_sec:= UINT_TO_REAL(Timer_SP-timer1.PV)/100.0; (*instantaneous cycle time in seconds*)     ELSE             inst_cycle_time_sec:=0.0;     END_IF;     timer1.PV:= Timer_SP; END_IF;   internals: pulse = bool oneshot = bool timer = timer timer_sp = uint inst cycle time sec = real   but when i compile i get ERROR: Symbol 'timer1' is the invalid data type(TIMER or COUNTER) in the SFC/ST program. ERROR: Invalid Instruction   whats causing these errors?   thanks for all the help both of you   also i see images are still not uploadable :(  
  10. Manual writing software

    yes NB designer does this also, allows to print every screen which is nice. im more interested in the documentation side and how people link their descriptions and such to the image. the way i do it on word is maybe the wrong way to go about it. i give each button on the HMI a number and then write a description for that number, its quite long winded to do on word, creating text boxes arrows etc. i keep trying to upload an image but i cannot, im aware the site has been having issues
  11. Flip flop in structured text

    im having issues with the site today. here are the errors im having timer 1 being timer type is incorrect? invalid instruction i have no idea what this refers to (i cant seem to upload or add a link for the screenshot)
  12. Flip flop in structured text

    i've just tried this and had some errors
  13. Flip flop in structured text

    thanks alot, i'll have a go with this a bit later
  14. Flip flop in structured text

    every second pulse is fine, our machines complete a cycle in around 2 seconds, we only need to know roughly how fast its operating and it doesnt need immediate updates
  15. Flip flop in structured text

    hmm i think ive made an error there in stopping the timer, not sure of the best solution  
  16. Flip flop in structured text

    does this look right? im gonna go test with it now but i find it really hard to monitor ST and see the problem head_go_pls = input pulse timer_start = start timer timer_snap = move the current time so that its stored pulse:= Head_go_pls AND NOT flip_flop_bit; flip_flop_bit:= Head_go_pls; IF pulse THEN     Timer_snap:= Cycle_timer.PV;     Timer_start:= NOT Timer_start; END_IF; TIMHX(Timer_start, Cycle_timer,500); Cycle_time_bin:= (500-Timer_snap); Cycle_time_real:= one_minute/Cycle_time_bin; Cans_per_min:= Cycle_time_real*Index_amount;
  17. Flip flop in structured text

    ah great, at the end of the timer it it subtracts from the total time to display time it takes for a cycle
  18. Can you use internal plc bits in function blocks?

    just to double check this works for clock pulses too? if i put CF102 in the address for 1 second pulse that should be fine?
  19. Hi all is it possible to use the internal date of a plc in a function block without setting it as an input for the function block? for instance i have some logic to do something inbetween lets say 10:00 and 16:00 o'clock am i able to use those internals bits of the plc where the time is stored without inputting them to the function block and using them internally?   thanks
  20. Can you use internal plc bits in function blocks?

    ye thats all i needed to know thanks, will be a bit easier to convert some ugly code now with alot less inputs
  21. setting date cp1l

    ive got it doing what i want it to now via the MOVD instructions settings the bytes for the DATE instruction and have reassigned words to make it a bit nicer, i would still like to know if there is a way of altering bytes in nb designer. while im on the topic, is there a tick box somewhere for numerical displays which makes it always show zeros in front of a number? for instance i am displaying date here and displays it as 24/6/20 but i would much rather it be 24/06/20
  22. setting date cp1l

    yes i need to tie it to the PLC unfortunately, its for controlling operation of a machine through throughout the week. the plc time needs to be adjusted by operators for different time zones and converting from GMT to BST etc
  23. inv002_refresh scanlist

    i see, thank you
  24. inv002_refresh scanlist

    Hi all Can someone please clear the scanlist value up for me which is part of the INV002 function block the documentation says that whatever nodes you have assigned are what bits you need enabled in the scan list they give the example of node 1 and node 14 being used from this they get a scan list of #4002, where does this number come from? https://docplayer.net/59460263-_inv002_refresh_v31-bool-dword.html for my next job i will be using 3 inverters and am not sure what my scanlist should be
  25. inv002_refresh scanlist

    i think i get it now that is actually bit 2 and 15 right? so do they ignore the first bit for the node value? so if i want node 1,2 and 3 active i would need 1110 which would be #E right?