Jump to content
OMRON Forums

Files that are not part of the project are downloaded


gshort

Recommended Posts

 

I have noticed, what looks to me, a bug. I have two projects that have some files in common and some files different. The different ones contain duplicate definitions. For instance they have the scaling factor from motor to user units of a motor. So in one project, proj1 say I have a proj1.pmh that contains

#define Z_SCALE 100000

and in proj2 I have a proj2.pmh that contains

#define Z_SCALE 200000

 

If I open up proj2.pmh in an edit window while in the proj1 project, then I notice that proj2.pmh is downloaded into the PowerPMAC when I do a download and I will get a series of "duplicate definitions" for things like the Z_SCALE #define.

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

 

I have noticed, what looks to me, a bug. I have two projects that have some files in common and some files different. The different ones contain duplicate definitions. For instance they have the scaling factor from motor to user units of a motor. So in one project, proj1 say I have a proj1.pmh that contains

#define Z_SCALE 100000

and in proj2 I have a proj2.pmh that contains

#define Z_SCALE 200000

 

If I open up proj2.pmh in an edit window while in the proj1 project, then I notice that proj2.pmh is downloaded into the PowerPMAC when I do a download and I will get a series of "duplicate definitions" for things like the Z_SCALE #define.

I was not able to duplicate the problem. I opens Project A and then open just file from Project B and I do not see the file I opend in the editor downloaded to PMAC.

If you look at the build in the output box it will list the files used in build and download. The other way open the PP_prj.log under log folder it will also list the files which are build and downloaded. The build or download always uses the files from the project.

Thanks,

Atul

 

Link to comment
Share on other sites

I've attached a zipfile that shows the problem.

 

down1.bmp shows a screen-shot of my project that downloads correctly. down1.log is a copy from the output of the download log.

 

I then open sim.pmc which is not part of the project and contains subprogs that have duplicate names in the project. You can see this in down2.bmp. This time the download fails. Again down2.log is a copy of the download.

down1.zip

Link to comment
Share on other sites

I've attached a zipfile that shows the problem.

 

down1.bmp shows a screen-shot of my project that downloads correctly. down1.log is a copy from the output of the download log.

 

I then open sim.pmc which is not part of the project and contains subprogs that have duplicate names in the project. You can see this in down2.bmp. This time the download fails. Again down2.log is a copy of the download.

 

In the down1.log I do see three files with .ppproj extension and one of them is sim.pprpoj. So this is a valid project with sim.pmc. Now I think may be you have sim.pmc file in the project and then you open sim.pmc from another project and then you see the probelm. Can you rename the other sim.pmc to something else for the test purpose

Thanks,

Atul

 

Atul

 

Link to comment
Share on other sites

The only way that you would get duplicate definition of a #define in a project is that there is another #define with the same name in a file within the project. Have you tried to do a find in all files to see if you have duplicate definition somewhere else. If a file is open in the editor, there is no way that the file will get downloaded to the Power PMAC. If you want to send us your project, we can take a look at it and find out the issue. you can email it to me @ drog@deltatau.com or Atul @ agovande@deltatau.com.

 

Dro

 

I've attached a zipfile that shows the problem.

 

down1.bmp shows a screen-shot of my project that downloads correctly. down1.log is a copy from the output of the download log.

 

I then open sim.pmc which is not part of the project and contains subprogs that have duplicate names in the project. You can see this in down2.bmp. This time the download fails. Again down2.log is a copy of the download.

 

In the down1.log I do see three files with .ppproj extension and one of them is sim.pprpoj. So this is a valid project with sim.pmc. Now I think may be you have sim.pmc file in the project and then you open sim.pmc from another project and then you see the probelm. Can you rename the other sim.pmc to something else for the test purpose

Thanks,

Atul

 

Atul

 

 

 

Link to comment
Share on other sites

OK, I've created a couple of simple test projects that show the problem up. These are created from your new project wizard.

 

I think I know what is causing some of the problem. It is that I'm creating these two projects in the same folder hierarchy. This doesn't happen by default from the IDE. When you create a new project you always put it in a new directory. I then copied the project/solution files manually into the same directory as an original. We need to do this as we want to share files between two projects.

 

In the attached zip file there are proj1 and proj2 projects. Proj1 has a proj1.pmh which #define's TEST to 1. Proj2 has proj2.pmh which #defines TEST to 2. Now you can open each project and download them to the PMAC with no problems at all.

 

Atul, you're right and I hadn't notice that the download log will show that both .ppproj files are downloaded, but even this doesn't cause a problem.

 

The problem occurs is when you open Proj1 and then open proj2.pmh in the edit window. The download will then fail with a duplicate #define.

Proj.zip

Link to comment
Share on other sites

OK, I've created a couple of simple test projects that show the problem up. These are created from your new project wizard.

 

I think I know what is causing some of the problem. It is that I'm creating these two projects in the same folder hierarchy. This doesn't happen by default from the IDE. When you create a new project you always put it in a new directory. I then copied the project/solution files manually into the same directory as an original. We need to do this as we want to share files between two projects.

 

In the attached zip file there are proj1 and proj2 projects. Proj1 has a proj1.pmh which #define's TEST to 1. Proj2 has proj2.pmh which #defines TEST to 2. Now you can open each project and download them to the PMAC with no problems at all.

 

Atul, you're right and I hadn't notice that the download log will show that both .ppproj files are downloaded, but even this doesn't cause a problem.

 

The problem occurs is when you open Proj1 and then open proj2.pmh in the edit window. The download will then fail with a duplicate #define.

 

 

Dro was able to figure out the problem/bug you reported and the fix will be available in the service pack which will be released this week. To create the scenario it is not straight forward, the key is to have two project in one solution and then both project (.pprj)files are in the same folder refering header file with same name.

Atul

 

Link to comment
Share on other sites

I didn't find it hard to achieve :-)

 

I would have thought that it would be fairly common to want to have multiple projects that are really just variations of one another i.e. they share some amount of files in common but have some files different. This was what I was trying to achieve. I had a project that used some motors as virtual, whereas a second project, they were physical motors. It wasn't actually very easy to achieve this. When you use the IDE to create a new project, there is a checkbox that asks whether you want to create a new directory or not. Yet this seems to be ignored. It always creates the new directory, so all projects appear to be in their own hierarchy. This is not really what you want if you want to share files between projects. That's perhaps why you hadn't come across this problem.

 

Link to comment
Share on other sites

Where do you see the check box that is asking if you want to create the project in the same directory? I don't think we have such a check box. Since our IDE is built around the visual studio, we follow the same rules of the visual studio in creating new projects. Visual studio always creates the project in its own folder with the new set of project hierarchy. In visual studio you can create a new project and add files to the project as a link, in which case it does not physically copy the files to the location of the new project and this will enable you to share the files in two different projects. We do not support this feature in the IDE and I have to see if it is possible to do such a thing in the IDE. You have created a custom project that is achieving the same result and that is why you saw the extra file gets downloaded to the Power PMAC, even though it is not part of the project. As Atul mentioned, I have modified my code to accommodate this, and it will be available in the new installation, which will be released today. Please install the new release (once it is released) and let me know if it fixed your problem.

 

Thanks

Dro

I didn't find it hard to achieve :-)

 

I would have thought that it would be fairly common to want to have multiple projects that are really just variations of one another i.e. they share some amount of files in common but have some files different. This was what I was trying to achieve. I had a project that used some motors as virtual, whereas a second project, they were physical motors. It wasn't actually very easy to achieve this. When you use the IDE to create a new project, there is a checkbox that asks whether you want to create a new directory or not. Yet this seems to be ignored. It always creates the new directory, so all projects appear to be in their own hierarchy. This is not really what you want if you want to share files between projects. That's perhaps why you hadn't come across this problem.

 

 

 

Link to comment
Share on other sites

Where do you see the check box that is asking if you want to create the project in the same directory?

 

Run New->Project which brings up the New Project dialog box. In the lower centre is a check box that has the attached text of "Create directory for solution". This check box works in the sense that it creates a further sub-directory under the given solution directory, so if I create a new project called test1 and give the Location as C:\test and don't check the box, the project hierarchy is built in C:\test\test1. If I DO check the box it is created in C:\test\test1\test1.

 

However I can't create a second project called test2 and have it share some files with test1 without manually moving the project files after it has been created. It's not a huge problem, but I would have thought it not an unreasonable requirement.

 

 

newproject.bmp

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...