Skip to content
Snippets Groups Projects

devel iviscan

Merged Lingxin Meng requested to merge devel_iviscan into devel
  • change iv scan config parameters to default
  • remove unused functions
  • add logging
  • add ramp voltage
  • arguments
    • add output file
    • add upload to influxDB
    • change iviscan config to not-required, add default value to configs/lr_iviscan.json

Merge request reports

Pipeline #2576670 passed

Pipeline passed for 82d3f484 on devel_iviscan

Merged by Mario Gonzalez CarpinteroMario Gonzalez Carpintero 4 years ago (May 10, 2021 8:44am UTC)

Loading

Pipeline #2590325 passed

Pipeline passed for 7c52f5ca on devel

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
147 180 step = ch["step_size"]
148 181
149 182 startX = measXvar()
150 wasOn = ps.isOn()
151
183 #wasOn = ps.isOn()
184 wasOn = (measXvar() != 0 or measYvar() != 0)
  • Author Developer

    Why not use the ps.isOn function? This is implemented for all the power supplies. Measuring one of the variables to be no 0 is not a reliable proof, you can have some slight offset in your measurement or in your output.

  • Hi Lingxin! I was just describing my changes in a separate comment, you have been really fast.

    It is not implemented for the HMP4040 in the version of LR we are using here. Now that you mention it, maybe it is already implemented in the latest LR? Let me update LR and check it now. Sorry if this is the case

  • Author Developer

    Hi Mario, I see, thanks for the explanation. isOn is a function that's generic to all power supplies implemented in IPowersupply. I haven't checked specifically for HMP4040 but it should be implemented on labRemote level to keep the ivi scan more general.

  • Hi Lingxin, Sorry to bother with this, but are you using the latest devel branch of labRemote? As I see isOn() is not implemented (at least for HMP4040) in Master. When I switch to devel, I have to update the config, but even after doing that I get an error at the json validation stage. The ivi scan does not crash after the error, but then it still says that isOn() is not implemented.

    Are you also getting any similar error from LR? to me, it looks like this:

    [ERROR]   : The provided JSON configuration failed the schema check (input file: configs/lr_powersupply_updated.json)
    [ERROR]   : Are using an old-style labRemote JSON configuration? If so, try running the following command:
    [ERROR]   :     python /path/to/labRemote/scripts/update_config.py configs/lr_powersupply_updated.json
    [ERROR]   : The error messsage from the JSON validation was: At /devices/0/communication of {"port":"/dev/ttyACM0","protocol":"TextSerisalCom"} - no subschema has succeeded, but one of them is required to validate

    I'm trying to fix it now.

    Now that I think of it, if we assume people to be using LR's devel, I should better update SO's configs/lr_powersupply.json. But then people in older versions would get [WARNING] : Requested channel not found in input configuration file: LV when using the Scan Operator with LR's Master.

    Do you think the SO should be modified to work with LR's devel branch? Or should we rather wait until LR's devel is merged into Master to update the SO?

  • Hi @lmeng, it looks like (just if you have been also getting it) the error above comes from the fact that specifying the "termination" is required in the new scheme, but update_config.py did not add it to the config file. After fixing it I still get [WARNING] : isOn() not implemented for this PS. for our HMP4040. Maybe we can leave it commented for the moment and start using it once LR's devel gets merged into Master and the issue disappears.

    Maybe I also can prepare a MR in LR implementing isOn() for the HMP if it's actually still not there. Sorry for these two long comments!

  • Author Developer

    Hi @mariog I just checked and you're right that the isOn function is not implemented. I haven't been using the HMP4040 yet with labRemote. The HMP4040 and 2020 both just use the SCPIPI commands, which are used for many other PS. If there is a SCIPI command for enabling output it would be good to implement it.

  • Hi @lmeng, thanks for the information. I think we can merge this as it is, still using labRemote's old configuration. Then I can work on implementing that isOn in labRemote, and once done use it also here again in the Scan Operator.

  • Author Developer

    Hi @mariog agreed. Though have you tested that measXvar() != 0 or measYvar() != 0 definitely works? I'm afraid the measured values are not always exactly 0 depending on the power supply model, measurement accuracy and what is connected...

  • Hi @lmeng, I think you are right, thanks for the comment.

    At least for our HMP4040, both current and voltage have always been 0 when the output is off. I guess it checks first if output is disabled and returns 0 if it is the case, but that's just my guess and other PSs might behave differently. If even whith the output disabled they actually measure voltage and current, then isOn might return True when the PSs are actually off. I thought this is unlikely, because for that both current and voltage have to be different from 0. But it might happen for some PSs as you say.

    At any rate, this is just a temporary solution. I have already opened a MR in LR implementing isOn for SCPI power supplies. I guess it will be merged soon, and I will update the SO accordingly as soon as it does.

  • Author Developer

    Hi @mariog good to know, thanks for checking. I saw the MR in labRemote :)

  • Please register or sign in to reply
  • mentioned in commit 7c52f5ca

  • Please register or sign in to reply
    Loading