xiandu Posted July 15, 2011 Share Posted July 15, 2011 Hi folks, I need your help with downloading and running a pmc file from my host PC to PMAC. I do programming in VC++ 2005. I cannot run the .pmc file using my C++ code. I tried the function Download() in VC++ as 'pmacDevice.Download(dwDevice,"MOTIONPROG1.pmc", bMacro,bMap,bLog,bDnld,&pbDriverOpen);' I attach the messages that I obtained in the UI of PEWIN32PRO2. I obtain the messages above the blue line when I download and run the 'MOTION PROG1.pmc' within Pewin32Pro2, and obtain the messages below the blue line when I try pmacDevice.Download(dwDevice,"MOTIONPROG1.pmc", bMacro,bMap,bLog,bDnld,&pbDriverOpen). It looks like I did not download MOTIONPROG1.pmc into buffer. When I use '&1b1r', I was running the previous downloaded 'MOTION PROG1.pmc' in buffer. pmcDownloadinfo.PDF Link to comment Share on other sites More sharing options...
Sina.Sattari Posted July 15, 2011 Share Posted July 15, 2011 Xiandu, Just to be sure; If you download the file through PEWIN32PRO2 does it get loaded to PMAC memory? Can you run the new programmed profile? Do you have a CLEAR after opening the motion program buffer? Regards, Link to comment Share on other sites More sharing options...
xiandu Posted July 16, 2011 Author Share Posted July 16, 2011 Sina, Thanks. When I download the file within PEWIN32PRO2, it is loaded to buffer and can be run using 'b1r'. I am also sure that i can run the new programmed profile. For example, I have two programs which both use 'OPEN PROG 1' in the codes. Downloading either of them and typing in 'b1 r' will get the respective code running well. Does this answer your questions? I do have a CLEAR after opening any motion program buffer, e.g. 'OPEN PROG 1 CLEAR'. Xiandu, Just to be sure; If you download the file through PEWIN32PRO2 does it get loaded to PMAC memory? Can you run the new programmed profile? Do you have a CLEAR after opening the motion program buffer? Regards, Link to comment Share on other sites More sharing options...
xiandu Posted July 18, 2011 Author Share Posted July 18, 2011 Sina, I use the 'upload' in PEWIN32 to check if the program has been downloaded by the download () function. It looks like the .pmc is not there. Using the 'download' in PEWIN32, the downloaded file appears in the 'upload' program list. Xiandu, Just to be sure; If you download the file through PEWIN32PRO2 does it get loaded to PMAC memory? Can you run the new programmed profile? Do you have a CLEAR after opening the motion program buffer? Regards, Link to comment Share on other sites More sharing options...
Sina.Sattari Posted July 18, 2011 Share Posted July 18, 2011 xiandu, I will forward this thread to one of our software engineers. He should be able you to help you. Regards, Link to comment Share on other sites More sharing options...
Unit101 Posted July 22, 2011 Share Posted July 22, 2011 You show this logic to download your file: I try pmacDevice.Download(dwDevice,"MOTIONPROG1.pmc", bMacro,bMap,bLog,bDnld,&pbDriverOpen). BUT your pdf screen shot shows the file was read and compiled ok BUT it was not downloaded. I suspect that your bDnld is set to FALSE in your function call ? If bDnld is false it will compile as you see but not actually download or send the results to the pmac. regards, mike Link to comment Share on other sites More sharing options...
xiandu Posted July 25, 2011 Author Share Posted July 25, 2011 Mike, I appreciate that you look into it. You solve my problem!!! Xian You show this logic to download your file: I try pmacDevice.Download(dwDevice,"MOTIONPROG1.pmc", bMacro,bMap,bLog,bDnld,&pbDriverOpen). BUT your pdf screen shot shows the file was read and compiled ok BUT it was not downloaded. I suspect that your bDnld is set to FALSE in your function call ? If bDnld is false it will compile as you see but not actually download or send the results to the pmac. regards, mike Link to comment Share on other sites More sharing options...
Unit101 Posted July 25, 2011 Share Posted July 25, 2011 Great... Congrats on success. you are very welcome, and we hope your project is a big success. Regards, mike Link to comment Share on other sites More sharing options...
Recommended Posts