Help - Search - Members - Calendar
Full Version: data conversion
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
mos89
Hi

I am using a compactlogix 1769L32E with a PROFACE panel view, to communicate with the panel view i am using SLC/PLC Message

all this is ok, but i want to log some data on a compact flash on the proface in CSV format.

I didn't find out how to convert REAL to ascii with my proface script, so i wanted to convert these data on the PLC via RTOS function, but after how to transfert my string?

i would like to copy the string data ascii code in a Dint, but how to do it? any idea ?

Nathan
I would recommend that you look harder for a type casting function in your Proface scripting. If you provide more detail about the scripting language and/or links to their documentation, I'll take a look for you.

As far as data conversion in the PLC - each ASCII character is an 8 bit word, which, I'm sure could be converted to INTs. However, this strikes me as a knarly approach. They have got to have a better builtin way to accomplish your task. It may be a matter of refining how you phrase your question.

QUOTE(mos89 @ Nov 7 2007, 10:05 AM) [snapback]61331[/snapback]

Hi

I am using a compactlogix 1769L32E with a PROFACE panel view, to communicate with the panel view i am using SLC/PLC Message

all this is ok, but i want to log some data on a compact flash on the proface in CSV format.

I didn't find out how to convert REAL to ascii with my proface script, so i wanted to convert these data on the PLC via RTOS function, but after how to transfert my string?

i would like to copy the string data ascii code in a Dint, but how to do it? any idea ?

mos89

here is the documentation,

I want to log few real data in a file on CF,

like time, date, datareal 1, datareal 2, datareal 3, datareal 4,etc..

from now i use:
CPS (string,DINT,Length);
SWPB(DINT,REVERSE,DINT);
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.