Programming NI-6052 using VC++ to Display data in Graph or Chart
Hi
I am using Visual C to acquire the data and display it . I successfully run the example shipped with Labview CD located in (C:\programm files\Naitonal Instruments\nidaq\examples\ANSI C). for AI of single Voltage channel.
But how to display the Acquired data to graph or Chart ? and also how to Store in a file?
help will be appreciated
thanks
Hello,
I've only heard that Gigasoft's charting is absolutely an improvement over
Measurement Studio's built in charting. Faster, way more robust, way better
rendering and far more attention to detail. Plus an easy API to use as
needed independent of development platform. Please visit www.gigasoft.com
for engineering, scientific, and instrument/oscilloscope type charting for
Measurement Studio, MFCs, .NET and others.
best regards,
Robert Dede
Gigasoft, Inc.
www.gigasoft.com
"Haider Abbas" <[email protected]> wrote in message
news:[email protected]..
> Hi
> I am using Visual C to acquire the data and display it . I successfully
> run the example shipped with Labview CD located in (C:\programm
> files\Naitonal Instruments\nidaq\examples\ANSI C). for AI of single
> Voltage channel.
> But how to display the Acquired data to graph or Chart ? and also how
> to Store in a file?
> help will be appreciated
> thanks
>
>
Similar Messages
-
Using JTables to display data from a text file
How do I display data from a .txt file into a column inside a JTable?
dont quite get the "vectors" part..
by the way, my program is as follows
* Damn Java ..
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
public class ScoreBoard extends JPanel {
private boolean DEBUG = false;
public ScoreBoard() {
super(new GridLayout(1,0));
String[] columnNames = {"Player's Name",
"Time Completed",
"$ Amount Earned $"};
/* Object[][] data = {
{"1",
new Integer(5), new Integer(500)},
{"2",
new Integer(5), new Integer(3200)},
{"3",
new Integer(5), new Integer(1000)},
{"4",
new Integer(5), new Integer(100)},
{"5",
new Integer(5), new Integer(200)},
final JTable table = new JTable(data, columnNames);
table.setPreferredScrollableViewportSize(new Dimension(600, 90));
if (DEBUG) {
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
printDebugData(table);
//Create the scroll pane and add the table to it.
JScrollPane scrollPane = new JScrollPane(table);
//Add the scroll pane to this panel.
add(scrollPane);
private void printDebugData(JTable table) {
int numRows = table.getRowCount();
int numCols = table.getColumnCount();
javax.swing.table.TableModel model = table.getModel();
System.out.println("Value of data: ");
for (int i=0; i < numRows; i++) {
System.out.print(" row " + i + ":");
for (int j=0; j < numCols; j++) {
System.out.print(" " + model.getValueAt(i, j));
System.out.println();
System.out.println("--------------------------");
* Create the GUI and show it. For thread safety,
* this method should be invoked from the
* event-dispatching thread.
private static void createAndShowGUI() {
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("ScoreBoard");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
ScoreBoard newContentPane = new ScoreBoard();
newContentPane.setOpaque(true); //content panes must be opaque
frame.setContentPane(newContentPane);
//Display the window.
frame.pack();
frame.setVisible(true);
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
and i want to display the player name from a textfile.txt to the player column instead of hardcoding it like above. Thanks! -
Problem with displaying data's in a chart
I have a main VI (Hovedprogram) and 5 VI's (Ferdigprogram temp tur , Ferdigprogram temp retur, Ferdigprogram nivå, Ferdigprogram temp i fyr and Ferdigprogram trykk)who starts when I start the main VI.
I want to display data for last 15 seconds, last 24 hours, last week, last month and last year.
The problem is that the graphs for last week, last month and last year do not display all the data's. I just got a dot where I started the program 28.April. The graphs shows the data's from 2.May
Any suggestion how I can change my program to appear as described?
Attachments:
Hovedprogram.vi 748 KBAnd here is one of the 5 VI's
Attachments:
Ferdigprogram temp retur.vi 125 KB -
How to dynamically display data labels in area chart
Hello, everyone,
I have an stacked area chart with the data set as follows:
Values: sales
Category Group: date
Series Group: products
Now I have an requirement to display the data labels in the chart for the top 3 products with the highest sales within a certain time period (based on the date parameter). E.g. product1 in the product 1 area, product 2 in the product 2 area, etc.
Is this possible? If so how do I go about doing it?
Your help is much appreciated
Kind regardsHi QQFA,
According to your description, you have a stacked area chart. Values is sales, Category Group is date, and Series Group is product. Now you want to show only top 3 products which has the highest sales data labels for each date.
In SQL SERVER Reporting Service, we can achieve this goal by using expression in Series Label Properties setting. I have tested it on my local environment, you can follow these steps below:
Create a new DataSet(name is “top3”).
Select use a embedded dataset in my report and put
“ select * from(
select Product,Sales,[Date],
ROW_NUMBER() over (partition by [Date] order by Sales desc) as rn
from #temp)
where rn<4 ”
into Query.
Right Click on your chart, select “show Data Labels”.
Right Click on any label that just appeared, select Series Labels Properties .
Click the “fx” next to Label data textbox.
Type the expression below into Set expression for Label :
“=IIF(InStr(Join(
lookupset(Fields!Date.Value,Fields!Date.Value,Fields!Product.Value,
"top3"),","),Fields!Product.Value)>0,Fields!Sales.Value,"")”
(Ps: the “lookupset” function is only supported in SQL SERVER 2008 R2 or later)
Click “OK”.
Save and preview the chart ,as shown here:
Now your chart will show you the top 3 highest sales product data labels in corresponding area.
Reference:
LookupSet Function
Expression and Functions
If you have any question ,please feel free to ask.
Best Regards,
Simon -
Is there a program you can use to back up data?
I'm doing some archiving for a engineering firm. I'm backing up all the data on dvds, but most of the files have names that are more then 110 characters long, so Nero and Roxio won't put them on a disc for that reason. Any suggestions would be appreciated.
You'll need to run the program on an operating system that doesn't limit filename length in that case you could use this software http://longpathtool.com/
-
Getting errorn while using BAPI to display data
I am trying to use a BAPI to display PO orders..
I am getting the error at the time of binding structure to my context. The error is:
The method bind(IPublicTest.INodeforElement) in the type IPublicTest.INodeforNode is not applicable for the arguments (Bapi_Po_Getitems_Input)
//@@begin wdDoInit()
Bapi_Po_Getitems_Input Input = new Bapi_Po_Getitems_Input();
wdContext.nodeNodefor().<b>bind</b>(Input);
//@@end
Plz help its urgent.
Atul
Message was edited by: Atul ShrivastavaHi,
In the Custom Controller's wdDoInit() method, put the following code as it is.
Dont take only the single node as you have taken.
Take the whole input node as written below:
//@@begin wdDoInit()
Bapi_Po_Getitems_Input Input = new Bapi_Po_Getitems_Input();
wdContext.nodeBapi_Po_Getitems_Input().bind(Input);
//@@end
and in the executeBapi....() method in custom Controller,again dont take the single node.
Instead of that, take the whole bapi input node as suggested below:
public void executeBapi_Po_Getitems_Input( )
try {
wdContext.currentBapi_Po_Getitems_Input().modelObject
().Execute();
catch(Exception e)
wdComponentAPI.getMessageManager().reportException(e.toString(), false);
Regards,
Tejas. -
Problems with displaying data in graphs
Hi everybody,
I built an adf application which contains graph binding then I deployed it succesfully but when I want to load this graph I get the following error in log server:
<ImageViewRendererUtils> <renderXML> Could not export XML to ResponseWriter
oracle.dss.util.transform.TransformRuntimeException
java.lang.NullPointerException
at oracle.dss.util.transform.CubicDataAccess.getValue(CubicDataAccess.java:908)
at oracle.dss.util.transform.CubicDataAccess.getValue(CubicDataAccess.java:1448)
at oracle.adfinternal.view.faces.bi.util.DataAccessDecorator.getValue(DataAccessDecorator.java:53)
at oracle.dss.graph.DataCallback.getValue(DataCallback.java:422)
at oracle.dss.graph.DataCallback.getValue(DataCallback.java:379)
Thanks for your help.
Edited by: nf018 on May 11, 2012 9:17 AMI was having this same problem after having created a demo application that displays a
graph of the employee salary data using Oracle's XE built-in HR database.
I am using Jdeveloper 11.1.1.6.0.
After some experimenting, I found I could eliminate the error by changing the setting of
CacheResults in the Iterator from the default <true> to false. Granted, this will affect performance, but
it is a work-around. I think that the error is that the data from element is not being stored anywhere for
the graph element to pick up (this may be due to partial-page rendering (ppr), but I am not sure.)
Open your .jspx file in the editor. Select the graph component. Click on the Bindings tab at the bottom.
You should see a binding between a graph component (under Bindings) to an Iterator (Executable) to
a Data Control element.
Click on the Iterator, and under Advanced, set the CacheResults to false and rerun the application.
Hope this helps. -
Can load image from file using LabVIEW and display on IMAQ graph?
I dont have IMAQ Vision for LabVIEW on my computer. Is it possible to load image file and display on an IMAQ graph?
Thanks!Hey werwr,
In response to: "I dont have IMAQ Vision for LabVIEW on my computer. Is it possible to load image file and display on an IMAQ graph?"
As of right now, in order to read an image from file, you actually do need the IMAQ Vision software. The IMAQ driver without the Vision VI's will allow you to collect images from a framegrabber, and it will allow you to save those images to file. But the function that allows you to read an image from file does require the Vision VI's. Once you have the VI to read images from a file, you will be able to display the image on an IMAQ "Graph" or otherwise known as an Image Display.
I hope this helps. Please let me know if you have any further questions.
Thanks,
DJ
Applications Engineer
National Instruments -
Error displaying data in Excel Layout of ALV
Hi,
I am trying to display ALV data in a Excel layout. After changing the layout i am not able to view the data, rather the excel template is alone displayed.
Is there setting that i am supposed. I did not try this on a custom report but i used SE16 to display data.
Any help will be really appreciated!!!
Thanks in advance,
KathirvelHi,
Please make sure that you have made a <b>global</b>
<b>declaration</b> for the ALV Grid control.If not try
with this
Please reward points if this explanation is useful.
Regards,
Siva -
Displaying data in Grid Format?
Hello Developers,
How to display data in a grid format using BSP in mobiles(Supporting all handheld devices)?
I have read that we can use HTMLB to display data in a Tableview.But will it supported by all mobile devices?
What's the solution to achieve above challenge?
ThanksI suggest you ask that question in the ABAP forum.
Markus -
Display data in smartforms using report
hi,
i want to display data from smartform using report.
i have a preview buttons in report when i select preview buttons displays in smarts
regards
amitdesign the smartform as per ur need and get the function module generated by smartform and pass it to ur report programas below..
case sy-ucomm.
when 'smartform'.
pass the f.m that is generated by system in smartforms
CALL FUNCTION '/1BCDWB/SF00000265'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
DATE_L = s_fkdat-low
DATE_H = s_fkdat-high
PLANT_L = s_werks-low
PLANT_H = s_werks-high
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
IFINAL = ifinal1[]
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endcase. -
Displaying Data Using Selection-screen in Module Pool
Hi All,
Currently I'm working on a module pool program.In that i'm having two screens 9000 and 9001.
I want to select a bookrefno using a selection screen and display header & table control data in 9001 screen when the bookrefno is validated.
can anyone help me sending sample code regarding this
Regards
Ravi SHi Ravi
Place "bookrefno." field on screen 9000.
Use validations on that particular field by using chain-endchain.
in PAI of 9000
case sy-ucomm
when 'display'
call screen 9001
write select statment to display data i.e header & table control in 9001 .
hope this would solve your problem.
reward points, if its helpful.
Thanks
RK Nimma -
Not able to display data in different columns using Unicode encoding
Hi,
Iam using Unicode encoding in my Java appln to support Japanese characters while downloading CSV report. But using the Unicode encoding displays all data in the first column of Excel sheet.
Please let me know how to display data in different columns using Unicode encoding in Excel sheet.Hi Venkat,
After extracting data into DSO check the request whether active or not.
Check data in DSO in contents.
If is there any restrictions on info providers in Queries.
Let us know status clearly.......
Reg
Pra -
Not able to display data in separate columns using Unicode encoding
Hi,
Iam using Unicode encoding in my Java appln to support Japanese characters while downloading CSV report. But using the Unicode encoding displays all data in the first column of Excel sheet.
Please let me know how to display data in different columns using Unicode encoding in Excel sheet.
This is an urgent need. Please help me out.Hi,
I have no problem with item :P15_EV_LCL this is having a value my probem here is i am using java script to display the value in different color based on the condtion case
eg:
select
case
TRUNC((
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2)
= :P15_EV_LCL
then
span style="background-color:lightgreen"
|| TRUNC((
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2) || '%' || /span
else
span style="background-color:yellow"
|| TRUNC(
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2) || '%' || /span
end "Effort"
from actuals Z
If i dont use this <Span style="Background-color:color"> i am able to generate data in excel sheet if i use this color coding i am not able to get data in spread sheet.
Please suggest
Thanks
Sudhir
Edited by: Sudhir_N on Mar 23, 2009 10:00 PM -
Unable to display data no entry in the table without using Model clause
Hi,
I've an urgent requirement described below :
The previously posted Question has been answerted using Model Clause:
Is there any way out to solve it without using Model clause:
I've a table named as "sale" consisting of three columns : empno, sale_amt and sale_date.
(Please ref. The table script with data as given below)
Now if I execute the query :
"select trunc(sale_date) sale_date, sum(sale_amt) total_sale from sale group by trunc(sale_date) order by 1"
then it displays the data for the dates of which there is an entry in that table. But it does not display data for the
date of which there is no entry in that table.
If you run the Table script with data in your schema, then u'll see that there is no entry for 28th. Nov. 2009 in
sale table. Now the above query displays data for rest of the dates as its are in sale table except for 28th. Nov. 2009.
But I need its presence in the query output with a value of "sale_date" as "28th. Nov. 2009" and that of "total_sale" as
"0".
Is there any means to get the result as I require?
Please help ASAP.
Thanks in advance.
Create table script with data:
CREATE TABLE SALE
EMPNO NUMBER,
SALE_AMT NUMBER,
SALE_DATE DATE
SET DEFINE OFF;
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('12/01/2009 10:20:10', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/30/2009 10:21:04', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/29/2009 10:21:05', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/26/2009 10:21:06', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/25/2009 10:21:07', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 5000, TO_DATE('11/27/2009 10:23:06', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 4000, TO_DATE('11/29/2009 10:23:08', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 3000, TO_DATE('11/24/2009 10:23:09', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 2000, TO_DATE('11/30/2009 10:23:10', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 7000, TO_DATE('11/24/2009 10:24:19', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 5000, TO_DATE('11/25/2009 10:24:20', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 3000, TO_DATE('11/27/2009 10:24:21', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 2000, TO_DATE('11/29/2009 10:24:22', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 1000, TO_DATE('11/30/2009 10:24:22', 'MM/DD/YYYY HH24:MI:SS'));
COMMIT;
Any help will be needful for me
Regards,select sale_date,sum(sale_amt) total_sale
from
select empno,0 sale_amt,(sale_date + ao.rn) sale_date
from
select empno,sale_amt,sale_date ,(t.nxt_dt - t.sale_date) diff
from
select empno
,sale_amt,trunc(sale_date) sale_date
,trunc(nvl(lead(sale_date) over (partition by 1 order by sale_date),sale_date)) nxt_dt
from sale
) t
where (t.nxt_dt - t.sale_date) >1
) rec,(select rownum rn from user_objects where rownum<=200) ao
where ao.rn <=(rec.diff-1)
union all
select empno,sale_amt,trunc(sale_date) sale_date
from sale
group by sale_date
order by 1;
~~~~Guess this will serve the purpose...
Cheers Arpan
Maybe you are looking for
-
Oracle.jbo.RowAlreadyDeletedException with outer join
Hi, I have created a VO, based on an EO, with an outer join present. The first time I query my data (search) everything goes well, but when I perform a search the second time, I receive the error message: "oracle.apps.fnd.framework.OAException: oracl
-
Why is PNG opacity corrupt in CS6?
My platform is Win7-64. PS-64 is just completely buggy so I use PS-32 to fill a gray #999 rectangle and give it 90% opacity for a DW navigation feature in development (Canada and UK). When I place the transparent PNG in the DW CSS3 code, the HTML5 br
-
How can i copy music from old laptop to new without everything downloading via cloud?
I tried to back up my songs to an external drive and then import them to the new laptop. It worked for about the first day, but then it wouldn't play my songs. I kept trying and now it plays, but it shows every song i ever purchased since 6th grade
-
How to factory unlock my 5s? my phone is locked to Orange-Tunisia
Hello all! I have bought a 5s from someone, but it is locked to Orange-Tunisia carrier. Is there a way to permanent unlock? I tried so many services but it seems Orange Tunisia is so difficult to find. I asked over than 20 services and they said they
-
Anytime i plug a charger into my iphone . It vibrates , How doI stop this. I've tried several ways