|
Two questions:
1) Where is your data coming from?
2) Is your hard drive physically capable of that data rate?
|
|
|
|
|
1.) the data is coming from a DAQ Board
2.) I dont know the datarate of the hard drive.
Is there a way to do this without using the harddrive?
Thanks
|
|
|
|
|
godspeed123 wrote: Is there a way to do this without using the harddrive?
Not and keep your "I am trying to write this into the harddrive so that I can do some post processing after all the data is written to a file." requirement.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks for the response.
So that means I am screwed, lol. Is there any other approach that I can use to get around this, even if it means rewriting all the code.
|
|
|
|
|
Hello,
Are you saying 3MB x 100 times/second = 300MegaByte/sec? If this is the case, you need some special hard drives, i.e. SAS or SCSI 15K rpm, in RAID 0 with 4 or 6 such drives. Then it may be possible to capture data without lose.
Conventional single 7.2K rpm desktop drives only can maintain ~50MegaByte/sec and you need to pay attention on that.
Hope it helps.
|
|
|
|
|
We too ran into a similar problem. We are streaming video over USB 2.0 from a cell phone to a PC as the device plays a video or pans with camera. We ran into a problem where the system could not keep up. So we tried using a memory mapped file instead of using the old standard CreateFile() and WriteFile(). That did speed things up to where we could capture data at 40 frames a second but we still have an issue at 80 fps.
|
|
|
|
|
Hmmm my stuff is coming in at about 100 times a second, I will give it a shot, but as you guys did I'm sure I will hit the same pitfalls. Is there anything else you tried that worked?
Thanks again.
|
|
|
|
|
No. That's the best solution we found for speed.
|
|
|
|
|
godspeed123 wrote: I have about 3 Megs of data coming in at intervals of about 100 times a second.
You are receiving 300MB of data every second? I'm not sure of any HD that can write that fast.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I think by 3 Megs, he means 3 MB.
Shog on learning VB6: Ah, that would have been VB6. Kicked my ass anyway. So easy to learn, just like falling down a flight of stairs...
|
|
|
|
|
brahmma wrote: I think by 3 Megs, he means 3 MB.
No kidding. I've never known "megs" to mean anything other than MB.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: You are receiving 300MB of data every second? I'm not sure of any HD that can write that fast.
The above quote is from your previous post. I did not reply to tell megs is MB, but I said the OP meant 3MB and not 300 MB.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
brahmma wrote: ...the OP meant 3MB and not 300 MB.
Last time I checked, 3MB 100 times per second was equal to 300MB per second.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
What I understood from the original post was, the total amount of data received is 3MB every second, and is not received at a shot, but is received in 100 intervals.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
A standard hard drive maximum write speed is theoretically 12.5 MBs per second (Megabytes, not Megabits) if I remember correctly.
Even if you had a 15,000 RPM SATA, SAS, or SCSI you probably won't see over 20-30 MB/s.
You will need to have a RAID 5 or better of at least 10 high-performance drives to handle all this data, but even that would probably barely do it.
The other option is to install GBs upon GBs of RAM and just Queue it all up like you've been doing. You're not going to get 1-2 hours of data, though, at all on your current setup. You'll have to read for 5 minutes, wait until the Queue is empty, and then collect more data.
That's the only solution I can think of, and it's merely a money issue. Fast storage is expensive.
|
|
|
|
|
I cannot understand what the problem is with this code and why I get this error:
error C2621: union 'EntryInfoUnion' : member 'strInfoStruct' has copy constructor
struct floatInfoStruct
{
float min;
float max;
float* result;
float test;
};
struct intInfoStruct
{
int min;
int max;
int* result;
int test;
};
struct timeInfoStruct
{
SECONDS min;
SECONDS max;
SECONDS *result;
TimeFormats Format;
SECONDS test;
};
struct angleInfoStruct
{
DEGREES *result;
DEGREES test;
};
struct latlonInfoStruct
{
LAT_DEGREES *lat_result;
LON_DEGREES *lon_result;
LAT_DEGREES lat_test;
LON_DEGREES lon_test;
};
struct baroInfoStruct
{
float min;
float max;
float *result;
float test;
};
struct strInfoStruct
{
CString min;
CString max;
CString *result;
CString test;
};
union EntryInfoUnion
{
floatInfoStruct floatInfo;
intInfoStruct intInfo;
timeInfoStruct timeInfo;
angleInfoStruct angleInfo;
latlonInfoStruct latlonInfo;
baroInfoStruct baroInfo;
strInfoStruct strInfo;
};
What does the error message (union 'EntryInfoUnion' : member 'strInfoStruct' has copy constructor) trying to tell me.
I just don't see the problem with the code snippet.
Thanks.
John P.
|
|
|
|
|
jparken wrote: union EntryInfoUnion
{
...
strInfoStruct strInfo;
};
Union members are not allowed to have (copy) constructors.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
David, maybe I can't see the forest for the trees. What is the difference between, say, "floatInfoStruct floatInfo;", and "strInfoStruct strInfo;" being part of the union and causing the 'copy constructor' error?
Can you explain this in more detail, please?
Thank you.
John P.
|
|
|
|
|
In other words you can not use a CString in a union since they have copy constructors in them. Try just using a char[] instead.
|
|
|
|
|
Dustin --- thanks for the response. I just now saw the forest for the trees as you were answering. Sometimes the obvious is too obvious --- like hiding in plain sight.
Thanks again.
John P.
|
|
|
|
|
I'm currently working on a program that was orginall written in VC6, I ported it to VS2K3 and got all of the features to work. Now I'm trying to get it compile in VS2k5 and have done so but I keep getting this strange error.
I have a edit box and a slider box, either one can be used, to enter a floating value between 0 and 1. When you try to select either a message pops up saying "Please enter a value between 0 and 1000" and you are not able to change any values before this message pops up, and then a debug assertion error is given.
I have checked over all the math and it remains the same as the VC++6.0 and VS2003 that both work, and the only part of the code that was changed was when some pow() functions where used to solve and problem with ambiguity.
Any ideas on how to fix this or and idea of where I should be looking to resolve this problem
Thanks
Simon
|
|
|
|
|
simoncoul wrote: message pops up saying "Please enter a value between 0 and 1000"
Sounds like a DDV_* function, check out the DoDataExchange() function.
simoncoul wrote: and then a debug assertion error is given
That assertion will tell you exactly what is wrong. Use the debugger and look at the call stack to find the point in your code where the error is.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Thank you very much for the quick response! These are the values that I have for my DDV & DDX
DDV_MinMaxFloat(pDX, m_dradix, 0.f, 1000.f);
DDX_Text(pDX, IDC_EDITX, m_editx);
DDV_MinMaxFloat(pDX, m_editx, 0.f, 1.f);
DDX_Text(pDX, IDC_EDITY, m_edity);
DDV_MinMaxFloat(pDX, m_edity, 0.f, 1.f);
DDX_Text(pDX, IDC_EDITL, m_editl);
I checked out the assertion and it points me to this:
void CLayerDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
switch(pScrollBar->GetDlgCtrlID() ){
case IDC_SLIDERL:
if (m_sliderl == nPos)
break;
UpdateData(CTRL2VAR);
if (m_sliderl < SLIDERLMIN)
m_sliderl = SLIDERLMIN;
m_editl = (float)m_sliderl*5.0;
UpdateData(VAR2CTRL);
break;
case IDC_SLIDERX:
if (m_sliderx == nPos)
break;
UpdateData(CTRL2VAR);
****** m_editx = (float)m_sliderx/100.0;
UpdateData(VAR2CTRL);
break;
case IDC_SLIDERY:
if (m_slidery == nPos)
break;
UpdateData(CTRL2VAR);
****** m_edity = (float)m_slidery/100.0;
UpdateData(VAR2CTRL);
break;
}
CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
}
At the point where I put the stars is where the assertion points me to. I think that my problem is the variable "m_dradix" from above as the values of m_editx and m_edity into a function that uses this variable. Is there are way I can track this variable through out the whole process to see what happens to it's value, I cannot figure out how to do it in 2k5?
Thanks again
Simon
|
|
|
|
|
Using UpdateData() with data validators isn't going to work unless you ensure the controls
and their corresponding data member variables contain valid values.
It may be best to update the relevent controls directly during a slider scroll instead of
relying on DDX to do it.
An explanation of some pifalls with UpdateData can be found in this essay:
Joseph Newcomer: Avoiding UpdateData[^]
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I'm sure that it is not the UpdateData that is causing the problem, something has changed in that way it is handling the math, does anyone know of a page that talks about how the math functions have changed from 2003 to 2005?
Thanks
|
|
|
|