12-03-2012 07:21 PM
12-03-2012 09:07 PM
More specifically, in MAX, how can I query its corrent position? For instance, I entered the following input ( I am assuming that we are having same manual)
"com1:9600,n,8,1,d0"
followed by
"U";CHAR$(67)
to get the current position, but I still get the same error as before.
I'd really appreciate if you could make some specific suggestions I can try in MAX in terms of scripts.
Thanks
12-04-2012 09:16 AM - edited 12-04-2012 09:17 AM
As the manual says, the example is for Basic. You don't send the com port settings and you don't send CHR$ anything in MAX. Just send the ASCII character. You might want to download an ASCII lookup table. For example, try 'U@' (without the ') followed by a \r (carriage return) and then a read.
12-05-2012 07:05 PM
I tried:
U@\r
and it's still giving me the same timeout error. Is there something else I can try?
12-05-2012 07:37 PM
12-05-2012 11:41 PM
Is there a standard way to convert the codes written in GWBASIC to something executable in Max (or Labview/matlab)?
I think I am getting some response from my device, but I am not 100% sure whether or not I am sending correct signals.
For example, in BASIC, I have (from the manual)
PRINT#1,"U";CHR$(0);"1000"
PRINT#1,"U";CHR$(80)
Bacially, the first one is to 'write' x-position (0) to be '1000' and the second line is to 'read' to start (80)
In translating the codes to be used in MAX, from the way you were suggesting before, I can write,
UNUL1000\r
UP\r
where NUL is the ASCII symbol for 0 and P is the ASCII symbol for 80. Note that each command is followed by \r. Is this how you would translate the BASIC code in general? Or is there a more specific way to make the translation.
Here are some additional questions I have:
1. What's the difference between \r and CR (carriage symbol from the ASCII table)?
2. Is there something I need to insert between 'NUL' and '1000' in the first line? What happes if the number '1000' is preceeded by an ASCII symbol that is a number (like 48 or 49)? That would make codes quite confusing...
This is something new to me, so any help would be much appreciated.
Thanks
06-14-2013 11:13 AM
I got the same problem with you.
So did you solve it?
06-14-2013 05:59 PM