Need help : Reading from DAQ through TCP/IP ?!!
Hello
I have two machines running labview connected to a network. Basically,
I want to read data from a temperature sensor through a DAQ card
from one machine, and be able to plot the data in a chart in the
other machine. I'm trying to use TCP/IP feature to do that but it's not
working.
There is a VI in the tcp.lib "simple data client.vi " and
"simple data server.vi" that does the same thing except that
the data are of type double generated from a sine function and
a random number generator. So i tried to do the same but since
the data read from the DAQ has a thick brown line (not sure what
type) the task was not easy. In the server part i tried to broadcast
3 things through (tcp write.vi): The type of the data, the l
ength of the
string, and the data itself. On the client side i read (tcp read.vi)
these things and plot the data. But i'm not getting any output on the chart.
I had to use (Type Cast), (flatten to string) and (unfatten from string)
in order to get the right wiring. Both VIs run but there is no output
on the chart.
I know it's hard to explain in words, but if anyone is interested i can
give more detai or send the vis to him to look at them. They seem very simple and
straight forward but i don't know why they don't work.
Appreciate any help.
Thanks
Sami
Try running the "Remote Device Access Server" (RDA) on hte machine that has the DAQ card in it. You'll find it in NI-DAQ folder under National Instruments in your Start Menu. (guessing you're running Windows here?)
With this running, you can start MAX on any machine on the network and access and configure the DAQ cards in the remote machine and program an applicaiton just as if the DAQ cards were local. You'll need to know either the remote machines IP address or network name.
I've used it quite a bit and have never had a problem. The Help inside MAX gives good details on how to set it up and use it.
Ed
Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Similar Messages
-
Need help reading burn CDR mp3 and dvdrw from my superdrive
my Super Drive was fine untill i upgrade to Maverick now it wouldnt read the music on all of my burn cdr disk and dvdrw . ALso .need help reading my external 2TB External Ntfs Hard drive.....
To many conflicting information...
my Super Drive was fine untill i upgrade to Maverick
Per your system profile: "Mac mini, Mac OS 9.1.x"
Mac Minis do not have a superdrive. You also posted in the Intel iMac forums.
Please correct and/or update so that you will be provided w/the correct troubleshooting suggestions. -
Need help getting from 10.5.8 to 10.6.
need help getting from 10.5.8 to 10.6. i know i'm late to the game!
If you are not sure of what you are doing,If you are worried about losing anything when doing a major systems upgrade/update,
Before embarking on a major OS upgrade, it would be wise, advisable and very prudent if you backup your current system to an external connected and Mac formatted Flash drive OR externally connected USB, Thunderbolt or FireWire 800, Mac formatted hard drive. Then, use either OS X Time Machine app to backup your entire system to the external drive OR purchase, install and use a data cloning app, like CarbonCopyCloner or SuperDuper, to make an exact and bootable copy (clone) of your entire Mac's internal hard drive. This step is really needed in case something goes wrong with the install of the new OS or you simply do not like the new OS, you have a very easy way/procedure to return your Mac to its former working state.
Older version of CarbonCopyCloner found here.
http://mac.filehorse.com/download-carbon-copy-cloner/2734/
Older versions of SuperDuper can be found on the SuperDuper Website and Homepage.
http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html
Then, determine if your Mac meets ALL minimum system install requirements.
Mac OS X v10.6 Snow Leopard system requirements
Purchased Installer disc here.
http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
To install Snow Leopard for the first time, you must have a Mac with:
An Intel processor
An internal or external DVD drive, or DVD or CD Sharing
At least 1 GB of RAM (additional RAM is recommended)
A built-in display or a display connected to an Apple-supplied video card supported by your computer
At least 5 GB of disk space available, or 7 GB of disk space if you install the developer tools.
In addition, see this discussion for more relevant info that you may need if you have any other questions or issues.
Snow Leopard upgrade - keeps Photoshop? -
Need Help:Reading Data from RU payroll cluster for table GRREC
Hi...
I need help on how to read data from RU cluster table for table GRREC for the employee & run date and get the value from structure PC292 .
Please let me know about the includes and the import and export statements to be used.
Thanks in advance,
RAVI.Hi,
Here goes pseudocode
Includes:
include: rpppxd00 ,
rpppxd10 ,
rpc2cd09 ,
rpc2rx02_ce , "if ldb pnp_ce is used else use the same include with out _ce
rpc2rx29 ,
rpc2rx39 ,
rpppxm00 ,
rpc2ruu0_ce ,
Declare:
DATA : i_rgdir LIKE pc261 OCCURS 0 WITH HEADER LINE ,
i_result TYPE pay99_result OCCURS 0 WITH HEADER LINE ,
i_grrec LIKE pc292 OCCURS 0 WITH HEADER LINE .
start-of-selection:
GET pernr.
Get the RGDIR VALUE for the current PERNR & selected Molga
get rgdir data TABLES i_rgdir
USING pernr-pernr
p_molga " parameter
CD-KEY-PERNR = PERNR-PERNR.
RP-IMP-C2-CU.
i_rgdir [] = rgdir[].
LOOP AT i_rgdir WHERE fpbeg LE pn-endda
AND fpend GE pn-begda
AND srtza EQ 'A'
AND void NE 'V'.
get_result_tabs TABLES i_result
USING 'RU' " US cluster
pernr-pernr
i_rgdir-seqnr
RX-KEY-PERNR = PERNR-PERNR.
UNPACK i_RGDIR-SEQNR TO RX-KEY-SEQNO.
RP-IMP-C2-RU.
i_grrec[] = i_result-inter-grrec[].
LOOP AT i_grrec.
case i_grrec.
use wage types required here and pass the data to output table.
endcase.
endloop.
endloop
end-of-selction. -
Need help reading files from a simple applet
hi everyone,
i have the following problem while trying to read from a file:
java.security.AccessControlException: access denied (java.io.FilePermission dr.xml read)
this problem shows up only when loading applet from a browser... if i use appletviewer everithing is ok.
this is the code:
cycle = new String[2];
phase = new String[8];
v = new Vector();
int temp;
try {
try {
fis = new FileInputStream("dr.xml");
while ((temp = fis.read()) > 0) {
buf += (char) temp;
fis.close();
fis = null;
} catch (java.io.FileNotFoundException ex) {
System.out.println("File does not exist. ");
} catch (java.io.IOException ex) {
System.out.println("error. ");
ex.printStackTrace();
}thanksYou don't have access to the file system. Think about it, you visit a web page and an applet starts reading your files? That's a HUGE security risk.
That said, I think you can do this if you have a signed/trusted applet. Google "signed applets" and "certificates" -
How to read from DAQ in different time intervals
Hello,
I am currently using LabVIEW 2010. I am new to LabView.
I have 9 thermocouples I want to record the temperature from and create a graph.
For one graph I want to graph the data every second for the duration of about 1.25 hours. For the other I want to record and graph the data every 2 minutes for a duration of 30 minutes. The temperature then would be ramped up in an oven and set to a higher temperature. When it is stabilized, recording of the data again will begin again at intervals of 2 minutes for the duration of 30 minutes.
The first is only to see the real time temperature variation while the program is recording and running. The second graph and data is what I will use to analyze.
What I need help in is finding out how you can read from the DAQmx at two different time intervals. I tried two parallel loops with each one graphing the two separate graphs I need with a delay time. Those two parallel loops where then surrounded by another while loop. The result is that the outside loop waits until both loops are finished so I do not get the correct results for the real time data graph.
Is there a way to call on the DAQ data you need at the time interval you desire? Any suggestions to solve this problem? Thank you for your time and help.You are on the right track. Sample the data at the fastest rate and send it to the 1st graph. For the slower graph, take a sample from the faster data at your desired time interval. You could use a timer and a case structure for something quick and easy and still have everything run in the same loop. You could use two loops running at different speeds, it is just a little more involved and a few other things to consider.
-
Need help in uninstalling driver through inf
Hi,
I need help in removing files, deleting service from INF when the device is getting uninstalled through the device manager.
In my INF file i have the following section to add service and copy files during installation.
[XYZ.NTAMD64]
CopyFiles=Driver_Copy_Files, Service_Copy_Files
[Driver_Copy_Files]
myDriver.sys,,,2
[Service_Copy_Files]
myservice.exe,,,2
[XYZ.NTAMD64.Services]
AddService = %Service.Name%, 0, Service_Inst
Installation working fine, service is created and files are copied to the specified folder.
I have the following section for uninstall. Basically i wanted to delete the service and driver files when uninstalling. But it is not happening. I suspect problem may be with the section name
[XYZ.NTAMD64.Remove.Services]
DelService = %Service.Name%,0x200
[XYZ.NTAMD64.Remove]
DelFiles = Driver_Copy_Files, Service_Copy_Files
Please help me on this.Hi Doron,
DifxAPI will not add entry in Control panel.
DriverPackageInstall does
not create an entry, which represents the driver package, in Programs and Features in
Control Panel.
DriverPackageUninstall will
invoke DIF_REMOVE. Because in my coinstaller i am handling the DIF_REMOVE to stop service and delete a service? -
Need help in converting DAQ to DAQmx
Hi,
I've struggled with coverting traditional DAQ to DAQmx for two weeks. I really need help from someone.
As you can see the picture below, I've tried to replace the old VI's with new ones. But, it doesn't work. Of course, the VI below is just a part of my VI. VI's after case structure are inside of while loop.
Could you please give me thought that why it doesn't work?
FYI: The strange thing about it is that it runs without any error messege, but there is no actual output (values on the graph, data in arrays, etc).
Thanks in advance.
Best,
Jay
Solved!
Go to Solution.
Attachments:
Untitled 1.vi 74 KBHi Jay,
Assuming that the Traditional DAQ and DAQmx code are screenshots from separate VIs, I believe that the following parameter of the read functions in each driver would account for the different behavior that you are seeing (you have both set to -1):
Traditional DAQ:
DAQmx:
So, when you give DAQmx Read a -1 for "number of samples per channel" when running a Continuous task, the effect is that it will return whatever data is available at the time DAQmx Read is called. In your case this is immediately after the task is started so there very well could be 0 samples available in the buffer. I'd imagine that you would see data if you change the value of this parameter from -1 to the actual number of samples that you want to read.
Having said this, if you want to acquire continuously you should call DAQmx Read from inside a loop. I agree with the others that you should take a look at the DAQmx shipping examples to help get started, you will probably find something very close to what you want to do. You can find the examples at:
Help >> Find Examples... >> Hardware Input and Output >> DAQmx
Thanks for posting, I hope this helps!
-John
John Passiak -
URGENT: Need help reading URL of current page
Hello kind people!
I need help, and its very simple:
How do i read the URL of a web page?
For example, the URL of this page is:
http://forums.sun.com/thread.jspa?threadID=5327796
So how can i be able to read in this URL in my java program?
thanks SO MUCH
P.S. I HAVE searched the java docs and everything, the closest thing i found was request.getRequestURL().? but i have no idea how to use it. you have NO IDEA how appreciative i would be if you could simply show me exactly how to read in the URL of a given page.
thanks SO MUCH
Edited by: homegrownpeas on Aug 31, 2008 5:19 PMGoing by what I understand here is a simple version of how you can read data from over HTTP.
This expects the "page" to be text (hence an InputStreamReader instead of an InputStream.)
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.HashMap;
* GPLv2.
* @author karlm816
public class HomeGrownPeas {
* @param args
public static void main(String[] args) {
HashMap<String, String> params = new HashMap<String, String>();
params.put("threadID", "5327796");
System.out.println(loadHttpPage("http://forums.sun.com/thread.jspa", params));
public static String loadHttpPage(String sUrl, HashMap<String, String> params) {
// Build the HTTP request string
StringBuilder sb = new StringBuilder();
if (params != null) {
for (String key : params.keySet()) {
if (sb.length() > 0) {
sb.append("&");
sb.append(key);
sb.append("=");
sb.append(params.get(key));
System.out.println("params: " + sb.toString());
try {
URL url = new URL(sUrl);
URLConnection connection = url.openConnection();
connection.setDoOutput(true);
connection.setRequestProperty("Content-Length", "" + sb.length());
connection.setUseCaches(false);
if (connection instanceof HttpURLConnection) {
HttpURLConnection conn = (HttpURLConnection) connection;
conn.setRequestMethod("POST");
OutputStreamWriter osw = new OutputStreamWriter(connection.getOutputStream());
osw.write(sb.toString());
osw.close();
// Now use sb to hold the resutls from the request
sb = new StringBuilder();
BufferedReader in = new BufferedReader(
new InputStreamReader(
connection.getInputStream()));
String s;
while ((s = in.readLine()) != null) {
sb.append(s);
// To make it more "human readable"
sb.append("\n");
in.close();
} catch (IOException e) {
e.printStackTrace();
return null;
return sb.toString();
} -
Can someone test a prog for me, and help reading from an exty file
Okay, I have a program to calculate the Pearson product-moment correlation coefficient ( http://en.wikipedia.org/wiki/Pearson_correlation_coefficient ) from an external file that I've just written for an assignment on Monday.
I can't actually run it because I can't find a machine with Java on that works, though I can compile it. Why is a long story, but University Admin are going to feel my wrath.
I would like two things.
1) would someone be kind enough to try to run it and test it in anyway and report any bugs or inadequacies back to me. (you will need to create a text file called data.dat with some numbers in, e.g.
14.234 54.4534
376.56 432.2332
23432. 23234.23
2) How can I can the computer to ask the user to enter either a) the name of the file from system.in or b) from a popup dialogue box with a browse feature (or is that incompatible with some OSs?).
The file follows:
// Import packages
import java.io.*; // Import all the Java input/output packages
import java.util.StringTokenizer; // Import a utility package
class Pearsontwo
public static void main (String[] args)
/* Define variables.
(double any number with decimal point.
ints take integer value) */
double sumx, sumy, // sum of x and sum of y
sumxx, sumyy, // sum of x squared and y squared
sumxy; // sum of products of x and y
int n; // n is number of lines
// Set name of file to be read
String fileName = data.dat; // define the name of the file
// (Enhancement: use user input. This requires the use of System.in which is a bit complicated.
//System.out.print("Please type the name of the file you wish to run the analysis on:");
//fileName = TextIO.getInt();
// Set things for reading external file
BufferedReader br; // Will be used to read the file
String line; // Will be used to hold a line read from the file
StringTokenizer st; // Will be used to break a line into separate words
String firstWord, secondWord; // File will be read as string type
double firstNumber, secondNumber; // that need to be converted into numbers.
try // if an error occurs, go to the "catch" block below
// Create a buffered file reader for the file
br = new BufferedReader (new FileReader(fileName));
// Continue to read lines whilst there is one or more left to read
while (br.ready())
{ line= br.readLine(); // Read one line of the file
st = new StringTokenizer(line); // Prepare to split the line into "words"
// Get the first two words (invalid --> error --> catch)
firstWord = st.nextToken();
secondWord = st.nextToken();
// Turn words into numbers (invalid --> error --> catch)
firstNumber = Double.parseDouble(firstWord);
secondNumber = Double.parseDouble(secondWord);
// Add the numbers to the previously stored numbers
sumx = sumx + firstNumber;
sumy = sumy + secondNumber;
sumxx = sumxx + (firstNumber * firstNumber);
sumyy = sumyy + (secondNumber * secondNumber);
n = n++; add one to the value of n.
// Close the file
br.close();
// Handle any error in opening the file
catch (Exception e)
{ System.err.println("File input error.\nPlease amend the file " + fileName);
// Calcuate r in stages, variance and covariance first.
double variancex = (sumx2 - (sumx * sumx / n)) / (n - 1); // calculates the variance of x ...
double variancey = (sumx2 - (sumx * sumx / n)) / (n - 1); // ... and y
double covariance = (sumx * sumy - sumx * sumy / n ) / (n - 1); // and the covariance of x and y
double r = covariance / Math.sqrt(variancex * variancey); // and the Pearson r value
// Printout
System.out.print("The Pearson product-moment correlation for these data is:" );
System.out.println ( r );
// Also print to file ?
Cheers,
Duncan.
(Note: this is my own work by Duncan Harris at Cariff University, so I'm not plaigerising anyone other than myself if I post it here and it subsequently gets found by one of the course organisers who have given permission for this sort of thing anyway!)"I can't actually run it because I can't find a machine with Java on that works, though I can compile it. Why is a long story, but University Admin are going to feel my wrath."
I'm sure they're worried.
I don't understand this. You can compile, but not run? This makes no sense at all.
Why can't you simply download the JDK from Sun and install it on a machine? You could both compile and run then.
You don't need a pop-up dialog box to get an input file name from a user. The command prompt is quite sufficient. -
Need help changing from CC package to Photoshop only
I purchased CC membership for one year in December 2013. As I hardly ever need InDesign or Illustrator, I would like to change my order to Photoshop (and Lightroom) only. I find managing my account online very confusing. Is there a number I could call? Or some other way to get rid of the software I don't need, and that I did not re-order after my one-year membership was over?
Cancel your membership or subscription | Creative Cloud
https://helpx.adobe.com/x-productkb/policy-pricing/cancel-membership-subscription.html
Phone support | Orders, returns exchanges
http://helpx.adobe.com/x-productkb/global/phone-support-orders.html
For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
Creative Cloud support (all Creative Cloud customer service issues)
http://helpx.adobe.com/x-productkb/global/service-ccm.html ( http://adobe.ly/19llvMN ) -
Seriously need help but cant get through via phone
I am seriously needing help spend almost all week chatting with verizon via my verizon however nobody could come up with an answer for my problem it seems that I have been locked out of using the online payment option and the lady says it does not show that on her end I need this addressed asap but the lines have been down for days according to the store I just spoke with. is there someone in finance or billing that could call me? I have several things I am trying to do 1. add an account manager 2. make a payment arrangement for a week out ( I normally do this as my payday falls odd) 3. gain access to online payments
Take each of the following steps that you haven't already tried. If the problem isn't solved, ask for further instructions.
1. Are the current date (including the year) and time shown on your system clock? If not, correct them and test.
2. Disable any third-party firewall, "security" software, or network filter.
3. In some versions of OS X, Parental Controls has a bug that prevents loading of secure websites. Turn it off.
4. The process by which OS X checks the validity of root SSL certificates doesn't work behind the authenticating SOCKS proxies used on some enterprise networks. If applicable, contact your network administrator. The proxy server may need to have its settings changed. -
Need help connecting to ISP through DSL/router
Hi
I need help configuring my intel solaris8 box to get to the internet. I have dsl going into a linksys router. my windows machine have no problem using the DNS servers from pacbell. i also have DNS setup on my novell server, but the solaris8 box still can't resolve anything. I can ping everyone on my segement, I can connect to my novell web server netscape navigator but can't resolve it's name, i have to use it's ip address. I can remote logon. I lloked for a resolv.conf file but can't find one, help!!!!
DannyEdit /etc/resolv.conf (it may not exist) with the following lines:
domain your.domain.name
nameserver your.primary.dns.ip
nameserver your.secondary.dns.ip
search your.domain.suffix
The last line is optional, but please do substitute those values for the ones that you use.
As far as a default route goes, just edit /etc/defaultrouter (may not exist) and put the ip of your default gw on a single line.
Alex -
Need help converting from 4.0 to 2011
hello,
Need help converting files from 4.0 to 2011.
thank you
Solved!
Go to Solution.
Attachments:
noise source.vi 73 KB
8673D.vi 30 KB
8970 FREQ.vi 26 KBattached as 8.2, which you can open
missing some subVIs - not sure if you already have them
Attachments:
8673D.vi 13 KB
8970 FREQ.vi 11 KB
noise source.vi 24 KB -
I'm streaming data to disk in one loop, however once this finishes I'd like to read the data into power spectrum vi/Octave analysis vi in another loop. The data from the read vi is a string and power spectrum vi needs 1d waveform. Does anyone have experience with this process?
From your general description, I gather you are streaming to a text based file (comma or tab separated spreadsheet format) and would like to analyse this data with a power spectrum or octave analysis when you finish. Since you are streaming, I assume you have a lot of data. Do you have more than one channel?
In any case, you have two simple options (and lots of complex ones). You can either read the data back from disk and convert it to a 1D array (try the Read From Spreadsheet File.vi - will get a 2D array, take the first column or the column of your choice if you have more than one channel) or you can use the Spreadsheet String to Array primitive to create an array from your text data before you save it to disk.
If your data rate is slow enough, you can analyze as you acquire and store.
Taking your data as text is very inefficient. What you really want to do is read the data as binary, use that for your analysis, and use something like the Write to Spreadsheet File.vi to save text data to disk.
This account is no longer active. Contact ShadesOfGray for current posts and information.
Maybe you are looking for
-
HOW TO GIVE AT NEW COMMAND IN SMARTFORMS.NEED THE REPLY URGENTLY.PLEASE HELP.
-
Installation on Mac OS 10.8.5 SOLVED (missing mach_kernal)
egon1984 solved it!! Thank you!!! You are the only one who had the answer! After a recent Mac update, the supposed-to-be invisible "mach_kernal" was showing right in the root of my hard drive. I stupidly deleted it. That's why the latest Flash update
-
Problem in showing combo box in the table
Hello guys i just add up the combo box in the table but the problem is when i change the line in the table the combo disappear. i want it to be visible even if it is not in the selected row. i want that user can see the combo box in the table without
-
Do I have to pay the upgrade fee if I buy my phone from apple?
I can't find anywhere where the upgrade fee is explained fully. I know if I buy my phone from apple, it is a "verizon" phone -- will they charge me the upgrade fee, will verizon charge it when I activate the phone, or does it not apply if I buy it vi
-
Hello. My HP Office Jet 6500 A Plus, which contains a copier, printer, and scanner all in one, has always worked well for me in the past. I have always been able to make copies, print documents from my computer, as well as scan documents that I plac