How to create a voltage output based on an ultrasonic sensor input
For a school project we are trying to use an ultrasonic sensor to control the voltage sent to a group of leds. We calibrated the sensor and determined six different voltage levels that we wished to output to the leds based on the voltage input to the sensor. We set up a labview program and were going use one of the mathnodes that allows code to be written to send a signal to a case structure to send the output voltage. Each case has a different output voltage associated with it. We can't seem to get the math node to work with the case structure to get an output. I have attached a screen shot of our block diagram and a copy of our .vi file. If anyone has any input it would be appreciated.
Attachments:
led block diagram.JPG 64 KB
led project2.vi 822 KB
Hello,
Have you used highlight execution or probes to confirm the output of the Mathscript node? Also, though LabVIEW is coercing your output, it is not best practice to wire a double (floating point) to a case structure (discrete cases). I would recommend changing the data type to an integer.
Please let me know the results of the probe steps.
Thank You,
Patrick Corcoran
Application Engineering Specialist | Control
National Instruments
Similar Messages
-
How to creat a Data provider based on different fields in SAP BW ?
Hi,
Experts,
There are 20 fields of Plant Maintainace like :
SWERK
BEBER
STORT
TPLNR
EQUNR
INGRP
QMDAT ---peroid
STTXT
QMDAT - Date of Notification
QMNUM
QMTXT
QMART
AUSVN
AUZTV
AUSBS
AUZTB
AUSZT
ERNAM
QMDAB
AUFNR
I want to creat a Report based upon these fields ?
For that I h'v checked the relevant Fields to the existing standard Datasource in Bw side &
Checked cubes created based upon these Datasource in Bw side !
i h'v found some fields are existing different cubes & some are missing .
How to creat a Data provider based on different fields in SAP BW ?
plz suggest !!!!!!!
Thanx,
Asit
Edited by: ASIT_SAP on Jul 15, 2011 6:25 AM
Edited by: ASIT_SAP on Jul 15, 2011 6:27 AM
Edited by: ASIT_SAP on Jul 15, 2011 12:37 PMHi Lee, Please see below..
DECLARE @Machine2 TABLE
DispatchDate DATE
INSERT INTO @Machine2 VALUES ('2014/02/01'), ('2014/02/02'), ('2014/02/03')
DECLARE @DateFrom DATE
SELECT @DateFrom = DATEADD(D,1,MAX(DispatchDate)) FROM @Machine2
SELECT @DateFrom AS DateFrom
Please mark as answer, if this has helped you solve the issue.
Good Luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles. -
How to create a new table based out of old data rows
Hi All,
How to create a new table based out of old data rows. Also how can we find out the DBF for different users in a database?
SaqibNot very clear what you need. I'll try to interpret...
How to create a new table based out of old data rowsIf this means how to create a table from an existing one, then you can do :
SQL> create table <new table> as select * from <old table>;
if you need a subset of rows you can add a where clause.
how can we find out the DBF for different users in a database?Here I need some more clarification. What do you mean exactly ? -
How to create collective invoice output
hi frnds
I have created 50 invoices in (VF01). How to create collective invoice output. What is the procedure?
regards(Assuming you want to print all the 50 invoice)
Use VF31. -
How to create a new output type in inventory management
dear consultants .
how to create a new output type in inventory management...........?
please give me a solution
regards
ratanRefer:
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/attaching-smartform-to-the-standard-transaction-2316027 -
How to create internal table dynamically based on a table entry
hi Experts,
I have table yprod_cat. It has product categories.
In my ABAP program I need to create internal table dynamically based on the number of entries in the table.
For example:
If the table has 3 entries for product category
1. Board
2. Micro
3. Syst
Then create three (3) internal tables.
i_board
i_micro
i_syst
How can we do this? Any sample code will be very usefull
Thanks & Regards
Gopal
Moderator Message: No sample codes can be given. Please search for them or work it!
Edited by: kishan P on Jan 19, 2011 4:22 PMOur APEX version is 4.2We are using below SQL query to display radio groups dynamically..
SELECT APEX_ITEM.RADIOGROUP (1,deptno,'20',dname) dt
FROM dept
ORDER BY 1;
Created a form using SQL type and given abouve SQL query as source.. But when we run the page, there were no radio groups displayed in the page..
Below is the output of the query..
<input type="radio" name="f01" value="10" />ACCOUNTING
<input type="radio" name="f01" value="20" checked="checked" />RESEARCH
<input type="radio" name="f01" value="30" />SALES
<input type="radio" name="f01" value="40" />OPERATIONS
>
If Tabular Form:
Edit Region > Report Attributes > Edit Column > Change the Column type to "Standard Report Column"
If normal Page Item:
Edit Page Item > Security > Escape special characters=No.
Pl read the help on that page item to understand the security risk associated with =NO.
Cheers,
Edited by: Prabodh on Dec 3, 2012 5:59 PM -
How to create 2 ALV output lists in a single output?
Hi guys...
My clients requirement is to create 2 ALV output lists in a single output list.how can i do this?i mean which function module i can use for this requirement?please help me out...
Regards..*& Report ZLCL_ALV_INT_INVOICE *
REPORT ZLCL_ALV_INT_INVOICE .
DATA: O_CONT1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
O_CONT2 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
O_GRID1 TYPE REF TO CL_GUI_ALV_GRID,
O_GRID2 TYPE REF TO CL_GUI_ALV_GRID.
DATA: IT_VBRK LIKE VBRK OCCURS 1 WITH HEADER LINE.
DATA: IT_VBRP LIKE VBRP OCCURS 1 WITH HEADER LINE.
DATA: WA_VBRK LIKE VBRK.
*--Layout
DATA: WA_LAYO TYPE LVC_S_LAYO.
CLASS LCL_BILLING DEFINITION
CLASS LCL_BILLING DEFINITION.
PUBLIC SECTION.
CLASS-METHODS: HANDLE_HOTSPOT_CLICK
FOR EVENT HOTSPOT_CLICK
OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID.
ENDCLASS. "LCL_BILLING DEFINITION
CLASS LCL_BILLING IMPLEMENTATION
CLASS LCL_BILLING IMPLEMENTATION.
METHOD HANDLE_HOTSPOT_CLICK.
IF NOT E_ROW_ID IS INITIAL.
*--Reading selected billing docno
READ TABLE IT_VBRK INTO WA_VBRK INDEX E_ROW_ID-INDEX.
*--GETTING BILLING DOC ITEMS
REFRESH IT_VBRP.
SELECT *
FROM VBRP
INTO TABLE IT_VBRP
WHERE VBELN = WA_VBRK-VBELN.
CALL SCREEN 200.
ENDIF.
ENDMETHOD. "HANDLE_HOTSPOT_CLICK
ENDCLASS. "LCL_BILLING IMPLEMENTATION
SELECT-OPTIONS: S_VBELN FOR IT_VBRK-VBELN.
START-OF-SELECTION.
PERFORM GET_DATA.
SET SCREEN 100.
*& Form GET_DATA
text
FORM GET_DATA .
*--billing header data
SELECT *
FROM VBRK
INTO TABLE IT_VBRK
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'No Data Found'.
ENDIF.
EXIT.
ENDFORM. " GET_DATA
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MENU'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
PERFORM EXIT_PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module PBO_100 OUTPUT
text
MODULE PBO_100 OUTPUT.
IF O_CONT1 IS INITIAL.
CREATE OBJECT O_CONT1
EXPORTING
CONTAINER_NAME = 'VBRK_CONT'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in container'.
EXIT.
ENDIF.
CREATE OBJECT O_GRID1
EXPORTING
I_PARENT = O_CONT1
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in Grid'.
EXIT.
ENDIF.
ENDIF.
*--Layout for 1st grid
WA_LAYO-KEYHOT = 'X'.
WA_LAYO-GRID_TITLE = 'Billing Document Header Data'.
CALL METHOD O_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'VBRK'
IS_LAYOUT = WA_LAYO
CHANGING
IT_OUTTAB = IT_VBRK[]
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in showing grid'.
EXIT.
ENDIF.
*-Setting the focus on the grid
CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
EXPORTING
CONTROL = O_GRID1 "Grid control object
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in setting focus'.
ENDIF.
*--Event handler registration
SET HANDLER LCL_BILLING=>HANDLE_HOTSPOT_CLICK FOR O_GRID1.
ENDMODULE. " PBO_100 OUTPUT
*& Module STATUS_0200 OUTPUT
text
MODULE STATUS_0200 OUTPUT.
SET PF-STATUS 'MENU'.
ENDMODULE. " STATUS_0200 OUTPUT
*& Module USER_COMMAND_0200 INPUT
text
MODULE USER_COMMAND_0200 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 100.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Module PBO_200 OUTPUT
text
MODULE PBO_200 OUTPUT.
IF O_CONT2 IS INITIAL.
CREATE OBJECT O_CONT2
EXPORTING
CONTAINER_NAME = 'VBRP_CONT'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in container'.
EXIT.
ENDIF.
CREATE OBJECT O_GRID2
EXPORTING
I_PARENT = O_CONT2
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in grid linking'.
EXIT.
ENDIF.
CALL METHOD O_GRID2->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'VBRP'
CHANGING
IT_OUTTAB = IT_VBRP[]
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
*--refreshing the alv grid with the latest content of the internal table
*--which is linked
CALL METHOD O_GRID2->REFRESH_TABLE_DISPLAY
EXCEPTIONS
FINISHED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in Refreshing gird'.
ENDIF.
ENDIF.
ENDMODULE. " PBO_200 OUTPUT
*& Form EXIT_PROGRAM
text
FORM EXIT_PROGRAM .
*--Deallocating the memory
IF NOT O_CONT2 IS INITIAL.
CALL METHOD O_CONT2->FREE
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
EXIT.
ENDIF.
CLEAR: IT_VBRP,
IT_VBRP[].
FREE: IT_VBRP,
IT_VBRP[].
ENDIF.
IF NOT O_CONT1 IS INITIAL.
CALL METHOD O_CONT1->FREE
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
EXIT.
ENDIF.
CLEAR: IT_VBRK,
IT_VBRK[].
FREE: IT_VBRK,
IT_VBRK[].
ENDIF.
*--Cearing the buffered content
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE I000(Z00) WITH 'Error in clearing Buffer'.
EXIT.
ENDIF.
LEAVE PROGRAM.
ENDFORM. " EXIT_PROGRAM
SCREEN 100
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
MODULE PBO_100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
SCREEN200
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
MODULE PBO_200.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0200. -
How to create a flash quiz based on circling the correct answer?
Hi all,
I am quite new to actionscripting and need to create a flash based quiz.
The user will have to circle the correct answer in the quiz.
I do know of drag and drop function but didn't know how to create circling function.
Please advise how should I get started.
Thank you in advance.
Regards,
ChewyHi all,
I am quite new to actionscripting and need to create a flash based quiz.
The user will have to circle the correct answer in the quiz.
I do know of drag and drop function but didn't know how to create circling function.
Please advise how should I get started.
Thank you in advance.
Regards,
Chewy -
How to convert a voltage output from a Rogowski coil to its original current waveform ?
I need to measure current using a Rogowski coil. The voltage output of the coil across a 1k load resistance is directly proportional to the "rate of change of current" flowing through the conductor passing through the center of this coil. So the output is actually :
y = M * di/dt ; where M is the mutual inductance of the coil.
I need the output waveform as i(t). This means an integration is required.
Can some one help me out with this ?
I am also told that in the frequency domain this integration means a -20dB/decade attenuation and a constant -90 degree phase shift. This is some thing I cannot work out with Labview since I am new to it. I tried a mathematical integratio
n. But this also does not work.
Could someone help me out with this ?
Regards
PCTo come up with the most straight forward approach, forget for a moment that you are using LV and think about how you would calculate the answer using paper and pencil.
You have an input value that (using the formula you gave) is related to the rate change for a parameter (in this case the current). Given that rate of change, how do you calculate the absolute value of the parameter at any given point in time? It's really just a math problem...
Once you have it worked out on paper, just do the same calculations in LV.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
How to create new calculated column based on filtered columns?
Dear All,
I'm using Oracle Analysis.
I have two column, each one have different formula.
My Formula based on filter.
Column1
FILTER("DW"."SUM_PLAN_MONTH_AMOUNT" USING ("DW"."PLAN_YEAR" BETWEEN YEAR(DATE'@{P_BEGIN_DATE}') and YEAR(DATE'@{P_END_DATE}')))Column2
FILTER("PAYMENTS"."SUM_PAY_AMOUNT" / 1000 USING ("PAYMENTS"."PAY_DATE_PAID" BETWEEN DATE'@{P_BEGIN_DATE}' AND DATE'@{P_END_DATE}'))How to add new calculated column based on those two column?
For example:
Column1 | Column2 | NewColumn
5 | 10 | 10 / 5 * 100
7 | 12 | 12 / 7 * 100
Regards,
Eba
Edited by: Erdenebayar on Apr 19, 2012 1:42 PM
Edited by: Erdenebayar on Apr 19, 2012 3:37 PMHello MK,
I have a tried following formula. It is working, but result is not filtered.
I filtered "PAYMENTS"."SUM_PAY_AMOUNT" and "DW"."SUM_PLAN_MONTH_AMOUNT" columns.
"PAYMENTS"."SUM_PAY_AMOUNT" / "DW"."SUM_PLAN_MONTH_AMOUNT" * 100Can you share me some tutorial?
BR,
Eba
Edited by: Erdenebayar on Apr 19, 2012 3:43 PM
Edited by: Erdenebayar on Apr 19, 2012 3:43 PM
Edited by: Erdenebayar on Apr 19, 2012 3:43 PM -
How to create a mono output from a mono aux send?
Trying to create a mono output from a mono aux send but option available is only a stereo output. Any way to force a mono output?
Yes - I'm aware of the mono vs stereo. Let me outline more precisely what I'm attempting to do. (By the way, I know this can be done as I do it easily in MOTU's Digital Performer.) The desire is to create a mono send inside Logic that I can then send out through my MOTU interface into a Lex 300 reverb unit. I then take the analog outputs from the Lex 300 and bring them back into Logic. I want the send to be mono as I am mostly sending from mono recorded instruments and voices. So chain would look like this:
Track 1
Send Bus 8
_Bus 8 Mono output_
MOTU 2408 Input
Patch Bay cable
Lex 300 Mono input ///
(now coming out)
Lex 300 Stereo Out
patch bay
MOTU Stereo Inputs 15/16
Logic Stereo Input 15/16
Mix.
The problem with the chain is that I cannot select a _mono output_ - it only allows for a stereo output. I can pan it one way or the other but it still does not seem to function correctly and toggling the mono/stereo button does not change the fact that this is still a stereo output. I hope this does not make it more complicated - it seems like there should be a simple solution. Any ideas? Thanks. -
How to create characteristics in BW based on generic datasource fields
hi ALL,
Actually, i created generic datasource based on database view in SAP R/3
Database view is created based on table LFA1.
Replicated the the datasource in SAP BW
Now, I have to create characteristics (master data) based
on generic datasource fields
Thanks in Advance.
Best Regards
M A MubeenHi Abdul,
for that you just create one charecterstic of Info object (with the same technical charecterstics of R/3 field).. and maintain master data..
now create one data source in BW side.. and select your data source and replicate data with your generic datasource...
and load the data..
regards
@jay -
How To Create An SMS Flash Based Chat with Multiple Usersfor Website
I have a site, that will need messaging service for up to
four people at a time. All users are part of a database in mysql. I
want to use my database to extend the usage of the site to live
chat. Does anyone know how to start and where to go find out how to
start, so far in flash I have textfield and input field but how to
connect is beyond me right now. Please help.Have a look
Here -
How to create a xml output in report 2.5
Hi
Please Anyone using reports 2.5 and trying to
implement XML outputsolutions ?? I have some
oracle reports that need to produce XML output
I know that 6i supports XML output. i dont know
how to do in 2.5. If anyone has done anything similar
to this, I'd be interested in hearing different solutions?
Thanks,
Parthi[ajayubbott],
I am not sure if you should create another folder to house all your servlets when using Java Web Server 2.0.
The servlet invoker of Java Web Server 2.0 looks at the <server_root directory>/servlets/ directory as the root servlet directory by default and any servlets that is housed under this directory is monitored by the custom class loader provided by Java Web Server 2.0.
This custom class loader will automatically reload any serlvet class files that are modified i.e. a newer version of the servlet that is newly compiled e.g. change in functionality. What this means is that you don't have restart the web server to reload any new version of the existing servlets on the web server.
HTH.
Allen Lai
Developer Technical Support
SUN Microsystems
http://www.sun.com/developers/support/ -
How to create Discussions Task Flow Based on Oracle Content Server
Hi,
I need to create an ADF application consisting of the following aspects:
1) Upload, Download and Share documents (I'm using Documents Services provided by WebCenter Jdeveloper Extensions)
2) Create discussion threads and forums (I'm trying to use Discussion Services provided by WebCenter Jdeveloper Extensions)
3) User should be able to do an universal search i.e search both documents and discussions forums. (I'm using Search Services provided by WebCenter Jdeveloper Extensions)
I'm using "Oracle Content Server 10g for WebCenter" to manage my documents and discussions. While logging into GUI of OCS, I'm able to create and post discussion threads.
But, I'm unable to create discussions adf task flow based on Oracle Content Server.
The demos/tutorials/dev guides provided at http://webcenter.oracle.com have only described using WLS_Services managed server which is created and setup using WC Suite 11g.
But I couldn't find any information to develop these discussion services using Jdeveloper WebCenter Extensions and Oracle Content Server.
Please let me know, if anyone has tried this or if you have any idea of how to go about it.
Thanks in Advance,
Harikiran.
Edited by: harikiran on Jul 13, 2010 3:23 PMHi.
You have official documentation introducing ADF Task Flows here: http://docs.oracle.com/cd/E23943_01/web.1111/b31974/taskflows.htm
And you have next step by step tutorials to learn how to implement Task Flows:
http://yonaweb.be/webcenter_tutorial/part_6_building_taskflow_and_consuming_it_webcenter_portal (Yannick blog post).
http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_57/jdtut_11r2_57.html (official JDev samples).
http://danielmerchanoracle.blogspot.com.es/2011/08/integrar-adf-task-flows-propios-en-una.html (My spanish blog with "how to add a Custom Task Flow into WebCenter Portal Application", 3 different and possible ways).,
Probably Yannick Blog post if you need to understand how to integrate Bounded Task Flows with WebCenter Portal's.
Regards.
Maybe you are looking for
-
Dear All, Can any one tell me how to make a consingment fill up to customer ,from the vendor consingment stock ( indicator K). Regards Satish
-
Kindle App crashes on MacBook Pro (with Mavericks)
Hi Folks, Every time I start my Kindle App in my MacBook Pro with network up it crashes after a few seconds. When network is down, it can work normally for several minutes, but sometimes it crashes too. Here what I got: Dener macbook$ uname -a <<--
-
Process password protected pdf in automator.
I have this workflow which processes pdf files. What i have not been able to do is to make automator ask for the pdf password if the file is protected. I have been able to circumvent this by opening it with preview and printing it to a pdf file which
-
hello. I want to block only calls they receive. I do not want to be locked and SMS. because when receiving messages from phone operator, software block my message. I want to restrict only private numbers. How can I do this?
-
JTree Node Color, to distinguish between different activities
Hi, Situation: Dynamic JTree (Tree is constructed from as a result of Database). User has the option to either Enable / Disable node and can repeat the activities but restricted only one activity per node, the node is to be highlighted; to r