Sign in to follow this  
Followers 0
sid

Plsy instruction output

6 posts in this topic

I am using plsy instruction in my application as follows M/c start ------||-------[plsy d36 d38 y0]-- D36 register recieves value from 0 to 5000 from external pot(interfaced to analog input) where as d38 is always kept 0 for speed operation of servo. Whenever i turns my pot to zero(i.e d36 becomes 0) and then to higher value(say d36=200) my plsy instruction doesn't work(i.e no output at y0). However when i switch off my machine start signal and again on everything works fine. What's the problem?

Share this post


Link to post
Share on other sites
The instruction executes once whilst it is energized. You need to de-energize it or reset M8029.

Share this post


Link to post
Share on other sites
Absolutely wrong. The instruction is executed as long as the condition is true and does not set M8029 in continuous mode. Also, M8029 is actually a read-only flag and not subject to user reset. The reason of the problem described is that the instruction has the lower frequency limit and falls into error when the frequency parameter D36 becomes below 10Hz. After returning parameters into the valid range the instruction must be reactiveted to reset it's error status. Add >= D36 K10 to the rung conditions (the lower limit K10 may be K20 for some PLC models). Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
You are right. I have misinterpreted what the manual said. Also, it seems as if the range for 16 bit operation is 1 to 32767; and for 32 bit operation is 1 to 2 147 483 647. Anyway, I am including the text for others perusal. a) FX1S/FX1N users may use frequencies of 1 to 32,767Hz (16-bit operation) and 1 to 100kHz (32-bit operation). FX2N/FX2NC users may use frequencies of 2 to 20kHz. b) The maximum number of pulses: 16 bit operation: 1 to 32,767 pulses, 32 bit operation: 1 to 2,147,483,647 pulses. Note: special auxiliary coil M8029 is turned ON when the specified number of pulses has been completed. The pulse count and completion flag (M8029) are reset when the PLSY instruction is de-energized. If “0" (zero) is specified the PLSY instruction will continue generating pulses for as long as the instruction is energized. c) A single pulse is described as having a 50% duty cycle. This means it is ON for 50% of the pulse and consequently OFF for the remaining 50% of the pulse. The actual output is controlled by interrupt handling, i.e. the output cycle is NOT affected by the scan time of the program. d) The data in operands S1 and S2 may be changed during execution. However, the new data in S2 will not become effective until the current operation has been completed, i.e. the instruction has been reset by removal of the drive contact. e) Two FNC 57 (PLSY) can be used at the same time in a program to output pulses to Y000 and Y001 respectively. Or, only one FNC 57 PLSY and one FNC 59 PLSR can be used together in the active program at once, again outputting independent pulses to Y000 and Y001. It is possible to use subroutines or other such programming techniques to isolate different instances of this instructions. In this case, the current instruction must be deactivated before changing to the new instance. f) Because of the nature of the high speed output, transistor output units should be used with this instruction. Relay outputs will suffer from a greatly reduced life and will cause false outputs to occur due to the mechanical ‘bounce’ of the contacts. To ensure a ‘clean’ output signal when using transistor units, the load current should be 200mA or higher with the FX2N Series. The load current should be 10 - 100mA with the FX1S/1N Series. It may be found that ‘pull up’ resistors will be required. g) FX2N and FX2NC units can use the HSZ (FNC 55) instruction with the PLSY instruction when source device S1 is set to D8132. Please see page 5-59 for more details. h) FX2N and FX2NC units can monitor the number of pulses output to Y0 using devices D8140 and D8141, and the number of output pulses output to Y1 using devices D8142 and D8143. The total number of pulses output can be monitored using D8136 and D8137. Regards, Wayne

Share this post


Link to post
Share on other sites
Wayne "e) Two FNC 57 (PLSY) can be used at the same time in a program to output pulses to Y000 and Y001 respectively. Or, only one FNC 57 PLSY and one FNC 59 PLSR can be used together in the active program at once, again outputting independent pulses to Y000 and Y001. It is possible to use subroutines or other such programming techniques to isolate different instances of this instructions. In this case, the current instruction must be deactivated before changing to the new instance." How do you deactivate the current instruction? I need to use the PLSY instruction in more than one part of the main program, and I've seen programs with the instruction in more than one time in the main program, but can do the same thing in a new program in the same PLC. What im doing wrong to use 2 or 3 times the PLSY with different values in different steps?

Share this post


Link to post
Share on other sites
You can code it more than once, but only one pulse output command can be active at any one time on any one pulse output address. You can't have 2 commands trying to write pulses to the same output at the same time.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0