Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

ATR program

Hi,
 
I want to communicate with a Climate Chambre over RS232 in Diadem, I programed a VBSccript to do this but it takes a bit to long to recieve the information. So I tried to proram a ATR file, which should be very simple but I ran into a problem:
 
I need to send this string to the Climate Chambre and it sends back the Temperature:     $01I <CR><LF> 
 
my code looks like this:
 
init
  SET com1 TO=500 EOL=\013
end
 
input
  write com1 "$01I"
  read com1 "%AR"
end
 
as you can see my problem is with the <LF> I´ve tried "$01I\013\010" , EOL=\013\010 and many other strings with no success.
 
thank your for your help
john
0 Kudos
Message 1 of 4
(3,694 Views)
HiJohn,

did you try this:

EOL=\10

write com1 "$01I$0D"

or

write com1 "$01I$0D$0A"

Daniel
NIG
0 Kudos
Message 2 of 4
(3,682 Views)

Thanks for your help,

I found the the problem, the string I was trying to send  was "$01I" and the ascii character "$" is represented by \036 so,

I just sent:

EOL=\010

Write com1 "\03601I\010"

now it works 🙂

0 Kudos
Message 3 of 4
(3,668 Views)
Graet and good luck to you and your project!
0 Kudos
Message 4 of 4
(3,665 Views)