Areeb Posted August 21, 2020 Report Posted August 21, 2020 Hi Everyone. Hope u all are fine. Firstly I will let u know the my program details. The picture that is attached below is a part of my machine Q series PLC Program. It detects left and right tape of the product. Sensor X50C is attached in front of left tape and sensor X50D is attached in front of right tape. The program works in a way that it check the both left and right tape in one whole scan of the program. if during the scan if the tape is not present it will high B1170 bit otherwise it will reset D12286 and B1170 will reaming in low state. The Problem i am facing is that sometimes it did not work correctly and misses the tape maybe can`t detect withing one complete scan of the program so I wanted to know is there any other technique by which i can modify this program and make this program simple and easy without involving the scan time period.
Gambit Posted August 21, 2020 Report Posted August 21, 2020 Well there are a few things to consider. Firstly is the input. By default it has a 10ms delay time which means it needs to be active for 10ms before it will be seen as high... You can change this time in the I/O assigment settings Second is that that you are using the normal X whcih means the detected X at the start of the scan. If you want to use the current status define the input as DX50C. Third the program logig depends on when it's run so if your scantime is 100ms. It is only checked every 100ms. You can create an interrupt program which can tun every ..ms. Ixx check your PLC parameters for the timing. If you're going to use an interrupt program. Do not forget to program the EI (enable interrupt) instruction in the normal scanned program. 1
Areeb Posted August 22, 2020 Author Report Posted August 22, 2020 (edited) HI @Gambit. Can u tell me if I use interrupt program so how it will detect when there is no tape present in anyone of the sensor. As in current program the tape passes in front of the sensor and sensor will high then low then it again high and low in every scan of the program so in anyone of the scan if the sensor not goes to high state it will consider as there is no tape in current scan and it will high B1170 bit so rejection may occur. Plz tell how to program this logic using interrupt program. Thanks & Regards M.Areeb Edited August 22, 2020 by Areeb
Areeb Posted August 22, 2020 Author Report Posted August 22, 2020 And plz also tell me what if I decrease the time below 10ms. and kindly see the below snapshots. what is it the correct place for changing the time ? PLC SYSTEM or I/O Response time ?
Gambit Posted August 24, 2020 Report Posted August 24, 2020 (edited) The program is exactly the same. Make a new program file in GX Works 2 and place this in a WAIT scan Just put the interrupt number in front. Put a D before the X and Y so the current status is checked. end the Routine with IRET The speed of the interrupt you can define in your parameters. (So use I28 - I31 and not I40 as set above) In your normal Scan program you have to define EI.. Edited August 24, 2020 by Gambit
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now