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.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


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

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old October 16th, 2012, 09:07 AM   #1
electro89
Member
Canada

electro89 is offline
 
Join Date: Mar 2012
Location: Niagara Falls
Posts: 68
Using structures in CoDeSys v2.3

I'm very new to Structured Text and dealing with user-defined data types. I've looked online and on the codesys manual, and from what i've read, it seems like this should work:

TYPE HistoryArr :
STRUCT
BaseRequested:REAL;
BaseActual:REAL;
AngleRequested:REAL;
AngleActual:REAL;
DateAndTime: DT;
END_STRUCT
END_TYPE

This is typed in the POU.
Codesys wants me to declare HistoryArr.. What type would I declare this as? eg. WORD, INT, etc
  Reply With Quote
Old October 16th, 2012, 10:15 AM   #2
Noli2
Member
Belgium

Noli2 is offline
 
Join Date: Jun 2012
Location: Belgium
Posts: 56
You should not put it in the POU, but in 'Data types'. Look at the bottom left, there are 4 tabs there.
  Reply With Quote
Old October 16th, 2012, 02:28 PM   #3
electro89
Member
Canada

electro89 is offline
 
Join Date: Mar 2012
Location: Niagara Falls
Posts: 68
thank you!
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


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
Creating a trend file in wago 741-840 using CoDeSys v2.3 electro89 LIVE PLC Questions And Answers 0 October 12th, 2012 01:04 PM
How to download PLC program by using Codesys V2.3 Yuki_Jun LIVE PLC Questions And Answers 4 August 28th, 2012 01:18 AM
NA daylight savings time - Codesys v2.3 electro89 LIVE PLC Questions And Answers 10 April 10th, 2012 09:27 AM
Communication Codesys V2.3 and V3 usin CANopen Cuno61 LIVE PLC Questions And Answers 5 March 28th, 2012 04:00 AM
codesys V2.3 with FactoryTalk (OPC server) Silence89e LIVE PLC Questions And Answers 11 September 17th, 2011 09:50 AM


All times are GMT -5. The time now is 12:34 PM.


.