Internet PLC Forum

General => Technical support => Topic started by: Jane on October 18, 2007, 12:23:13 AM

Title: TBasic problem...
Post by: Jane on October 18, 2007, 12:23:13 AM
Hello.....

I need to periodically sample read the input chanel  value into some Strings(A$ to $Z)......In TBasic

E.g. every 0.5s, run the following function in TBasic:

   A$=input[1]
   B$=input[2]
   .......
but it's wrong

I can't fine in the manual  
I want to know  TBasic cause that RVS0101


And

In visual basic program with xserver.......

I send any host link command such as "@01RV$D25*" and there will be the response as "@01RV$00061*"  from the PLC. Can I know variable name in the response as "@01RV$00061*" .....
it is not variable name In "@01RV$00061*" ..
Title: Re:TBasic problem...
Post by: FQ-ONG on October 18, 2007, 03:40:19 AM
From E.g. A$=input[1]
$ missing
[1] should be (1)

A$=INPUT$(1)
Title: Re:TBasic problem...
Post by: support on October 19, 2007, 10:15:40 AM
What do you mean by "input channel"? Do you mean serial input, or digital inputs or analog inputs?

Note that if you are using a PLC's comm port for programming and online monitoring, then that comm port buffer will be filled with host  link commands sent by the TRiLOGI software and when you subsequently use the INPUT$(1) to read the serial port #1 you will get a lot of these host link command strings. If you are disconnecting the PC or Xserver from the PLC's comm port in order for it to connect to something else (e.g. barcode reader) you should execute a loop of INCOMM(1) until it returns -1. This ensure that the buffer is cleared before using it for interfacing to other devices.