01-10-2018 12:02 PM
Attach your code! Hard to tell what you are doing wrong with just the error message.
As GerdW said, Read that Fine Manual, it contains all the answers.
01-23-2018 04:29 AM
hello to all,
I still have some problem with my vi. I have made small vi to control Power supply. I have attached my code below. there are some issues, please help me to solve it.
1. Using this vi, it is possible to write voltage and current to the power supply, but I cannot read back it.
2. also i cannot make it possible to set limit of voltage and current,above this limit it cannot accept the values.
3. To change the channel, I have to put power supply on local mode, then change the channel and put power supply on remote mode.
01-23-2018 04:51 AM
Hi Yash,
don't use BytesAtPort, you don't need it to read terminated strings!
2. also i cannot make it possible to set limit of voltage and current,above this limit it cannot accept the values.
There surely are commands to set voltage/current limits for your device. Did you look that up in your manual?
3. To change the channel, I have to put power supply on local mode, then change the channel and put power supply on remote mode.
What does the manual say about this behaviour?
01-23-2018 05:51 AM
thanks for the immediate response.
yes, I read the manual, but I think there is a problem with commands actually. I will try further and check it again.
01-23-2018 01:16 PM
I am currently fighting with the exact same issues as you with the exact same instrument 2231a-30-3 with the 2231a-001. Its "good" to hear that its not just me that is experiencing these issues.
I have contacted Keithley support and am trying to work through the issues. I will respond back if I discover anything.
01-23-2018 02:20 PM
Ok, I've discovered the issue with the drivers and am currently fixing it. I will upload the corrected drivers once I am done making the revisions.
The problem is that every write action needs to end with a line feed character. I discovered this in the Keithley forums...https://forum.tek.com/viewtopic.php?t=125420
Also, the *IDN? was expecting the instrument to return 22x0 instead of 22xx. So that has also been changed. I'm sure there will be other little things that come up as well, but I will try to update the driver to a working condition for the 2231a-30-3.
01-23-2018 02:55 PM
The commands in the manual and the driver are correct. What you've done is copy&paste the code from the driver without understanding it and thus muddle the commands in the process. "Measure:%s:DC?" is not a command, but "MEASure:VOLT:DC?" is a valid command. So learn the exact syntax of the commands or USE THE DRIVER VIS!
Here's a simple example of using the drivers. You can use this example to build a more useful VI to suit your needs.
1st subVI initializes communication.
2nd subVI Enables the channel.
3rd subVI set the Max Voltage limit.
4th subVI sets the channel as voltage...should probably switch the order of 3rd and 4th.
5th subVI sets the instrument to remote/local...not needed really.
6th subVI makes a voltage measurement and displays "Voltage Reading"
7th subVI reads the instrument error status and will display an error if one has occurred.
8th subVI closes instrument communication.
01-24-2018 02:42 AM
thanks to all.
cstorey: thanks. reading problem solve. I cannot open your vi because I am using lab-view version 16. Can you please send this vi again in version 16?. BTW thanks for your guidance.
01-24-2018 09:48 AM
Here's a 2015 version. Also note that based on the comments above I disabled the ID Query and made the second subVI the "Set Mode to Remote" VI.
Hope this helps.
Craig
07-11-2018 04:51 AM
Great work here
Would it be possible for you to share the complete Labview project for 2231A