VDT2: Read from ComPort

Hi,

I tried to read from a specific Comport which can be choosen from an popup menu. But unfortently if I try to specify the port by S_Value no access to this port is possible. Instead if I write COM1 everything is fine.

Function initPem()
Variable num
controlInfo PopCom
VDTOperationsPort2 S_Value
VDTWrite2 "W\r"
Sleep/T 10
VDTRead2/O=0.5 num
End

Thanks a lot
VDTOperationsPort2 takes a name as its parameter. So your command is saying "Use the serial port S_Value for command line operations". But there is no port named S_Value so you get an error.

You need to convert the contents of S_value into a name. That is what the $ operator does. So use:
You need to use $S_value. For details execute:
VDTOperationsPort2 $S_Value