RS 5000: Use OneShotRising in ST?

theColonel26

Lifetime Supporting Member
Join Date
Feb 2014
Location
West Michigan
Posts
785
I am using RS 5000 v30. I am trying to use the OSRI AOI to detect a Rising Edge.


OSR_EnableACC is of Type FBD_ONESHOT


EnableACC is what I want to detect the Rising Edge on.



Here is my Code
Code:
OSR_EnableACC.InputBit = EnableACC;

OSRI(OSR_EnableACC);

IF OSR_EnableACC.OutputBit Then
    //Do Somthing
END_IF;
I am getting a
Error: Line 1, ';': Unexpected.

2020-03-09_10-40-54.png
 
I'm not well versed on Rockwell's structured text, but if it follows IEC61131 then you need to use := as the assignment operator.

Code:
OSR_EnableACC.InputBit := EnableACC;
 
I'm not well versed on Rockwell's structured text, but if it follows IEC61131 then you need to use := as the assignment operator.

Code:
OSR_EnableACC.InputBit := EnableACC;
šŸ™ƒ that was the problem. It's been awhile since I used ST.


I forgot about it's weird PASCAL like syntax.


Thanks :)
 
Curious - why not DIY:

Code:
if (condition & not OneShot) then
   // do something
end_if;
OneShot := condition;
 
Curious - why not DIY:

Code:
if (condition & not OneShot) then
   // do something
end_if;
OneShot := condition;


Well I have done that in the past, and might still do it. But I am trying to reinvent the wheel less.


AB doesn't have plain User Defined Functions does it? Just FBs aka AOIs.


I'm gonna start a new thread about Functions.
 
Last edited:

Similar Topics

Hello all, I am currently facing a problem with a Pro-Face HMI PS5000 project file download. I have tried using GP-ProEX SP1 (4.09.350) and...
Replies
0
Views
33
I recently did a program conversion from logix 500 to studio 5000 and when machine runs it depends on two ton instructions to keep the machine in...
Replies
17
Views
383
Hello, I am trying to read a barcode scanner input using a cognex dataman 280 barcode reader, store it another string, the compare with another...
Replies
1
Views
68
Hello. Why is my RSLogix 5000 start in grace period mode, even though I have a valid license? I also think I have a decently recent FT Activation...
Replies
3
Views
144
Back
Top Bottom