You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old August 28th, 2007, 08:07 AM   #1
Michael Bell
Member
United Kingdom

Michael Bell is offline
 
Join Date: Mar 2004
Location: Washington England
Posts: 96
Mitsubishi GX IEC Developer FEND. END Instructions

Hi all,
I have come across this problem when trying to use a CALL, Pointer and RET in GX IEC DEV. The PLC is an FX3U. The program consists of a number of POU's. I am trying to use a subroutine in one of them. If I write the code and compile it seems ok. However when I download to the PLC I get an error 'RET Instruction not found, even though one exists.
I have uploaded the ladder into GX Dev, and I can see the FEND and it is immediately before the END instruction, I have no control over this.This means that the FEND is after the pointer to the subroutine, which is incorrect.
I have no idea what is happening!
Any ideas, thanks.
  Reply With Quote
Old August 28th, 2007, 01:18 PM   #2
parky
Member
United Kingdom

parky is offline
 
Join Date: Oct 2004
Location: Midlands
Posts: 950
You should't need to do this, in IEc you create a function block something like test, give it input/output parameters etc. then call the function in one of your other programs as many times as you like (note you can call them the same instance or individual instances the latter will put calls to seperate routines) this will automaticaly compile the code as a subroutine.
in reality all it does is:
a x0
= m2000 (temp variable)
a x1
= M2001 (temp Var)
call P1 jump to sub
a m2003 temp var
= y 0

....
fend
P1:
do the code
a M2000
a M2001
= M2003
ret
End
You should not have any need to jump to subs as these are really functions you can create just like siemens.

Last edited by parky; August 28th, 2007 at 01:20 PM.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Mitsubishi GX Developer V8.25B & Dell Latitude ATG D620 help. eniltrah LIVE PLC Questions And Answers 5 April 4th, 2011 02:07 AM
Mitsubishi GX IEC Developer Potter LIVE PLC Questions And Answers 0 February 26th, 2007 09:43 AM
GX IEC Developer 6.01, Q-Series, Mitsubishi marvin LIVE PLC Questions And Answers 0 February 4th, 2005 04:29 AM
GX Developer 8 - GX IEC Developer jim5 LIVE PLC Questions And Answers 1 November 28th, 2004 04:50 AM
mitsubishi gx iec developer big belgium bert LIVE PLC Questions And Answers 1 June 1st, 2004 02:50 PM


All times are GMT -5. The time now is 12:00 AM.


.