12-13-2010 01:26 PM
Hi there!
I have a labview which measure electrocardiograph(ECG) waveform. I would like to send these waveform images to the web server website. So far, i am able to capture the image and store it as bmp file. Thus, may i know whats the next step on how to send this image over to a server website. The server i'm using is MySQL.
For my scenario, i need to record the patients ECG continuously. Thus, at certain timing or if theres any abnormalties found on the ECG waveform, these waveform will be send to the server.
Hope to hear from you soon. Thanks.
Regards,
Syaff
12-13-2010 01:49 PM
First: Do you really want to store the image and not the data itself? I would think it would be far more useful to a clinician to be able to see and work with the actual data, rather than an image of the data. If you store an image of the data, the data itself is mostly lost.
Second: You mention MySQL, so you appear to want to store the data in a database server. To do that, see here.
12-13-2010 10:53 PM
Hi!
I tried the file that you link it to me. Must i really use binary or i cn use as text file?
We find an alternative. We would like to transfer the entire file without reading it first to the web server.
Is there any ways or labview examples to do this?
Thanks!
12-14-2010 02:15 AM
You could use an internet toolkit, and transfer file to server via ftp.
12-16-2010 09:18 PM
Hi there.
Thanks for the reply. But is there any program in lebview that could help me send a file that contain all my data in it to the database server?
In my situation, i convert my recorded ECG waveform into data. (time for x-axis and amplitude of the ECG for y-axis). Therefore, i have a huge number of data. Thus, i would like to know if there is a way to send all this data to the database server together.
Really need help.
regards,
syaff
12-17-2010 08:08 AM
Hi syaff,
Yes, the link I sent you earlier should suit your needs. It is used for storing files in a database. Here is more links:
http://forums.ni.com/t5/LabVIEW/How-can-I-insert-an-image-JPG-into-a-SQL-database/m-p/1108458
Your question is very common. Lots of people ask it. So I think you will find tons of hits if you search the discussion forums.
In general, you will need to connect to a database and store the file data as a BLOB datatype. You could try using LabSQL or NI's Database Toolkit, or you could do it yourself from scratch using the ADO tools in MDAC.
P.S.: In the world of relational databases, it is often considered poor practice to store files in a database. Files should be stored in a file server and you should generally only store pointers to the files in the database. But many people do it. I guess it depends on the nature of your application.
P.S.S.: You could also store the raw data itself in the database. Rather than the file. For example, create a table with 3 columns:
Dataset ID
Timestamp
Value
And then INSERT your data into the table row by row.
12-19-2010 02:07 PM
The easiest way to send it to the database server is to let the webserver do it for you. You can send the file to the webserver via HTTP POST method and let PHP (or whatever) actually handle the database part.
As a side note you may not really want to put the image into a database unless you already have an application that requires it. Just store the file on the webserver and the filename in the database. I went the route of storing images in a database but ran into a couple problems. The database server was more than capable of handling many thousands of images but the problems were nightly backups. They took way too long. I went the route of storing the filenames in the database and using rsync to backup the image files on the webserver.
There is another advantage to just letting the filesystem store the images - web browser caching. If you have to do a database lookup and send the image to the browser then you loose all of that.
12-20-2010 05:59 PM
Hey there!
Thanks for your suggestion.I tried the labview that you have given me. It can upload the readings from the file but it could not send to the database.
Everytime i tried to send,this ia the error that pops out:
Possible reason(s): Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [MySQL][ODBC 5.1 Driver][mysqld-5.1.50-community]Got a packet bigger than 'max_allowed_packet' bytes in Rec Create - Command.vi->Cmd Execute.vi->DB Tools Insert Data.vi->writebinarytodb.vi
is there any solutions for this? I have attach my front panel. As you can see, there are lots and lots of data. 😛
Regards,
syaff
12-20-2010 07:27 PM
Mr. Google returned this link about 'max_allowed_packet':
Google is your friend.
12-20-2010 08:24 PM
Sometimes it is much easier to find answeres by posting questions to a message board in the hopes that someone else went through what you are going through. But try this link max_allowed_packet