Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'load pmc' doesn't work for PowerPMAC #8

Open
UrszulaNeuman opened this issue Sep 27, 2022 · 15 comments
Open

'load pmc' doesn't work for PowerPMAC #8

UrszulaNeuman opened this issue Sep 27, 2022 · 15 comments

Comments

@UrszulaNeuman
Copy link

We used to be able to load files to a brick using the 'load pmc' button.
This doesn't work for powerPmac.
I'm guessing it is because of the tree like file structure used by powerPMAC.
Once the button is pressed it would be good to see both sides - the source and the destination file structure.
Similarly to e.g. WinSCP
image

@gilesknap
Copy link
Contributor

Are you trying to send PMCs or other files?

@gilesknap
Copy link
Contributor

I believe that sending a PMC to the PowerPmac would be like typing the commands into gpascii.
So it would change the state of the controller but it will not change the project files (at least not in any nice way!)

@ajgdls
Copy link
Contributor

ajgdls commented Sep 27, 2022

Yes the load button in PowerPMAC just does the same as it used to, send line by line the contents of a file into gpascii (in turbo pmac 2 it was line by line into ascii interface). You can upload/download files using the new PowerPMAC tool for project control. This will upload/download project files in the same way as the IDE.

@UrszulaNeuman
Copy link
Author

Hi,
I want to send various files - kinematic routines, homing routines. If the button sends a PMC line by line it is not very useful for PowerPmac. I expect this will confuse people. Maybe we should get rid of the button all together for powerPmac?
What is the new PowerPMAC tool for project control? Can I use it from a Linux machine? How?
Thanks,
Urszula

@GDYendell
Copy link
Contributor

GDYendell commented Sep 29, 2022

I am using the load pmc... button to download a plc and a motion program on a power brick I07 and it works OK. It is infinitely easier than using the IDE - though clashes between the two is an unsolved problem as yet. As far as I know this is the best way to download files currently. We shouldn't remove the button until we have a better way.

@JimboMonkey
Copy link

@GDYendell - when you downloaded the PLC and motion programs, where did they end up within the filesystem of the PowerBrick?

@rjwills28
Copy link
Contributor

The new PowerPMAC analyse tool is called 'dls-powerpmac-analyse'. This can be used to back up, compare and restore PowerPMACs.

It can be pip installed into a Python virtual env (Python >=3.7).
To install and run it at Diamond you will first need to load the python/3.7 module.
Instructions below:

module load python/3.7
python -m venv path/to/venv
source path/to/venv/bin/activate
pip install --upgrade pip
pip install dls-powerpmacanalyse

Run with:
dls-powerpmac-analyse -g

Help: dls-powerpmac-analyse -h

@GDYendell
Copy link
Contributor

when you downloaded the PLC and motion programs, where did they end up within the filesystem of the PowerBrick?

I am not sure, but they appeared with, e.g., list prog 1 and worked so I was happy. I can do some digging and see if I can find them on the filesystem.

@GDYendell
Copy link
Contributor

OK I think I see what happens. If you download a file it does take effect, but even doing a save does not make it persistent. It does not overwrite (e.g.) /opt/ppmac/usrflash/Project/PMAC\ Script\ Language/Motion\ Programs/prog1_filter_move.pmc. Would it be possible for pmac-control to write it to that directory as well as what it does currently?

@JimboMonkey
Copy link

Urszula and I were discussing this yesterday. We think, to keep the motion area and controllers in sync and allow easier comparisons between the two, that files should be uploaded to their allocated place in the controller's filesystem, and then activated in the 'live' area of the controller. This is why Urszula's suggestion of a source/destination dialog box may be needed.

A discussion point about how uploads should be handled is on the agenda for the next motion controls meeting (Weds 5th) - please come along to join in

@gilesknap
Copy link
Contributor

In my opinion the PowerPMAC can only be used in one of two ways:

  • only use the IDE to make updates to configuration. This is the only officially supported approach
  • only make updates to the configuration by sending commands to the gpascii interface. Never use the IDE. Maybe in this case SAVE would persist the changes (but not propagate them to the project files)? But in truth you are on your own in an unsupported approach.

Trying to mix the above two approaches is certainly unsupported and full of major pitfalls. I strongly advise against it.

I enclose my investigation notes into this issue from a few years ago. SUMMARY: the life-cycle of configuration files for PowerPMAC is complex and this is very unlikely to be fixed. Trying to work around it is unsupported and too fragile to be practical.

hgv27681-PowerPmacIDEInvestigation-031022-1043-120.pdf

@rjwills28 I think you have a reasonable amount of experience of this, I'd be interested to know if you agree with the above?

@rjwills28
Copy link
Contributor

Yes I do agree that mixing approaches could cause issues.
The dls-powerpmac-analyse tool was built to mimic what the IDE does in terms of managing the file system and so is also a safe way of downloading programs to a PowerPMAC.

@gilesknap
Copy link
Contributor

Thanks @rjwills28. That implies that there is a way of doing things outside of the IDE as long as we work in the same way as dls-powerpmac-analyse. Can you briefly elaborate on what process it uses? Thanks.

@ajgdls
Copy link
Contributor

ajgdls commented Oct 3, 2022

@gilesknap the powerpmac-analyse tool is fine as long as you are very careful. It can perform the same functions as the IDE (Phillip Coles was careful to match the functionality of certain commands) but there can still be conflict if you use both the IDE and the tool. DLS have still not arrived at a confirmed set of procedures for these tools playing together well on the PowerPMAC. The main point is that the pmac control tool can be used for quick tests of PLC / motion programs using the download button, but those files then need to be correctly injected into a project if they are to be handled appropriately when the IDE is used.

@ajgdls
Copy link
Contributor

ajgdls commented Oct 3, 2022

I'm voting that the pmac control tool should be left as it is - it would be far too brittle to allow this tool to start downloading files into the file system of the PowerPMAC unless everyone at DLS (including motion team) are signed up to doing it in this specific way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants