Structured Text

Dera bsee

Member
Join Date
Sep 2012
Location
Los Angeles
Posts
36
Hi All,

I've used st here and there but have never had a problem like it and can't seem to figure out what i did wrong. Here's the script.

Target_Point[0] := ( Xco * Pco * 0.25 * (5700-CR)) + (Xm * Pm * 0.75 * (5700 - CR)) + ( CR * Protein_Cream);

and yes I've created all tag names for the abbreviations and so forth. Is my synthax wrong? To long to compute? Please help and thank you!!! :unsure:
 
That's a good catch V0N. It's been a while, but I believe that in Codesys you have to explicitly change the datatypes. For example, you may need some "DINT_TO_REAL()" or "REAL_TO_DINT()" functions in there (or something along those lines).

I would recommend that you post the exact error as well as your variable declarations.
 

Similar Topics

I´ve being trying wrap head around FOR loops.. When and what can this be used for? I´ve mostly seen it move data, resettting arrays etc. I made a...
Replies
13
Views
413
Hi! When is CASE preffered? CASE uses a numreric variable for the cases and doesnt handle BOOL, but this can be done with numreric and bool using...
Replies
4
Views
178
Hello, doing switch from FBD to ST. First task is converting my old work. How do you sum variables? For example, Interlock1, interlocl2 and...
Replies
5
Views
225
Hello, I am using studio 5000 pro and am trying to figure out the structured text. Here's my scenario: An operator scans a barcode, the barcode...
Replies
15
Views
395
I have an expression in a structured text routine of a Logix controller that looks more or less like the following: ResultInteger := Integer1 *...
Replies
13
Views
504
Back
Top Bottom