Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Bug Reports
 PowerHome Messageboard : PowerHome Bug Reports
Subject Topic: COM Problem? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 13 2005 at 22:27 | IP Logged Quote TonyNo

Can someone confirm that the ph_com commands work with COM ports >5?

Edited by TonyNo
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: November 14 2005 at 02:25 | IP Logged Quote krommetje

TonyNo wrote:
Can someone confirm that the ph_com commands work with COM ports >5?


been having the same problem but thought nothing of it because lots of software can't deal with comports > 5
But since you've started this I would like to submit this to Dave as a part of the next beta wishlist...

support for comports > 5

Peter
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 14 2005 at 21:21 | IP Logged Quote TonyNo

OK, something strange is going on...

I changed the port to COM2, and it still does not work. Using HyperTerminal works fine.

First I do this...
Code:
ph_comopen( 3, 2, 9600, "N", 8, 1, 1, 0, 0, 1, 0, 1, 1, "?", "CID2" )


Which returns 0, then I do this...

Code:
ph_comsendstring( 3, "@01" )


Which returns 0, but does not actually send any data.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 15 2005 at 20:30 | IP Logged Quote dhoward

Tony and Peter,

I reviewed the ph_com code and you should be able to use any valid COM port number (I believe COM256 is the max). However, it's got to be a COM port that the Microsoft COMM control recognizes. It seems that depending upon the port, the MS Comm Control sometimes cant see it.

Tony, this looks like your CID functionality. Was it working and suddenly stopped? Based upon your above pasted code, I don't see any problems and it looks as if it should work. Have you done any further testing?

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 16 2005 at 22:11 | IP Logged Quote TonyNo

I added a quad mux for my cams and it has a serial port for control, so I added a USB-232 adapter. It's one-way comms, so I just left that CID macro ID in there since I copied the ph_comopen from the CID stuff.

I started with it on COM6 then moved it to COM2.

What else can I try?

Edited by TonyNo
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 24 2005 at 07:42 | IP Logged Quote TonyNo

Bump.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 24 2005 at 12:21 | IP Logged Quote dhoward

Tony,

Oopps, sorry Tony .

Im not sure if I remember or not, but have you written stuff in VB using the Microsoft VB6 COMM control in the past?

If so, do you think you might be able to setup a quick test and determine if it truly is a problem with the Microsoft COMM control. My best guess (based upon past experience) is that the MS control cant always see some USB to 232 adaptors. I had one that was not recognizable (cant remember the brand, but took it back). Got a different brand, and this one I can see.

PS...Ive been tracking the thread between you and Peter on the Weather Underground macro. You are going to love the next beta since Ive gone ahead and included some new functions that allow you to do this type of HTML parsing a lot easier (including regular expressions .

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 24 2005 at 15:00 | IP Logged Quote TonyNo

Yeah, I have written VB6 comm stuff, but...

This one of two Radio Shack USB/232 units I have. The first one is for my W800.

Parsing and reg ex? Cool!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 28 2005 at 20:00 | IP Logged Quote dhoward

Hmmm...

It works using HyperTerminal and you have another one just like it currently running your W800. So that would rule out a bad unit and the Microsoft COMM Control. Im stumped.

You say that when you execute the ph_comsendstring(3,"@01") function you get a 0 but no data is actually sent. How are you monitoring the actual data? Are you able to send other strings to verify that nothing is getting out at all?

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 28 2005 at 20:26 | IP Logged Quote TonyNo

Correct. I do the ph_comsendstring(3,"@01"), get a 0, and the mux should switch to input number one, but it does not. Firing up Hyperterm and typing "@01" switches it.

Other commands I've tried: @MU, @22. I'll try some others tonight.

Maybe the "@xx" is killing it?

Also, if I try to open the port without the USB/232 connected, it bombs, so it is seeing it when it's there.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 28 2005 at 20:56 | IP Logged Quote TonyNo

I just tried other commands and other COM control numbers with no luck. I even tried to disable RTS and DTR (just to see).

Could there be a problem specifying a macro that is already being called for characters received from another COM port?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 28 2005 at 23:22 | IP Logged Quote dhoward

Tony,

Should be no problem to call the same macro from multiple COM controls. The macro ID is just a stored string that ultimately is just passed to a ph_macro function.

Im just wondering if the @ symbol is causing problems (it shouldnt, but what do I know ). Try escaping it with \064. So your formula would be:

ph_comsendstring(3,"\06401")

Let me know,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: November 29 2005 at 07:58 | IP Logged Quote TonyNo

Ratsa frasta grumble...

It was a speed issue! Sending the string was too fast for the mux. Adding an intercharacter delay of 25ms fixed it.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 02 2005 at 22:15 | IP Logged Quote dhoward

Aggghhh...Bad Tony .

Made me think I had some wierd bug.

Well Im glad it's working for you now .

Dave.


Edited by dhoward
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 03 2005 at 08:18 | IP Logged Quote TonyNo

Yeah, sorry! When the "\064" didn't fix it I got irritated and thought harder!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum