C++ :: Energy Meter Using Modscan

Mar 26, 2013

I'm using an mbed micro-controller to retrieve register from Integra 1630 energy meter with modbus via a SIPEX SP485CS chip (RS485 level shiftier).

All the component and connection are working correctly.(Double checked) Using the same program with different reigster, i'm able to get good modbus reply from other type of energy meter with modbus. I always a register of 0x00 instead of good modbus reply.

#include "mbed.h"
Serial RS485(p28,p27);
DigitalOut ho(p26);
int regvalue[9];
int main()

[code]....

View 1 Replies


ADVERTISEMENT

C++ :: Analyze And Elaborate Data From Particle Energy Measurements

Oct 13, 2013

I have to analyze and elaborate datas from particle energy measurements. I have a file txt like this

1 126 17 20 23 32 39 55 68 81 98 111 129 141 151 164 170 182 180 183 187 187 181 186 178 174 175 172 163 159 155 147 140 138 128 122 105 100 99 87 80 66 59 55 48 42 40 33 31 25 25 22 19 19 18 15 15 16 15 16 15 13 13 14 14 14 14 13 13 14 14 13 15 15 14 15 14 14 13 12 13 14 13 14 14 14 13 14 14 13 12 13 13 13 13 14 13 13 13 13 14 14 14 13 13 14 14 14 12 12 13 12 13 11 12 13 12 13 14 12 12 12 11 13 12 13 13 15

2 124 20 34 9 34 51 50 61 76 71 69 95 99 108 103 101 95 89 117 98 107 76 86 66 97 97 80 17 54 45 44 39 40 18 13 29 20 16 15 15 16 14 15 16 16 15 15 14 13 12 14 14 14 12 14 13 12 15 12 12 14 14 11 12 12 14 12 12 13 12 12 13 12 12 12 13 12 13 13 13 12 14 12 12 13 10 12 13 12 13 13 13 12 12 12 13 12 12 13 12 10 15 13 13 12 14 12 12 14 12 12 13 13 13 12 12 12 11 11 13 14 12 12 12 13

The first two numbers are the Particle ID and its Energy, the rest of numbers are the loss of energy(different in number for every particle).

I have to elaborate 1000 events like this and to create a function able to read every line and to count the number of the loss energy measurement.

I use ifstream to read a file text, but my problem is: my program how to understand that it's passing to the new line? I have to divided every events in Arrays of different length, so i have to count each data for every particle and then create the array.

The instruction EOF it's not good...

View 5 Replies View Related

C/C++ :: Flow Meter - Count Certain Quantity Of Fluid Then Light Up Corresponding LED

May 6, 2014

I am attempting to write some code for a flow meter and LEDs using my Arduino. I need the flow meter to count a certain quantity of fluid, then light up an LED which corresponds to that quantity. I found this code on the internet and it was exactly what I needed but when I opened up the serial monitor to see if it worked it didn't. I have finally fixed the issue with it not counting anything at all, but it is still acting as if it was measuring the rate. how it counts and keeps track of how much fluid in total has passed through the flow meter ?

volatile int NbTopsFan; //variable to accumulate the number of pulses
float Calc = 0; //the volume flowed since measurement started, liters
void pulse() //This is the function that the interupt calls
int hallsensor = 2; //The pin location of the sensor

const int led1Pin = 3; //pin for LED corresponding to volume1
const int led2Pin = 4; //pin for LED corresponding to volume2

[Code] .....

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved