Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: k8000 help Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
lantic
Newbie
Newbie


Joined: August 31 2005
Location: Belgium
Online Status: Offline
Posts: 7
Posted: September 01 2005 at 10:47 | IP Logged Quote lantic

i'm totally in the mist, getting my k8000 board going through PH.
the board works fine from the k8000 i/o test software.

But from within PH, the dig. inputs are read very slow. (+/-30sec)
I can't manage to switch a dig. output.

can anyone help me getting past these initial probs?
Back to Top View lantic's Profile Search for other posts by lantic
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: September 02 2005 at 13:43 | IP Logged Quote dhoward

Lantic,

What OS are you using? What are your configuration settings for the K8000 in the pwrhome.ini file?

Once I know how you're setup, we should be able to get you going shortly.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
lantic
Newbie
Newbie


Joined: August 31 2005
Location: Belgium
Online Status: Offline
Posts: 7
Posted: September 02 2005 at 17:42 | IP Logged Quote lantic

Dave,

I'm using windows ME.
The configuration settings for the K8000 in the pwrhome.ini are:

[K8000_1]
Boards=1
DIOConfig0=0
DIOConfig1=0
DIOConfig2=0
DIOConfig3=0
DIOConfig4=0
DIOConfig5=0
DIOConfig6=0
DIOConfig7=0
PollInterval=0.25
AnalogPollFactor=40
I2CDelay=0

[OTHER]
OTHERCONTROLLER1=1
OTHERCONTROLLER2=0
OTHERCONTROLLER3=0
OTHERCONTROLLER4=0
OTHERCONTROLLER5=0
OTHERPORT1=632
OTHERPORT2=0
OTHERPORT3=0
OTHERPORT4=0
OTHERPORT5=0

thank you.
Back to Top View lantic's Profile Search for other posts by lantic
 
lantic
Newbie
Newbie


Joined: August 31 2005
Location: Belgium
Online Status: Offline
Posts: 7
Posted: September 04 2005 at 17:03 | IP Logged Quote lantic

Dave,

The dig. inputs are now read in fast enough. I changed the pollinterval to 0,25 (iso 0.25)
Seems like the comma was not working on my system.

But still i'm not past all my probs:
For some reason i can only make outputs 1 & 9 high.
This is (unit0,point1) and (unit0,point9)

Any idea?

Regards.
Back to Top View lantic's Profile Search for other posts by lantic
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: September 05 2005 at 17:07 | IP Logged Quote dhoward

Lantic,

Sorry to take so long responding .

Anyways, looking at your INI configuration, you've got your K8000 set to be all inputs. This is determined by the DIOConfig0 and DIOConfig1 parameters. You should set each of these parameters to a number from 0 to 255. Each bit represents a point (input or output) with inputs set to 0 and outputs set as 1. So if you wanted to set points 1 thru 3 as output and points 4 thru 16 as input, your settings would be:

DIOConfig0 = 7
DIOConfig1 = 0

Concerning the digital input read speed. Yes, I did find that in the U.K., you need to use the comma instead of period for fractionals. You should be able to set the pollinterval to 0,10 so that you can read the inputs 10 times per second with no slowdown in system performance.

Im pasting a copy and paste of an email to another K8000 user below that may help with additional questions.

>>>>>>>>>>>>>>> >>>>>>>>>>>>>

First...In the PowerHome Explorer, under Setup->Controllers->Other, you'll be able to tell PowerHome that you're using a K8000. Select the controller num (most likely will be 1) that you want to assign to the K8000 and then select the appropriate parallel port address. At this point, go ahead and exit PowerHome and open the pwrhome.ini file. There are some changes that will have to be made manually.

In the pwrhome.ini file, locate the [K8000_1] section. If you set your K8000 to be Other Controller 1, then we'll edit this section. If you set the controller number as 2, 3, 4, or 5, then you'll need to copy and paste the entire [K8000_1] section and rename the section to match the controller number you used ([K8000_2], [K8000_3], etc).

Set the "Boards" parameter to the number of K8000 units you've got chained together. If I interpreted your website correctly, this will be 3.

"DIOConfig0" thru "DIOConfig7" correspond to the 8 Digital I/O chips on up to 4 chained K8000 units. You'll set each of these parameters to a number from 0 to 255 telling PowerHome which points are inputs and outputs. "DIOConfig0" and "DIOConfig1" correspond to K8000 board 1 (I/O points 1 to 16). A digital input equates to 0 and digital output equates to 1. Point 1 is bit 1 in DIOConfig0 (2^0). Point 2 is bit2 in DIOConfig0 (2^1). Point 9 is bit 1 in DIOConfig1, etc. So if you've got points 1, 2, 3, and 4 as Digital output and points 5 to 16 as digital input, your settings will be: DIOConfig0=15 and DIOConfig1=0. Unused boards should be set to 0.

The "PollInterval" is the time in seconds that you wish for digital inputs to be scanned. Setting this value to 0.10 will cause the digital inputs to be scanned 10 times per second. Set this value to 0 if you don't want the inputs automatically scanned.

The "AnalogPollFactor" is how often to scan the Analog inputs and is tied directly to the "PollFactor". If you set this value to 10, then the analog inputs will be scanned every 10th time the digital inputs are scanned. In our previous example, if the "PollInterval" is 0.10, then an "AnalogPollFactor" of 20 will cause the Analog inputs to be scanned every 2 seconds. Set this value to 0 to not have the analog inputs automatically scanned.

The last parameter is the "I2CDelay". You should be safe leaving this value at 0 so that the I2C bus is communicated with at max speed.

Once editing the pwrhome.ini file is complete, save and relaunch PowerHome. Open the Explorer and you'll see a couple of new sections: Digital I/O and Analog I/O. At this point, you don't have to configure anything and can use the ph_getotherdigital and ph_getotheranalog functions to retrieve digital I/O and analog I/O values. You can use the ph_setotherdigitalout and ph_setotheranalogout functions to set these values. The ph_getotherdigital function takes three parameters. The first is the controller number. If you set your K8000 to be Other Controller 1, then this value will be 1. The second parameter is the unit number. On digital I/O on the K8000, this will always be 0. The last parameter is the point and will be from 1 to 64 for up to 4 chained K8000 units. The ph_getotheranalog takes three parameters as well. The first is the controller, the second is the unit. On the K8000, for analog you'll use a value of 0 for the 6 bit analog outputs. You'll use a value of 1 for the 8 bit precision analog output. You'll use a value of 2 for the analog inputs. The last parameter is the point. For the 6 bit analog outputs, this will be from 1 to 32. For the 8 bit analog output, this will be from 1 to 4. For the analog inputs, this will be from 1 to 16.

Under the triggers section, you'll find 4 new triggers...Digital Input, Digital Output, Analog Input, and Analog Output. In order for any of the triggers to be fired, you MUST declare the points in the Digital I/O and Analog I/O sections of the Explorer. The Digital I/O section should be pretty much self-explanatory and includes a Digital Types section similar to the X-10 Types screen. You'll set up the individual digital types first and then declare the actual Digital I/O points using the same conventions for Controller, Unit, Point that was explained for the ph_getother functions. Once your points are defined, do a reinitialize and then open the new Device Status screen. You'll see your points reflected here and updated in real time. You'll also be able to control the points from this screen.

The Analog I/O screen should also be self-explanatory except for the "Message", "Calculated to Raw Formula", and "Raw to Calculated Formula" fields. You'll define the Controller, Unit, and Point using the same conventions detailed for the ph_getother function. If you look at the Device Status Screen, you'll see to the far left a status message for the current status of points. With Analog, it's a little more complicated and you'll see that there isnt an Analog Types screen and this data is included in the Analog I/O screen. The "Raw" data of an analog point is a value typically from 0 to 255. This "raw" value is usually not the best way to present the data to the user. This is where the "Raw to Calculated Formula" and "Calculated to Raw Formula" fields come into play. These fields allow you to define a PowerHome formula that converts the "raw" value to a "calculated" value and vice versus. The "raw" value and "calculated" value in each formula is represented by a special system variable symbolized by [DATA]. So, if we have a 6 bit analog output which accepts "raw" values from 0 to 63, we can create a formula that will display this range as volts from 0 to 5. This formula would be: round([DATA] / 63 * 5,2). This will convert a raw value of 0 to 63 to 0 to 5. We'll also need the inverse formula to convert "calculated" values back to "raw" values. For the above example, this would be: int([DATA] / 5 * 63). In the Device Status screen, the "Calculated" value is displayed with the "Message" field appended to it. When making changes to analog outputs from the Device Status screen, calculated values are what are accepted instead of raw values. If you wish to only deal with raw values, leave the formula fields blank or simply place use a formula of: [DATA] so no translation occurs.

Once you've declared your Digital I/O's and Analog I/O's, you'll then be able to create triggers.

Last, there are also some new functions. These are ph_getdigital, ph_getanalog, ph_setdigitalout, and ph_setanalogout. These are similar to their ph_setother?? and ph_getother?? counterparts but instead use the defined ID's of the points rather than the raw controller, unit, point definitions. Consequently, they only work with points that you've defined in the Digital I/O and Analog I/O screens. The ph_getdigital and ph_getanalog functions each take a single string parameter corresponding to the ID of the requested point. The ph_getanalog function returns the "calculated" value (the ph_getotheranalog function returns the "raw" value). The ph_setdigitalout and ph_setanalogout functions each take two parameters. The first is the string "ID" of the point and the second is an integer of either 0 or 1 for the digital and a STRING of a CALCULATED value for the analog.

Hope this helps and if you have any questions, just let me know,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
lantic
Newbie
Newbie


Joined: August 31 2005
Location: Belgium
Online Status: Offline
Posts: 7
Posted: September 07 2005 at 00:39 | IP Logged Quote lantic

that's it !
thank you.

lantic
Back to Top View lantic's Profile Search for other posts by lantic
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: September 07 2005 at 22:03 | IP Logged Quote dhoward

No problem. Just let me know if you have any other questions.

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

Joined: April 20 2006
Location: Sweden
Online Status: Offline
Posts: 2
Posted: April 20 2006 at 06:58 | IP Logged Quote werkall

I have a question.
i have programmed the pwrhome.ini as you told the other guy, but after that im lost, i cant find anything of those other configurations. i use the k8000 and ph for a school project that is due tomorrow friday, i also use a homemade ir receiver and a pinnacle remote. This maybe a bit late. if you have MSN i would be very happy if you could add me and help me with this. best regards. Jimmy the swede

Edited by werkall - April 21 2006 at 04:35
Back to Top View werkall's Profile Search for other posts by werkall
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: April 21 2006 at 21:42 | IP Logged Quote dhoward

Jimmy,

Sorry to take so long in responding to your post. Im not on MSN but I believe I have an AIM account. An alternative may be to try the chat on the PowerHome main page. However, I don't think I would be available until tomorrow sometime (Saturday). Not sure if you're still interested, but if you are, let me know and we can set something up.

If you're using the K8000 and this is just a temporary project, I would probably suggest using PowerHome version 1.03.4.4. Not sure what version you currently have but if you're using 1.03.4.7, then none of the current instructions will match (1.03.4.7 does not use the INI file and this may be your problem).

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

Joined: April 20 2006
Location: Sweden
Online Status: Offline
Posts: 2
Posted: April 23 2006 at 05:01 | IP Logged Quote werkall

aah that may be my problem, i will try this the next time i work with the project, we will have more time to work with it in the future. thanks for your time and i'll let you know if i get it to work or need more help best regards / Jimmy the swede
Back to Top View werkall's Profile Search for other posts by werkall
 

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