Sci-Mech wrote in news:50650000000500000038860100-
1079395200000@exchange.ni.com:
> Thanks guys, but I still can't get it to work.
>
> I am trying to send two numbers seperated by a space with a carriage
> return on the end.
>
> 27 105CR - this has to be in a decimal format (instead of the string
> format requested by the visa).
>
> any ideas?
>
> thanks
I may have been to quick with my previous answer but now i do not
understand what you mean.
VISA takes a string as it's input. Each character in the string can also be
represented by a U8 where the character A will have the value 65 in decimal
(or 0x41 in hexadecimal notation).
I am not shure what you mean by that the number need to be in decimal
format. In labview a num
ber indicator can show a number in different
notations, decimal, hexadesimal, binary. A number can also be shown in a
string as a decimal value.
Suggestion one.
Create a U8 byte array with the values 27, 32, 105 and 13 and use the
function "Byte Array to string" to get the string to send to the VISA
function.
Suggestion two.
Create a string with the contents "27 107" and concatenate the string
constant "Carriage Return" on the end (use the function "Concatenate
Strings").
Suggestion three.
Use the function "Format into string".
- Expand it so it has three inputs.
- Wire a string constant with contents "%d %d%s" to input "Format String"
- Wire your first number into "Input 1"
- Wire your second number into "Input 2"
- Wire the string constant "Carriage Return" into "Input 3"
- Wire Output string to the input of the VISA function.
If you still have problems it might help if you tell what type of equipment
you try to communicate with.
--
Rolf