You can also add to the #initCmd setVoltage 12;setCurrent 3 to make sure the vars have the same value as the actual PSU. Now the vars are out of sync until you change V or A.
I just choose 12 and 3 but you should choose any other pair as the values you like to have as default as after startup.
That's a fine idea. Implemented.
A delay was necessary between the commands.
#initCmd setVars;pcConStart;[100];outputOff;[100];setVoltage 5;[100];setCurrent 1;Oh, that's annoying. Then you have to be careful about the voltage you set in the variables/initCmd. Maybe start with a default of 0 or close to 0 to avoid potentially frying something by mistake on startup.
I've gone with 3.3V 1A for now. The PSU always starts up with it's output off, but I've just added the outputOff command to the #initCmd for safety, in case a connection to TestController is made while it's on and connected to something.
I've tested it and can confirm that if you connect with TC while the output's on, it shuts right off and the chosen set values are displayed on it's screen, along with the word "OFF".
I believe NoDisintegration has made a very good definition.
I wonder if there are multiple models where the only difference is voltage/current?
If that is the case it only requires a little work to support all models.
To do that:
Replace all references to voltage/current with names, like MaxVoltage/MaxCurrent, it is very important that these name do not appear elsewhere in the definition.
Declare the definition #meta, i.e. place #meta on the line before the actual definition.
Now you can add each model with:
#metadef
#idString KUAIQU,SPPS3010D,
#name KUAIQU SPPS3010D
#handle SPPS3010D
#replaceText MaxVoltage 32
#replaceText MaxCurrent 10
One #metadef for each model.
Note: You can do a lot of other stuff, like removing lines you do not want (The extra selections for radio control)
Documentation is herehttps://lygte-info.dk/project/TestControllerConfigDevice%20UK.html#Creating_multiple_devices_from_one_configuration_file
You can also check definitions of other devices, it is used for nearly all devices that comes in series with slightly different specifications.
That seems likely. There is documentation of only that same single protocol in the zip file for their atrocious software, which is presumably used for a range of their PSUs. The same protocol is found yet again in their "Remote Contect Step.pdf".
I also had a look at their software. It looks like the only differences for the PSUs are the limits and presets that the software loads for each model, when you manually select one from a dropdown menu. However, I haven't wiresharked the usb to absolutely confirm
that there isn't another undocumented command sent to query a model number. I may look into that at some point, but expect that there won't be. Or at least that if there is, it's probably not used. The lack of a "scan" button in their software is probably a giveaway.
With their software I could only get it to turn the PSU On/Off (which worked for every model I selected), setting the voltage or current just turned them to zeroes on the PSU's screen and their program didn't seem to receive anything.
Back to the TC definition file itself:
I've changed the format to #metadef and added the definitions for SPPS305D, SPPS605D, SPPS1203D. They work within the range of the SPPS3010D, but I've left them commented out with warning until someone with the relevant PSUs tests them and reports back with good news.
I've also adjusted the radio button values to some that are probably more universally applicable to each PSUs range.
(Updated V1.23 definition file attached.) with sample log and screenshots of the Setup popups from each of the #metadefs.