01-22-2021 01:35 PM - edited 01-22-2021 01:58 PM
I'm trying to control an old Kikusui DPO2212A controller. I can get it to output the correct voltages, but it does it to both channels 1 and 2 instead of the ones I'm telling it to!
Details:
The format of a control string for this device is AYKXXXV, where:
Y: channels 1-3
XXX: value between 000-999
PROBLEM:
If I plug in any single digit number for Y, both DAC outputs will turn on with my desired voltage. I've checked the hardware connections and they are correct.
LABVIEW QUESTION: how come the instrument accepts my A, K, 000-999 characters as is, but does not accept numbers 1, 2 correctly such that the appropriate channel turns on instead of all channels? do I need to format this number differently?
* The screenshot below shows a typecast that does not currently work. The default configuration is actually to directly feed the AYKXXX string into the concatenation block.
Additional Note:
In the product manual, they use some ancient program to place the code in. I'm not sure what this program does to the channel index (1-3) as it is not indicated in the datasheet.
01-22-2021 03:03 PM - edited 01-22-2021 03:08 PM
@AnalogEE wrote:
LABVIEW QUESTION: how come the instrument accepts my A, K, 000-999 characters as is, but does not accept numbers 1, 2 correctly such that the appropriate channel turns on instead of all channels? do I need to format this number differently?
* The screenshot below shows a typecast that does not currently work. The default configuration is actually to directly feed the AYKXXX string into the concatenation block.
I don't know, you didn't show us the part of the code that has the 999 part. But I do see the problem with the 1 or 2 part.
The "ancient" code 🤣 you attached tells the secret. (That is called BASIC by the way.). It tells you that you want to have the "2" as a string.
So don't put in an integer 2 and typecast that will send the ASCII code for STX, not the character 2.
Just type "2" in a string constant.
If you do have it has an integer control, then you want to do a Format Into String to turn it into the character "2".
Overall, format into string would be the best choice. Then the code would look like this.
01-22-2021 03:36 PM
I was doing the same thing as you're implying here. That part is no problem (sorry for the lack of detail).
The problem of both channels getting activated still exists so maybe it's not a string format issue after all.