AngryRobot

Data from an NX102 to Excel

33 posts in this topic

Maybe I'm not understanding the problem. In both problems you are having, you say you can't get the data in separate columns. 

Are you inserting ',' or _COMMA after each member?

My example does not use headers. Mine records 16 sensors for 16 times. PMCR's example looks like exactly what you are looking for.

Share this post


Link to post
Share on other sites

Lets say that for moving the data in the csv file, I have two tasks:

1) add the headers

2) inserting the data in dedicated cells

I didn't use the ',' after the members (is this done with concat instruction?). Would this move the data inserting in one line of csv? If yes, I assume I could use a index for 6 (number of my columns in one line) and at the end the $r$l to change the line, correct?

I am a little bit confused of the way that data are saved in a file..

 

Share this post


Link to post
Share on other sites

The ',' is used to separate columns. The &r$l (Carriage Return and Line Feed) is used to start a new row. Do a search for CSV File Format.

Type the following into a text file then rename the file with *.csv extension:

Header 1, Header 2, Header 3

1, 2, 3

4, 5, 6

You should study PMCRs example. Please post questions about this example. It does exactly what you want. You could use the Concat instruction but Sysmac Studio has a AddDelimiter instruction that he used in his example. They do the same thing.

Share this post


Link to post
Share on other sites

As you suggested I checked the csv format ad found that semicolons are often used instead of commas to separate the values, in order to use the comma as the decimal separator.

So, I changed the _comma with the _semicolon and voila!

As you mentioned, this task was based on PMCR's attachment. Next task is the headers.

Thanks for the tip of csv file format ad all the assist!

I'm sure that I'll be back with further questions!!  :-D

Thanks again!

 

csv.PNG

 

Edited by man31

Share this post


Link to post
Share on other sites
27 minutes ago, man31 said:

So, I changed the _comma with the _semicolon and voila!

Nice find!

I wouldn't have thought of that as we don't use comma for decimal separator in the US.

Share this post


Link to post
Share on other sites

Well the article mentioned that semicolons are used instead of commas because in EU we use commas for decimal separator.

What a headache.. :doh:

Share this post


Link to post
Share on other sites

Hi IO_Rack Automation Specialist,

I have a look your SD_Card_Write_Example.smc2

Your data is to convert to String format that is not able to do graphs for production reports.

My issue is that:

Omron Function block FileWrite can only produce one big row of data, via csv file, as per this ascii format

ÿ»ÿÿÿÿÿÿÿÿÿÿÿÌÌÌÿîÌÌ»ÌÌÿÿÿÿÿ""ÿ"»"Ì""ÿ"»"Ì"+<M"    ---> can not do report via this format.

I can not produce 

Row 1 = 123

Row 2 = 10

Row 3 = 30

and etc.

to allow doing Reports.

FileWrite can take all data type including integers, real, Time, Date 

Hope you can help to display meaningful data 123, 10, 30 for each row.

Meaningful data is to allow to plot graphs for production reports.

many thanks

Regards

Desmond 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

The collected data is about 10k to 20k Tags via Array that are in Double integer, integer, date & time, Real

For example:

Tag1 [0..700]

Tag2 [0..700]
Tag3 [0..700]

and etc.

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now