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.

New Here? Please read this important info!!!


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

Reply
 
Thread Tools Display Modes
Old November 24th, 2022, 02:29 PM   #1
Hann
Member
New Zealand

Hann is offline
 
Join Date: Nov 2022
Location: New Zealand
Posts: 16
Omron CX-Programmer Call Ladder Instructions from Structured Text

Is there a way in CX-Programmer to call Ladder Instructions from a structured text program?

I can see several functions in the autocomplete


However, I also see many missing functions that are available in Ladder. e.g. BSET



Is there a syntax I am missing to call these Instructions?

Possible solutions:
- Wrap the Instruction in a function block then call the function block once an instance has been made
  Reply With Quote
Old November 25th, 2022, 02:20 AM   #2
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 4,783
There are a number of instructions that are not availlable in ST on many platforms, normally the help file will show both FDB/LAD & if the function (instruction) is availlable in ST. something like setting a bank of registers/bits can easily be done in a for next loop that is probably what the function does anyway when compiled. I think as ST is supposed to be transportable code between different brands functions that are sort of unique to a particular brand are not supported, although that particular instruction is common among brands it is probably just the naming & operational convention that differs.
In other words, a function called Block_Set in one IDE (move a value from source to a range of destinations) might be called BFILL in another, this makes ST a problem for compatability so perhaps that is why the instruction set (functions ) are limited but PLC manufacturers for compatibility with existing systems have their own way or convention.
I think it would depend on the platform.
No idea about CX but in ones I use, when you create a function block say in FBD or LAD, it becomes one of the function blocks in the tree, Then in your ST program click on the FB, drag it to the ST & it gives you the structure then you replace the text in black.
Attached Images
File Type: png Calling FB in ST.png (107.2 KB, 42 views)
  Reply With Quote
Old November 27th, 2022, 02:11 PM   #3
Hann
Member
New Zealand

Hann is offline
 
Join Date: Nov 2022
Location: New Zealand
Posts: 16
@parky
That makes sense. I suppose at this stage I was just wanting to see what was possible in ST. I have not yet been able to find a list of all the available functions, unless the screen sot that I showed is all that is available. For the sake of simplicity, I have used a for loop as you suggested.
  Reply With Quote
Old November 28th, 2022, 02:12 AM   #4
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 4,783
Yes there are some oddities, In my IDE when I press the first letter of a function I want i.e. A, then it only shows a list of operands with A, I would have thought that the list would carry on to B, C etc. but it does not, also in my IDE, on LAD/FBD the function For Next is diffetent i.e. if I'm on an ST block it does not show the For/Next, ST is FOR, DO END_FOR so it does appear that the FOR NEXT function in my IDE is not supported in ST only in ladder/FBD, whereas the FOR/DO END_FOR is.
Attached Images
File Type: png For Next.png (45.1 KB, 13 views)
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


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
Logix5000/Designer Call AOI from Structured Text Routine AMarks95 LIVE PLC Questions And Answers 1 March 25th, 2022 12:33 PM
Code execution sequence of Structured Text vs Ladder Logic extendedSolutions LIVE PLC Questions And Answers 12 June 17th, 2016 05:47 PM
Omron cx programmer keep T Gibbs LIVE PLC Questions And Answers 4 December 17th, 2012 05:54 PM
Omron Cx Programmer question tadams73 LIVE PLC Questions And Answers 2 August 26th, 2009 08:01 AM
Omron CX Programmer slow screen update while online 69FIREBIRD LIVE PLC Questions And Answers 7 May 8th, 2009 03:39 AM


All times are GMT -4. The time now is 12:04 AM.


.