RET function on a mitsubishi fx-0

onjoes

Member
Join Date
Dec 2005
Location
Trondheim
Posts
4
Hello
I have doing some sequenseprogramming, but in my last line with RET (return) - i recive error when compiling the program.
I have done this STL programming-examples directy from a fx-programming manual. But the GX wont accept the RET function.
What am I doing wrong ???
 
BTalbot said:
Enter the RET as its own line not "branched" off of the line above it (as it looks in the example) then try compiling it

Thanks for answering !

If I put the RET in its own line (plane line to output RET)at the end of program the compiling is done ok, but when i transfer this... the plc get programerror (flashing). a simple programexample is as follows in my book :

0- ld x0
1- set s20
2- stl s20
3- out y1
5- ret
end

(this is not possible to compile)

I have tried to place this RET in all the possible ways i can think of, but still compiling-problem.

must I punish my pc or the plc...???

I have an fx0n

best regards
 
onjoes said:
Thanks for answering !

If I put the RET in its own line (plane line to output RET)at the end of program the compiling is done ok, but when i transfer this... the plc get programerror (flashing). a simple programexample is as follows in my book :

0- ld x0
1- set s20
2- stl s20
3- out y1
5- ret
end

(this is not possible to compile)

I have tried to place this RET in all the possible ways i can think of, but still compiling-problem.

must I punish my pc or the plc...???

I have an fx0n

best regards
I just used your code in both Medoc 2.3 and GX-Developer 8.12N and downloaded into an FXos (don't have a FXon around) and I have no problem.
🔨
 
thanks anyway !
I tried out the FEND function also and Tried programming both this functions for an fx2.. Did not work either. I will try out with medoc 2.41 - last chance !
 
Not sure what other code you have but for a RET you must have a jump to the location, then have FEND (as end of main sequence) then at the end of the subs a END.
If you use GXIEC & create a function, call it in main then upload in GX or medoc you will see the actual code
 
Hmmm.....
did not work with medoc 2.41 either. Must be programming wrong, but my mitsubihi training-book have several examples, and none of them works.
If some could be so kind to e-mail me an short testexample-file made in the gx-explorer. e-mail [email protected]

Thanks in Advance
 

Similar Topics

Hi everyone, I have a series of 8 or 9 subroutines that are not in the main program file (File 2)..they are all consecutively placed in Ladder 11...
Replies
8
Views
397
I'm looking for a way to use the Audit Value for the controller to detect changes made programmatically. This link lays it out pretty cleary (page...
Replies
7
Views
2,685
I am looking at the source code for a very old project and I noticed that the programmer added a RET instruction without any parameters to the end...
Replies
7
Views
2,664
On site and another Programmer is getting a Major Fault when downloading code that I gave him to interface withour machines. I have JSRs that...
Replies
3
Views
879
Posted just because it's has an Allen Bradley keyed selector switch https://www.youtube.com/watch?v=YeFevEGoPF0 LockPickingLawyer
Replies
6
Views
2,716
Back
Top Bottom