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 have an expression in a structured text routine of a Logix controller that looks more or less like the following: ResultInteger := Integer1 *...
Replies
12
Views
261
Good evening. I display the step number of a SFC on a display. Sometimes, on a trip, it goes quickly through many steps and I need to prove to...
Replies
1
Views
100
I am trying to set up a piece of equipment with a Horner HE-X4R. I'd like to use structured text and so far I'm just trying to get a basic On/off...
Replies
0
Views
55
Good morning. I'm doing a rehab and I need to recycle some part of the old code that won't change and that I need. This is a calculation that...
Replies
22
Views
1,324
I'm writing some structured text that's handling a data structure that comes from a PC. The PC structure is in the "new" LREAL 64-bit floating...
Replies
3
Views
474
Back
Top Bottom