set portRef to serialport open "/dev/tty.usbserial-AJ038ZH1" bps rate 115200 data bits 8 parity 0 stop bits 1 handshake 0
if portRef is equal to -1 then
display dialog "Could not open Modem"
else
delay 1
set thestr to "06 14 00 04 00 34 11 00 00 5D" & return
serialport write thestr to portRef
delay 1
serialport close portRef
end if
I am sure the Hex here is not formatted correctly but I am out of ideas. The view sonic manual shows this code
0x06 0x14 0x00 0x04 0x00 0x34 0x11 0x00 0x00 0x5D
but it doesn't work.
--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
Follow Figure 53 on Twitter: http://twitter.com/Figure53
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Screen Shot 2015-10-20 at 4.38.33 PM.png>
tell application "CoolTerm"
set ProjectorON to Hex2Str ("06 14 00 04 00 34 11 00 00 5D")
WriteLine {"ViewSonicON.stc", ProjectorON}
end tell
error "CoolTerm got an error: Can’t make {\"ViewSonicON.stc\", «data tdta0614000400341100005D»} into type text." number -1700 from {"ViewSonicON.stc", «data tdta0614000400341100005D»} to text
also tried
tell application "CoolTerm"
set ProjectorON to Hex2Str ("06 14 00 04 00 34 11 00 00 5D") as string
Write {"ViewSonicON.stc", ProjectorON}
--return ProjectorON
end tell
set w to WindowID (0)
I will play with it in the am.
Thanks for the help and ideas.
byte message[] = {0xAA, 0xBB, 0x06, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03 };
Or
Serial.write(0xAA);
Serial.write(0xBB);
Serial.write(0x06);
Serial.write(0x00);
Serial.write(0x00);
Serial.write(0x00);
Serial.write(0x01);
Serial.write(0x01);
Serial.write(0x03);
Serial.write(0x03);
I'll try it ASAP and report.
tell application "CoolTerm"
Write {"ViewSonicON.stc",0x06, 0x14, 0x00, 0x04, 0x00, 0x34, 0x11, 0x00, 0x00, 0x5D}
end tell
None of this worked. :-(
I also tried..
\x06\x14\x00\x04\x00\x34\x11\x0A\x01\x68
x06x14x00x04x00x34x11x0Ax01x68
\06\14\00\04\00\34\11\0A\01\68
\\06\\14\\00\\04\\00\\34\\11\\0A\\01\\68
\0x06\0x14\0x00\0x04\0x00\0x34\0x11\0x0A\0x01\0x68
\\0x06\\0x14\\0x00\\0x04\\0x00\\0x34\\0x11\\0x0A\\0x01\\0x68
----------------------------------------------------------------------------WriteLine(ID as integer, Data as String)----------------------------------------------------------------------------Writes data terminated by the "Enter Key Emulation" character specified inthe connection settings to the serial port associated with the terminalwindow with the specified name.E.g.: Write {WinID, "Writing just one line."}
What I have been doing with these tests, is just pasting in the string in the main cool term window. it then transmits the data.
I can control the machine (see page 51) via this hex 06 14 00 04 00 34 11 00 00 5D (this is the ON code) but ONLY if I send it via the Send String Window with Hex checked. Not if I paste it into the main CoolTerm window. See image attached. I can't automate the Send String WIndow without a ton of jumping thru hoops.
tell application "CoolTerm"
set ProjectorON to Hex2Str ("06 14 00 04 00 34 11 0A 01 68")
WriteLine {"1", ProjectorON}
end tell
I had tried, with no success.
tell application "CoolTerm"
--activate
set ProjectorON to Hex2Str ("06 14 00 04 00 34 11 0A 01 68")
WriteLine {"0", ProjectorON}
end tell
tell application "CoolTerm"
WriteLine {"Name_of_Coolterm_file.stc", "1"}
tell application "CoolTerm"
set ProjectorON to Hex2Str ("06 14 00 04 00 34 11 00 00 5D")
WriteLine {"viewsonic.stc", ProjectorON}
end tell
And that works too!!!!
My brain may explode
As usual you are right and I am a idiot!!! :-)IT WORKS!!!!!!! SO GLAD!!! THANK YOU for your patients and help!tell application "CoolTerm"
set ProjectorON to Hex2Str ("06 14 00 04 00 34 11 0A 01 68")
WriteLine {"1", ProjectorON}
end tell
I had tried, with no success.
tell application "CoolTerm"
--activate
set ProjectorON to Hex2Str ("06 14 00 04 00 34 11 0A 01 68")
WriteLine {"0", ProjectorON}
end tell
set w to WindowID (0)
Here is the strange thing. I have used this script for over a year and still do, to trigger a bluetooth Ardunio unit.tell application "CoolTerm"
WriteLine {"Name_of_Coolterm_file.stc", "1"}
end tellAnd it works fine.
Yet, doing that with this script did not. ?!?!
WriteLine {WindowID (0), ProjectorON}
On Aug 28, 2020, at 3:19 PM, kindabasic <cuttled...@gmail.com> wrote:
I'm looking into rs 232 for the first time so I apologize if I'm missing fundamental points here. I need to turn on 2 projectors via rs232, and ideally from qlab.
--
Contact support anytime: sup...@figure53.com
Follow QLab on Twitter: https://twitter.com/QLabApp
User Group Code of Conduct: https://qlab.app/code-of-conduct/
---
You received this message because you are subscribed to a topic in the Google Groups "QLab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qlab/dZdfrfLIG98/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/e4a55b8d-92a6-4a97-b0d4-b7292ac0e8aan%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/F2A702F8-A744-4A42-AF8A-4E9355886007%40gmail.com.
0x06 0x14 0x00 0x04 0x00 0x34 0x11 0x00 0x00 0x5D
Turn off
0x06 0x14 0x00 0x04 0x00 0x34 0x11 0x01 0x00 0x5E
tell application "CoolTerm"
set ProjectorON to Hex2Str ("06 14 00 04 00 34 11 00 00 5D")
WriteLine {"NameofYourCoolTermFile.stc", ProjectorON}
end tell