Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

building a text file in rs logix 5000

Status
Not open for further replies.

plcjunior

Electrical
Dec 8, 2005
14
I have an application where i need to create a text file to send to a servo drive. I am using a control logix plc to do this application and i am using rs logix 5000 program software as well. Is there a way of creating a text file inside of rs logix 5000. to give an example:

using ladder logic, to move data to this to text file i want to create and then be able to send this text file through my ascii port to the servo drive.

any help would be appreciated!!
thanks
 
Replies continue below

Recommended for you

I had an application where I had to create strings in the RLL. I used Structured Text to create contants, my tag names were the letter preceeded by an underscore.

_A := 65;
_B := 66;
_C := 67;
etc

Some specials I needed were.
STX := 2;
ETX := 3;
CR := 13;

I wrote an ST routine that would concatenete strings together.

I also set up several strings that I needed specifically for the device, the example below requests status from the device <STX>S010<ETX>.

The tag structure for those would be like this;

sGetStatus.Data[0] := STX;
sGetStatus.Data[1] := _S;
sGetStatus.Data[2] := _0;
sGetStatus.Data[3] := _1;
sGetStatus.Data[4] := _0;
sGetStatus.Data[5] := ETX;
sGetStatus.LEN := 6;

Everything I did could have been done in ladder, but ST programming made it easier to read, and keeps the code protected from thos who shouldn't change it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor