GX Works 2- ST Function Block call in Ladder Program

Tayyip

Member
Join Date
Oct 2022
Location
Kocaeli
Posts
4
Hi, I'm learning GX Works 2 for upcoming project. I want to use ST Function Blocks in Ladder Program and it works if the FB(Structured text) doesn't include TON. But when I add the TON to the FB(structured Text), it gives this error
"The function block that is not use macrocode is used by function block of call destination. C5119". How can I solve this problem, or any other advise.

And also it works when I call the FB inside ST program.

" I think I couln't add images properly, link is below"
https://ibb.co/VgSjJMY
https://ibb.co/NnFcrDs

VgSjJMY

NnFcrDs
 
Last edited:
Hi, I'm learning GX Works 2 for upcoming project. I want to use ST Function Blocks in Ladder Program and it works if the FB(Structured text) doesn't include TON. But when I add the TON to the FB(structured Text), it gives this error
"The function block that is not use macrocode is used by function block of call destination. C5119". How can I solve this problem, or any other advise.

And also it works when I call the FB inside ST program.

" I think I couln't add images properly, link is below"
https://ibb.co/VgSjJMY
https://ibb.co/NnFcrDs

VgSjJMY

NnFcrDs

:mad:
I thing I solved the problem, "Structured Ladder" should be choosen for this kind of applications. Standart Ladder program will give error in this situation.
 
Hi Parky, thanks for reply although question was little silly. (y)

I want to create my project based on PackML for standardization purpose like my other projects but I couldn't find PackML base project for GxWorks2 on the internet.

Do you know any download link for GxWorks 2 PackML project?
 
Here is one for the english site, you will need to have an account, not sure if the packml is free but you do need to be registered to download it. perhaps there are other global sites you could look at.

https://gb.mitsubishielectric.com/fa/support#quicksearch

just do a search for packml on the above.
Just for your info, in the Melsec folder in your program files there are some sample comments I think there are about 8, these seem to sample projects for GXDeveloper, they contain some comments for the standard memory i.e. first scan, clock & system data registers, only looked at a couple but one I opended up was for FX this contained the system symbols you could copy & paste them into a blank project, I did once import the standard symbols on an FX but that was a few years ago, since upgrading the Mitsubishi software it does not work so somewhere I have a program with imported standard symbols but this was for Q series.
To be honest, packml is just a standard, although it appears some PLC manufacturers seem to have some code for implementing it, you just desing your code based on the standard. S88 was the same, it was a standard but few people actually knew about it although many programmed to the same standard. You will probably find that any code that Mitsubishi have produced is just a way of structuring your code to the standard, I doubt it is free, I cannot log on to my old account with Mitsubishi as I'm now retired so do not have a company e-mail.
 

Similar Topics

I figured out a solution to a vfd issue... at least in theory. Yaskawa has a program called Drive Works EZ that you can have PLC-type functions...
Replies
15
Views
3,855
Is it possible to create your own function block library with GX Works 3? I can create a FB but how do you save it for re use in other projects...
Replies
0
Views
4,693
We are working on a machine that has a Yaskawa controller (MP2300siec) and servos. We were provided a copy of the source code and went ahead...
Replies
2
Views
2,568
Hi Folks I have made a function block that has the EN input enabled. (FBD language) In want to run some code at the top of the function block as...
Replies
9
Views
1,735
I have the current program created as a simple project with lots of ladder programming. I guess you cannot create FB's in a simple project. Is...
Replies
1
Views
2,017
Back
Top Bottom