AngryRobot

Data from an NX102 to Excel

7 posts in this topic

What is the best way to get data from an NX102 (or any NJ/NX PLC) into Excel?  I've been experimenting with some OPC UA options, but so far the only clients I've been able to connect with don't allow exporting of data.  Does Omron have any sort of ODBA connection?

Share this post


Link to post
Share on other sites

Write a .csv file onto the SD card and then use FTP to get it off the card.  That is one pretty easy way.  

Share this post


Link to post
Share on other sites

I've used the NJ models with SQL capabilities before, but this machine doesn't normally require data logging.  We are wanting to do an in-house run off on the machine and log some of the test results to prove its reputability when our customer shows up; and I figure logging it right from the PLC will be easier than sitting at the machine and manually recording every number by hand then transcribing it into Excel.

So FTP it is.

Share this post


Link to post
Share on other sites

Posted (edited)

Any tips on how to write data to the CSV file?  I have an array of REAL numbers.  I can create and close the file just fine, but the data that gets written is just junk characters.  Do I need to convert the data to string?

 

EDIT: Converting to string and concatenating a ',' worked.

Edited by AngryRobot
1 person likes this

Share this post


Link to post
Share on other sites

This may be slightly more complex than what you are looking for but here is what I have. This will write a CSV file populated from a 2 dimensional array of REALs (16x16). In this particular example, the "Unit_Str" is specific to our application. I also run it twice with the "Light_Check_SeqStep_xx_Active" sequence step bits but only once is necessary. I copied this code over from a working program but I haven't tested this one.

SD_Card_Write_Example.smc2

1 person likes this

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