Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: COM Num *NOT* Com Port Question Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: March 20 2012 at 03:34 | IP Logged Quote smarty

I have a question about the number of open serial connections I can have at any one time. I know Dave has been rewriting some of the serial control code such that the COMPORT number is be higher than just 8 or 16 (whatever the previos MSCOMM32 limit was). See below.

However, when performing the ph_comopen() command, is the "comnum" still limited to 1-5 as valid values? I thought Dave answered this question previously (again, see below), but when I try this with COMNUM values greater than 5, I recieve an error.

To me, it looks like only a maximum of 5 serial connections can be active at any one time

******************

ph_comopen ( comnum, comport, bps, parity, databits, stopbits, rthreshold, sthreshold, handshaking, inputmode, nulldiscard, rtsenable, dtrenable, parityreplace, id )
Argument Description
comnum The number of the COM control you are referencing. Valid values are 1 thru 5.
comport The COM port you wish to open. Typically a number from 1 to 8 but can be higher.

********************

smarty wrote:
dhoward wrote:
Some more info...

The Insteon PLM, UPB PIM, and Global Cache IRE/IRL controllers have all been updated to use a new serial port control. This control allows you to use ports from 1 to 256. The other serial controllers (CPU-XA/Ocelot already done) will be updated to use this control in future beta's.



A couple of question concering serial port control....
1)From the quote above, it looks like the the COMM numbering issue described here Link is now a thing of the past. Should I remove the modified MSCOMM32.ocx file that I placed in the win32 directory, or should I leave it alone?

2) Has the number of available number COM controls increased? Prior version allowed for a maximum of 5 open com controls (1-5). If you had more than 5 serial devices, you would have to share the 5 controls through some open/close methodology.


dhoward wrote:
Smarty,

If you were ONLY using the modified MSCOMM32.OCX for one of the listed controllers that have already been converted, then you are safe with replacing it with the Microsoft original (the MSCOMM32 is still used for plugins and other controllers that have not yet been converted). I am working on converting ALL controllers and plugins to use the new serial control so soon we will no longer need MSCOMM32 at all.

You can pretty much run as many serial devices as you like. Nothing in PowerHome limits you to 5 and you can have as many open serial connections as the OS allows.

Dave.


__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: March 22 2012 at 15:57 | IP Logged Quote dhoward

Smarty,

The internal COMM controls havent really changed. There is currently a limit of 5 individual COMM controls which should not be confused with the COM port number that each control can be assigned to. I will changing the internal control from using the Microsoft COMM control which as the limit of COM port numbers 1 thru 16 to the new Eltima COMM control which PH has licensed and can have COM port numbers from 1 to 256 (or more). However, its unlikely that I will be changing the number of individual COMM controls from 5.

A better option for those who need more than 5 COMM controls (or more functionality/flexibility) would be to use the PH_COMM plugin for PowerHome. You could conceivable add as many PH_COMM plugins as memory would allow (you could essentially have one for every COM port in your system). The current problem with the PH_COMM plugin is that it also uses the Microsoft MSCOMM control so has the limitation of supporting COM port numbers 1 thru 16.

However, I'll do some work on the PH_COMM control this weekend and upgrade it to use the Eltima COMM control so you won't have the 1 thru 16 limit. As long as you're running the beta (which includes the Eltima control) then you should be able to use the new plugin when I release it (hopefully this weekend) and add a plugin reference for every COM port you'd like.

Let me know if you think that would work for you.

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

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: March 22 2012 at 16:03 | IP Logged Quote dhoward

Smarty,

To add to my post above...

The quote I made about nothing in PowerHome limiting you to 5 was primarily referring to using the PH_COMM plugin. The internal COMM control is indeed limited to 5 due to resources, etc. The PH_COMM plugin is similar to the internal COMM but each plugin runs in its own thread so we don't have single thread resource issues and you can have as many as you want.

Since you already have the modified MSCOMM32.OCX, the PH_COMM plugin will use and you won't have the 1 thru 16 limit. However, after this weekend, you wouldnt need the modified MSCOMM32.OCX as I'll have the PH_COMM updated to use the Eltima control.

Hope this helps,

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

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: March 25 2012 at 20:42 | IP Logged Quote dhoward

Smarty and Pete,

Below is the link to a zip file containing new versions of both the Caller ID plugin and the COMM plugin. Both use the new Eltima control so won't have the COM port limit of 16. Give it a try and let me know.

Pete, I know you've been having issues with the CID plugin locking up on you so if you could try this out and let me know, that'd be great.

These new plugin versions will be included in the next beta. Also, if anyone wants to upgrade to these, you must be on the 2.1.4 beta.

Dave.

http://power-home.com/download/CID_COMM.zip
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: March 27 2012 at 08:28 | IP Logged Quote BeachBum

Thanks Dave ……

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: March 29 2012 at 07:32 | IP Logged Quote smarty

Yes, thank you. Been on 3 continents in three weeks....will try this
soon.

__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: April 09 2012 at 10:45 | IP Logged Quote smarty

Dave, Thanks for the extremely through and informative reply. Your comments now make sense to me in light of the Eltima PH plugin option you describe.

I have had very good luck controlling devices using PH's built in COM controls (1-5). If and when one of these COM controls does misbehave, I have been able to close and reopen the COM control to "clear" it.

If I go the route of setting up COM plugins, what sort of "tools" are there so that if one misbehaves, how can I "reset" it?

For example, when PH starts up and the PHCOM plugins load up, you can see the newly created virtual COM devices in the windows hardware device manager. When PH closes, these virtual com devices still exist (they don't terminate when PH does - because they run in their own thread I guess?). If PH was to be re-started, does this re-starting act trash the existing virtual COMs?   If these COMs ever do become flaky, how might they be reset/cleared from within PH? What tools/controls are there for the Eltima COMs either from within PH or outside of PH?

I did read over the help file and see the "ph_picmd" for this (but I still need to digest it and try it out).


__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 

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