|
I'm working on a project with a GE 90-30 series PLC using Proficy. When programming in instruction list, is it possible to not power math elements? For example, right now I may want to add two numbers together based on whether a contact is open or closed. The only way I've found to do this is by using JMPC statements, which are messy. In ladder logic I would just no power the rung. How can I do this with instruction list? Thanks. |
|
The short answer is no, you have to use JMPC statements. This is because GE's instruction list is just assembly language, and I doubt that processor has conditional execution of individual instructions. However, there's no reason that a math function can't have an extra Enable parameter. In fact that's usually how an IEC-61131-3 compliant runtime implements math ladder logic instructions (i.e. every ladder instruction is a function where the first parameter is a boolean Enable input). So you can usually call these ladder logic functions from instruction list, and you can set the EN input to condition the execution. I just don't know if you can access the ladder logic math functions from instruction list in a GE controller... sorry! If you could, that would solve your problem. Try using the standard GE function call syntax in your instruction list, and use the Ladder math function names. Looking at this manual, according to page 5-12:
and
However, I find it interesting that on page 5-13, it says:
...since LD_BOOL is an instruction list instruction that loads a BOOL into the accumulator before calling the function block. Sounds to me like that's the Enable parameter I was talking about above. If all else fails, it looks like you can write your own "blocks" a.k.a. subroutines, so you could wrap the math function you want into another subroutine that also takes an Enable input as a parameter. 2
Thanks for your reply. I'll gladly upvote you when I get the required rep. It sounds like I'm just out of luck. The part about user defined function blocks doesn't apply to my 90-30 PLC (your manual link is for a Versamax PLC). Some elements do seem to consider the BOOL accumulator, like counters and timers, but it seems the only way to skip the other function blocks (like math, data move, and everything else) is by JMPC and JMPCN statements. It's disappointing that ladder logic is given much more power than lowly instruction list. It just seems like computer science left PLCs behind.
(Jul 29 '10 at 22:03)
Timmy
@Timmy: Well, instruction list really is assembly language. However, structured text language has more of the options you're looking for, but it seems like the 90-30 doesn't have structured text, is that right? Most IEC-61131-3 compliant PLCs should have it.
(Jul 30 '10 at 10:04)
Scott Whitlock ♦♦
Yes, the PLC I'm working with supports only ld and il. I've worked with structured text a few times before. It's my current preference. Then again, even if structured text were available, it wouldn't be much use without user defined functions. I think I'm just going to try to avoid doing anything complicated with 90-30s in the future. Or maybe any GE Fanuc system. Haha. Thanks again for your help.
(Jul 30 '10 at 22:30)
Timmy
|


