Skip to content

Conversation

@DominicOram
Copy link
Contributor

@DominicOram DominicOram commented Apr 6, 2017

Description of work

Added support for the HRPD sample changer, including IOC, OPI and emulator as per ISISComputingGroup/IBEX#2173.

EPICS-Top: https://github.com/ISISComputingGroup/EPICS/pull/80
Emulator: ISISComputingGroup/EPICS-DeviceEmulator#12
Support: https://github.com/ISISComputingGroup/EPICS-rotating_sample_changer
GUI: ISISComputingGroup/ibex_gui#480

To test

The basics:

  • Start the IOC in devsim
  • Start the emulator on the port the IOC is looking on
  • Confirm that the IOC connects w/o error, all PVs appear to connect
  • Create a device screen for the sample changer
  • Confirm that the screen is all connected ok and that you can initialise then move the device

Testing against the VI:

Some slight niggles:

  • The way the emulator handles errors is a bit dodgy, with no access to the device I just put in as much as I needed to get going
  • The VI expects something slightly different from the documented API, I went with what the VI expects
  • Some functions of the sample changer are HRPD specific, as default these aren't loaded but they are if IS_HRPD=''. I didn't expose this macro to the GUI as it's not something the user will need to change

Code Review

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed.
  • Does the IOC respond correctly both in full and simulation mode, where it's possible to test both?
  • If there are multiple _0n IOCs, do they run correctly?

Final steps

  • Reviewer has updated the submodule in the main EPICS repo? See Reviewing work for the subModules of EPICS in the Git workflow page for details.
  • Reviewer has moved the release notes entry for this ticket in the "Changes merged into master" section

@AdrianPotter
Copy link
Contributor

AdrianPotter commented Apr 6, 2017

  • ROTSC needs listing in main IOC makefile
  • Entry needed in release notes


$(IFDEVSIM) freeIPPort("FREEPORT")
$(IFDEVSIM) epicsEnvShow("FREEPORT")
$(IFDEVSIM) drvAsynIPPortConfigure("L0", "localhost:57677")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we get the number of the free port, we should use it

$(IFNOTDEVSIM) asynSetOption("L0", -1, "parity", "$(PARITY=none)")
$(IFNOTDEVSIM) asynSetOption("L0", -1, "stop", "$(STOP=1)")
$(IFNOTDEVSIM) asynOctetSetInputEos("L0", -1, "\r")
$(IFNOTDEVSIM) asynOctetSetOutputEos("L0", -1, "\r")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a macro instead of repeating "L0", as in other IOCs (though I expect not all of them)

<macro name="BAUD" pattern="^[0-9]+$" description="Serial communication baud rate, defaults to 57600." />
<macro name="BITS" pattern="^[0-9]$" description="Serial communication number of bits, defaults to 8." />
<macro name="PARITY" pattern="^(even)|(odd)|(none)$" description="Serial communication parity, defaults to none." />
<macro name="STOP" pattern="^[0-9]$" description="Serial communication stop bit, defaults to 1." />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Standard pattern is (Default: number) in brackets rather than defaults to...

@AdrianPotter
Copy link
Contributor

I get an assortment of connected/disconnected states:

image

@DominicOram
Copy link
Contributor Author

DominicOram commented Apr 10, 2017

Did you get any associated IOC log errors? Did you try restarting the OPI a couple of times?

@AdrianPotter
Copy link
Contributor

Looking at the IOC log, I think the issue might have been that devsim wasn't set correctly. I think there might be an issue in the GUI as I'm certain Devsim was set for the IOC. I can retest that. Please fix the other highlighted issues for now and I'll retest.

@AdrianPotter
Copy link
Contributor

AdrianPotter commented Apr 18, 2017

Devsim works fine, thanks. Happy with the changes. Please could you just do a couple more things:

  • The (IS_HRPD=##) is ok, but following our discussion might be better suited as a macro. Otherwise it's liable to be forgotten during setup. Something generic like an integer "TYPE" would be best so it's extensible to other specific configurations (e.g. 0: Default, 1: HRPD: 2:...)
  • I get a lot of "Illegal choice PV" warnings when the IOC is started up in RECSIM mode. Please could you have a look at clearing them.

@AdrianPotter AdrianPotter merged commit e12e141 into master Apr 18, 2017
@AdrianPotter AdrianPotter deleted the Ticket2173_hrpd_sample_chanegr branch April 18, 2017 14:01
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

Successfully merging this pull request may close these issues.

3 participants