AkumaShi Posted December 21, 2018 Report Posted December 21, 2018 I am pretty new to Automation Direct. This is my first project programming in Direct Soft 6. Is there a way to make subroutines?
NevergoldMel Posted December 22, 2018 Report Posted December 22, 2018 Yes, but it's been 5 years since anyone made me use DirectLogic PLCs. I found it in the user manual on the CD. If I remember correctly they did not call them subroutines but that's the way it worked.
b_carlton Posted December 22, 2018 Report Posted December 22, 2018 (edited) The subroutines are written after the main code - after the first END instruction. Each subroutine begins with a SBR box in the left rail. It is identified by a constant (eg K1) and that constant is used in the calling GTS in the main part of the program (no nicknames). The subroutine is ended with a no conditioned RT command in the output column. If you need a conditioned return (RTC) that is allowed before the RT rung but the RT rung must exist. No parameters are passed in the JSR or the RT. Edited December 22, 2018 by b_carlton 1
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