LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Instrument Control Issue (What Data Type to Indicate Channel Index? ASCII, HEX, DEC?)

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.

 

AnalogEE_0-1611343938515.png

AnalogEE_0-1611344406528.png

 

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.

 

AnalogEE_0-1611345481650.png

 

 

 

0 Kudos
Message 1 of 3
(889 Views)

@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.

 

AnalogEE_0-1611343938515.png

 


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.

 

0 Kudos
Message 2 of 3
(847 Views)

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. 

0 Kudos
Message 3 of 3
(835 Views)