serial comunication with a projector

Thread Solved

Join Date: Sep 2006
Posts: 8
Reputation: sugarboy rider is an unknown quantity at this point 
Solved Threads: 0
sugarboy rider sugarboy rider is offline Offline
Newbie Poster

serial comunication with a projector

 
0
  #1
Sep 29th, 2006
i have to comunicate from vb to control a nec vt480 and I have not much idea how to send the instructions correctly .
Acording to the information given by nec, this are the codes to control projector:
001. POWER ON 02H 00H 00H 00H 00H 02H
002. POWER OFF 02H 01H 00H 00H 00H 03H
003. INPUT SELECT RGB(*5) 02H 03H 00H 00H 02H 01H <DATA> CKS
004. INPUT SELECT VIDEO 02H 03H 00H 00H 02H 01H 06H 0EH
005. INPUT SELECT S-VIDEO 02H 03H 00H 00H 02H 01H 0BH 13H
006. PICTURE MUTE ON 02H 10H 00H 00H 00H 12H
007. PICTURE MUTE OFF 02H 11H 00H 00H 00H 13H
008. SOUND MUTE ON 02H 12H 00H 00H 00H 14H
009. SOUND MUTE OFF 02H 13H 00H 00H 00H 15H
010. ONSCREEN MUTE ON 02H 14H 00H 00H 00H 16H
011. LAMP INFORMATION REQUEST 03H 8CH 00H 00H 00H 8FH
012. MUTE CONTROL 02H 1AH 00H 00H 02H <DATA> CKS
013. VOLUME ADJUST 03H 10H 00H 00H 05H 05H <DATA> CKS
014. BASE MODEL TYPE REQUEST 00H BFH 00H 00H 01H 00H CKS
015. PROJECTOR INFORMATION REQUEST 00H BFH 00H 00H 01H 02H CKS
And also here you got the communication settings:
Baud rate: 19200 bps
Data length: 8 bits
Parity bit: No parity
Stop bits: 1 bit
Communications mode: Full duplex
For the moment I've wroten a few orders:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. mscomm1.commport = 1
  2. mscomm1.settings = "19200,n,8,1"
  3. mscomm1.portopen = true
  4. mscomm1.output = "h03 8C 00 00 00 8F"

I don't really know much from vb6, I just started with this project, also controling AOI (automatical optical inspection), few weeks ago with no idea about vb6, neither others.
Can someone help me?
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 8
Reputation: sugarboy rider is an unknown quantity at this point 
Solved Threads: 0
sugarboy rider sugarboy rider is offline Offline
Newbie Poster

Re: serial comunication with a projector

 
0
  #2
Oct 4th, 2006
Does no one can helpe me? I hope someone with serial port communication knowledge could help me.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: serial comunication with a projector

 
1
  #3
Oct 4th, 2006
Is this in XP (there has a been a few threads going around about problems with reading/writing serial ports in XP with VB). Also, I'm not sure if the output is supposed to be a string, or if it's supposed to be those values in hex.....
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 8
Reputation: sugarboy rider is an unknown quantity at this point 
Solved Threads: 0
sugarboy rider sugarboy rider is offline Offline
Newbie Poster

Re: serial comunication with a projector

 
0
  #4
Oct 5th, 2006
Yes it is in windows XP professional
I've tried more things in the while I have no answer and I've sent the message in different ways
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. MSComm1.Output = "038C0000008F"
  2. MSComm1.Output = "000000111000110000000000000000000000000010001111"
  3. MSComm1.Output = &H038C0000008F"
  4.  
but none of them have worked.
Is there anyway to check my port is working properly?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 32
Reputation: Marikanna is an unknown quantity at this point 
Solved Threads: 1
Marikanna Marikanna is offline Offline
Light Poster

Re: serial comunication with a projector

 
2
  #5
Oct 5th, 2006
Hi,

Give this a try. Call the PowerOff function from a button_onlclick instead of onload.

mscomm1.RThreshold = 34
mscomm1.commport = 1
mscomm1.settings = "19200,n,8,1"
mscomm1.portopen = true


Public Sub PowerOff()
On Error Resume Next

Dim bytes(5) As Byte

bytes(0) = "&H" & 02
bytes(1) = "&H" & 01
bytes(2) = "&H" & 00
bytes(3) = "&H" & 00
bytes(4) = "&H" & 00
bytes(5) = "&H" & 03

MSComm1.Output = bytes


End Sub

Private Sub MSComm1_OnComm()

On Error Resume Next

If MSComm1.CommEvent = comEvReceive Then

msgbox MSComm1.Input

End If

End Sub

Try using this software to monitor the port "http://www.hhdsoftware.com/Family/serial-monitor.html"


Regards
Marikanna
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 8
Reputation: sugarboy rider is an unknown quantity at this point 
Solved Threads: 0
sugarboy rider sugarboy rider is offline Offline
Newbie Poster

Re: serial comunication with a projector

 
0
  #6
Oct 9th, 2006
SUCCESS. It has worked out. Thanks a lot Marikanna. What is the code alone itself is working propperly, at least the output, with the input doesn't work as I want but I'll make some other tryes to improve it. I think the rest is just working on development and go on, so if I have no other relevant problems I think soon it will be perfectly solved. Thanks once again Marikanna.

Neil
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 8
Reputation: sugarboy rider is an unknown quantity at this point 
Solved Threads: 0
sugarboy rider sugarboy rider is offline Offline
Newbie Poster

Re: serial comunication with a projector

 
0
  #7
Oct 10th, 2006
I've tried some other things in my old code and I realise that the clue was just the byte sending.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. dim array(n) as byte
  2.  
  3. array (0) = &HXX
  4. array (1) = &HXX
  5. ....
  6. array (n-1) = &HXX
  7. array (n) = &HXX
  8.  
  9. MSComm1.Output = array

thanks to anyone that has read and think about my problem, I'm not the best to do it but if someone needs my help I'll be pleased to serve.

Neil
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC