Magnus

MrPLC Member
  • Content count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Magnus

  • Rank
    Newbie

Profile Information

  • Country Sweden

Recent Profile Visitors

780 profile views
  1. How to work with encoder. "Beginner"

    Alright, now when i did look at it again i recognized that the interrupt task number was defined manually, just like you said. apart from that it feels like i did understand the rest correctly. Thank you very much for sharing your knowledge. Regards, Magnus
  2. How to work with encoder. "Beginner"

    Thank you, looks great! Well, let me just sum it up to make sure that i understand. And also since im new too this i have some questions :) 1. the CTBL instruction does replace the PRV. Instead of putting the encoder value into a variable it compares the value with a comparison table. 2. The first rung (0) in the main section 1 is only to put hardcoded values into the LowerLimitSPRange1, UpperLimitSPRange1 variable etc. (this can be done directly from the HMI and could then be removed?) 3. The second rung (1) sets up the variables for a comparison table for the CTBL instruction. From the LowerLimitSPRange1 to LowerLimitRange1 variable. etc, (Cant LowerLimitRange1 etc be set directly from the HMI?) 4. When you create a new interrupt task from the insert program tab, you can choose the interrupt task "number". The CTBL will execute different interrupt task "numbers" deepening on what range that fires. Example, if range1 fires its going to automatically execute interrupt task "number" 0? 5. The CTBL always uses 8 ranges when control data is set to (#1), only 2 are used so the rest has to be disabled? 6. By setting the CTBL first comparison table word to D500 the instruction will look for range 1 lower limit rightmost in D500, upper limit in D502. Since D500 is specified in the instruction, it will continue to look for the other range values in the D500 "series". In other words, by setting D500 as the operand in the CTBL instruction, the value of the D500 is used to set the range1 lower limit, but also to specify that D5 is the series to look for the other ranges values. (range2 = D505, range 3=D510 etc,) 7. The channel filter does apply to all inputs with 0.xx addresses? including the high speed counter and other inputs connected in the 0.xx? 8. These filters are normally used to prevent false input signals?
  3. How to work with encoder. "Beginner"

    Thanks for the explanation, it makes sens. I agree that a CTBL is needed for this application. If you have time to make some sample code for a CTBL instruction i would be very grateful. Meanwhile, im going to try to make it myself with the manual as reference. Again i want to thank you for all the help.
  4. How to work with encoder. "Beginner"

    So this can happen if the "scan time" is longer then what it takes for the pulses to go past the comparison window? In other words, if scan time is 20ms and and the pulse frequency is larger then 20ms, one or more pulses is not registered. Motor speed is fairly slow tho, 60 to 100 rpm
  5. How to work with encoder. "Beginner"

    "Note that you need to use two DM addresses as the comparison is long (Double Integer), so the comparison point is also long. Your HMI would then write a double integer to D0 and D2 in this example." So basically, all i have to do is to make sure that i write a Double integer from the HMI Application? And thanks for sharing the operations manual. This will help a lot.
  6. How to work with encoder. "Beginner"

    Michael, thank you very much for helping me out. Now i have refined my logic as you suggested. Se attached image below: If Sensor 1 "returns false" when position is between 120-121 degree the "fail switch" bit is set, thus canceling the motor latching. Same thing with Sensor 2 but at 280-281 degrees. This gives a window of 1 degree for the sensor to operate which is enough for my application. Now my next question is: instead of hard-coding the comparison variable i want to obtain it from a stored variable. My plan is to create a HMI to allow calibration of the machine. in other words, the possibility to change the comparison variable value through the interface. is there a simple concept for achieving this? Also, where do i find the documentation about A270 and similar. Thanks again for all the help
  7. How to work with encoder. "Beginner"

    This is what i have so far: (see attached img) So the "port specifier" is #0010 which refers to the high speed counter 0 according to the instruction help. The "control data" is #0000 which refers to the PV. The "First destination word" is D0. From what i understand the value of the encoder will be registered in that "Data register" In the settings -> Built in input tab i activated "high speed counter 0" and choose linear. Reset: Software reset. (im not sure about this one but i guess this mean that i manually have to reset the counter. this is done with the A531 in the logic.) Input setting: up/down. This will increment the value up or down depending on C or CW rotary motion. it would be really appreciated if someone could make a comment about this setup, if its right or wrong. or if i missed something. Additional question is as follows: How do i use D0 to open/close a contact at a certain value? i want to close a contact when the position is 120 degrees. 2000/360 = 5.555 5.5 * 120 = 666 So the position is 120 degrees when the pulse is 666. (The start button in the picture has the wrong address. This is now corrected)
  8. How to work with encoder. "Beginner"

    Thanks for the reply. This is the specification of my encoder: E6B2-CWZ1X https://industrial.omron.co.uk/en/products/catalogue/sensing/rotary_encoders/incremental/e6b2_c/default.html Im guessing that i should use a high speed counter since the high amount of ppr. Maybe im wrong? could i use a regular counter? still i need help to get started setting this up in the software.
  9. Hi everyone, Im completely new to PLC programming. First of all a short description of what i want to do: I have one DC motor that runs my whole "application". One revolution completes the application cycle and then its repeated. But at certain points (between 0 to 360 degree of revolution) i want to check if some requirements are met using some basic sensors. if not, the motor should stop since something is wrong. So i have this incremental encoder (2000ppr) to determine the position of the motor axis. My question: How do i set up a high speed counter in the CX-one programer software to determine the axis position (between 0 to 360 degree) I have the basic understanding of contacts, memory bits, addresses, etc. PLC: CP1L-L14 Thanks in advance. /Magnus