Luka0204

Excel import

5 posts in this topic

Hi,

i have excel file with 2 columns and cc 300 rows (saturation curve). How to import excel file in GX works 3 (R04CPU) and use data as two array variables [0..300]?

I want to avoid manual writing around 600 values.

Thanks

 

Share this post


Link to post
Share on other sites

Hi Luka.

My first guess would be to use some sort of OPC Server. I believe "MX-Component or MX-Sheet" might be of use to you for this sort of thing.

Just having a quick google of the above confirms this is most likely the best way to go about this.

What sort of data are you populating in this array (INT, DINT, REALs?), depending on the OPC Server you may have to create a structure in your Globals and assign Mitsubishi Addresses

Regards

Daniel

Edited by collinsd70

Share this post


Link to post
Share on other sites

Right mouse click on your variable list in GX works 3 will give you an import and export option.
But If you're are going to make an array than it just two entries

 

Array.JPG

Share this post


Link to post
Share on other sites
1 hour ago, Gambit said:

Right mouse click on your variable list in GX works 3 will give you an import and export option.
But If you're are going to make an array than it just two entries

 

Array.JPG

Problem is that I need to have an array of 300 constants (real numbers). I can program 300 times like this: DataArr_1[0]:=0.1; DataArr_1[1]:=0.5 etc, but that's not an aim. Another solution is that I copy all data from excel in Device Memory then write on PLC.

 

Share this post


Link to post
Share on other sites

As you already mentioned I would use the the device memory to send the Data.

And create a Dut or Array in the global list

 


 

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