Knowledge Base

Knowledge Base
Subject: Modifying Power Consumption Report
Status Resolved
Product WireCAD v8
Product Level PRO
Database Type SQL Server
Build Number (last 4 digits of version) 1381
Upload  Download!

Message

Customer
I would like to setup my report so that it lists all the devices plugged into each individual Power Distribution / UPS (see spreadsheet attached). Right now I see with the template I am working with (Power Consumption Heat Load) I can edit the bindingsource to collect the data from a "User1" category and from there I went into my project Equipment Database and populated that "User1" column in a way that would group my devices. The thing I would like to do on top of this is to send the sum of that data to another group that would add on to it. Reason being, to show when a power strip or power distribution is being plugged into a surge protector or UPS. This way we can easily see if the equipment is within the limits of the circuit or battery backup power handling.

Also it would be nice to derive amperage from the power consumption. Any suggestions on how to go about this? Make a new parameter that divides by 120 of the power consumption?

Thanks,
Luke

19-August-2016 (03:29 PM)
Too... Many .... Questions.....
I think the Power Consumption report is doable if you somehow define the qrouping parameter. The running total can be done.
Deriving amperage from the power consumption by simply dividing by the voltage does not account for power factor but the calculation could be done.

Now the question really is can we do this without writing report scripts to handle the calculations and such? I don't know.

Can you send me a project with the grouped data and let me have a go at it?
22-August-2016 (07:21 PM)
Support
Customer
23-August-2016 (11:43 AM)
Customer
23-August-2016 (12:00 PM)
Customer
packed project zip file too large. sending via email.

Regarding the power factor. Let's define the power factor as .9 (for most equip. not including audio power amps and the like) if we set that so Amps = watts/.9/120
23-August-2016 (12:09 PM)
I peeked at the project and there are no sysnames in the equipment list.
I am looking for something with data that I can see what you are up to.
25-August-2016 (01:00 AM)
Support
Customer
Hmm I don't know why that is. This project's global database is on a SQL server, but the sysname data should be per project, correct? Take a look at the screen shot attached. You can see under the "User1" Column how I have everything grouped. Also in that zip folder is the Power Consumption report that I generated in PDF.
25-August-2016 (09:37 AM)
OK, obviously I didn't get that data. There are cables in the cables table so something very weird is going on here. But that aside; I looked at the screen grab and do not understand how you will distinguish the data by power-strip and port. I thought that was the intention. No?
25-August-2016 (12:08 PM)
Support
Customer
Very weird indeed. A couple strange things have been happening like that during this project. I have another ticket open from this same project about cable sys-names.

Yes that is the intention, is to separate what devices are going to what power distribution -> and then have which power distribution to which circuit.

What I was doing in the screen shot was grouping all the devices that would be powered from the dedicated 20A circuit provided to the equipment rack. In this case everything shown is under the group "Rack Equipment" except for a remote device that is getting PoE from OFE switch. This is not ideal because we would like to be able look at a report and now what devices are plugged into what power dist. / ups and be able to see the power draw from each power dist.

25-August-2016 (01:50 PM)
OK here is a first pass at this.
In your Equipment List user1 = power distribution unit name. User2 = Power Distribution Unit port number.

Unzip the file and put the two files (Power Distribution.repx and Power Distribution.xml in the path:
C:\users\public\documents\WireCAD\WireCAD8\Reports\Engineering Reports

Launch WireCAD, load your project with User1 and User2 filled in. Open the Power Distribution.repx from the Reports gallery.
26-August-2016 (12:22 AM)
Support
Customer
This looks good! Could you add an additional function to derive Volt-Amps for the Amps? (Volt-Amps = Amps * 120) I already added another function and tried adding in the script myself but am missing a line or two or doing something wrong because it is just reporting 0's. I sent it to you guys via email.

Also, would it be possible to auto populate the "User1" and "User2" columns? Maybe by using any Sysname Prefixes set to "PWR" or "UPS" or "PSU" and anything connected to those equipment blocks could populate "User1" Then using the cable destinations from the cable database you could populate "User2"?

26-August-2016 (12:53 PM)
You could create that function but it would always equal the power in watts since I = P/120 then I*120 = P. Here we are again trying to use Ohm's law on an AC circuit assuming a PF of 1.

Populating the User1 and User2 fields is a topic for another ticket. I am sure that an plugin or script could be written to your rules.
26-August-2016 (03:43 PM)
Support
Customer
The Volt-Amps would not be the same as Watts in this instance because we are assuming the PF is .9
26-August-2016 (04:20 PM)
Try this
26-August-2016 (07:30 PM)
Support
Customer
Ok, thanks. Is there any info / instruction about the script language for the reports? Is that the only environment where you can edit the functions?
29-August-2016 (10:56 AM)
The scripting language is C#. You can access the scripts for a report by clicking the Scripts button on the righthand side of the Designer tab.

Look at the scripts that have already been done for the report I sent you as well as the one for BOM with images and the resistor color code cable label.

As to the second question, we are parsing strings to numbers and then performing some custom calculation. This is the only place that we have that ability. Running totals and such can be done in the GUI once the calculations have been performed.
29-August-2016 (01:50 PM)
Support