How I count from 10 to 0 then back to 10?
I am a motor with LabVIEW and I would like to advance a position 14 to 0 in increments of 1 then back up to 14 in 1 increments, and stop there. Any suggestions on how I could set up a loop to do. The routine will be part of a state machine base and whenever I enter this State, that I would like to make the increment.
Thank you.
14 or 10? The subject says 10, but the message says: 14,.
Just keep track of if you count up or down in a shift register. Put 1 in the shift register, if you're out,-1 if you are backwards. Just add this value to the County that you store in an another shift register. When you hit one end or the other, take the negative of it and put it back in the register shift.
Tags: NI Software
Similar Questions
-
Hello
I am recieveing a number between a VI, and I want to count from the number received up to 1. The number is subject to change.
If it works for you? Would not need a shift register if you're going to go in order.
Should be the last iteration (123-122 = 1). Make sure you take into account that it would be 1-based, so if you use the screw of Excel, you will probably need to decrement to be the zero-based index.
Edit: Do what crossrulz says if your ultimate goal is the release of table, simply load as an array from the outset.
-
How to count up to 8 and then start again
My problem is that I can't seem to reset the countReg to 0 var once it hits 8. any ideas?
var countReg:Number = 0;
function nextReg(event:MouseEvent): void
{
If (countReg is 9)
{
(countReg == 0);
}
countReg ++;
trace (countReg) / / it keeps only count up. unbootable after 8
}
This.next1_btn.addEventListener (MouseEvent.CLICK, nextReg);
Thank you very much
function nextReg(event:MouseEvent): void
{
countReg = (countReg + 1) %9
}
-
My Pc does not start at times, especially first time in the morning, an alarm tone sounds, then it tries to start, Frost pattern on the screen... or black at all. then after pressing the new button could start up of normal, it will be very slow. Help, please
Hi WolfgangKlinger,
· Did you do changes on the computer before the show?
· You're able to boot in safe mode?
· You get the error message?
Follow these methods.
Method 1: Disconnect all external devices except the keyboard and mouse.
Method 2: Start your computer in last known good configurations.
How to start your computer by using last good known Windows XP Configuration
http://support.Microsoft.com/kb/307852
Applies to:
- Microsoft Windows XP Home Edition
- Microsoft Windows XP Professional
Method 3: Follow these steps:
Step 1: Start the computer in safe mode and check if the problem persists.
A description of the options to start in Windows XP Mode
http://support.Microsoft.com/kb/315222
Step 2: If the problem does not still in safe mode, perform a clean boot to see if there is no conflict of software like clean boot helps you eliminate software conflicts.
How to configure Windows XP to start in a "clean boot" State
http://support.Microsoft.com/kb/310353
Note: After completing the steps in the clean boot troubleshooting, follow the section How to configure Windows to use a Normal startup state of the link to return the computer to a Normal startupmode.
After the clean boot used to resolve the problem, you can follow these steps to configure Windows XP to start normally.
(a) click Start, run.
(b) type msconfigand click OK.
(c) the System Configuration Utility dialog box appears.
(d) click the general tab, click Normal startup - load all services and device drivers and then click OK.
(e) when you are prompted, click on restart to restart the computer.
Method 4: Follow the steps in the article.
Advanced Troubleshooting for General startup problems in Windows XP
http://support.Microsoft.com/kb/308041
For reference:
How to make a computer faster: 6 ways to speed up your PC
-
I downloaded an application from my iphone and then deleted. Now when I open AppStore I purchased apps and its still there. How can I remove it from there even if I have no more app?
The applications that you have downloaded will be available for re - download also a practice.
Apps y cannot be removed, you can hide only.
Read here: hide and expose the purchases made on the iBooks Store - Apple Support, App Store or iTunes Store
-
How to count the pulses with digital input on 6351
Hi all experts in Labview,.
I just got my USB x series 6351 and it works fine, but I certainly lack of labview skills to use it to its full potential.
I would like to read digital pulses with several digital inputs and count the number of pulses each T interval in time. All impulses that I entered on any edge of the clock are not synchronized and can occur at random times during the tests. Basically I have an oscillator of square waves can I modulate the frequency. I don't want to use the meter as inputs as I'm limited to only 2 entries (if I use the option 2 input meter for metering of pulses or frequency). The input frequency can range from 0-1 kHz and goes 0 - 3V. So not too fast, and I shouldn't make too many mistakes trying to get the count of pulses and then back out the frequency in accordance with article ni.com on counters.
I would like to read the 8 digital input channels and get the number of impulses for each channel. I searched high and low for help online but can't find examples that have been useful. Anyone have any ideas on how to go or direct me to a resource? Thank you very much in advance!
Are you worried about getting the number as a physical operation timed? It would be nice to acquire a digital waveform and then postprocess on it to detect how many events took place? I've attached an example that shows how you can accomplish this. It reads a digital waveform and then uses a detection of crete VI to determine how many pulses occurred. Should be a few adjustments to your particular signal. The VI I use seems to count events twice (probably count each edge), so counting it gives should be reduced by half in order to work.
-
How to count the tank &; number?
Hi all
11.2.0.1
I have an EMP table with column EMPID (varchar2 (15))
It contains the values of numbers and characters.
For example:
5365
cllaurena
6356
5365
csroxas
fstang
1010
cuermita
fstang
How to count all the digital and all characters, or a group of tank and the number without creating features?
Thank you all,
PK
Are you after something like this?
WITH t AS (SELECT '5365' str FROM DUAL UNION ALL SELECT 'cllaurena' FROM DUAL UNION ALL SELECT '6356' FROM DUAL UNION ALL SELECT '5365' FROM DUAL UNION ALL SELECT 'csroxas' FROM DUAL UNION ALL SELECT 'fstang' FROM DUAL UNION ALL SELECT '1010' FROM DUAL UNION ALL SELECT 'cuermita' FROM DUAL UNION ALL SELECT 'fstang' FROM DUAL) SELECT CASE WHEN LENGTH (TRANSLATE (str, '~0123456789', '~')) IS NULL THEN 'num' ELSE 'not_number' END typ, COUNT (*) FROM t GROUP BY CASE WHEN LENGTH (TRANSLATE (str, '~0123456789', '~')) IS NULL THEN 'num' ELSE 'not_number' END;
TYPE COUNT (*)
------------------------------------------
num 4
not_number 5
See you soon,.
Manik.
-
How to count the number of nodes under each parent in any given xml
How to count the number of nodes under each parent in any given xml. for example the xml below was
books has 3 childern, library [1] has 4, [2] library has 6 and bookshop [3] has 2. is it possible to get the number of tags in a childnode duplicate IE library [1]
Book1 Tagus repeated twice... vice versa. do we need to make plsql lie we can achieve through sql
< book >
< library >
ABC < book1 > < / book1 >
BCA < book2 > < / book2 >
ACR < book1 > < / book1 >
Lac < Book4 > < / Book4 >
< / book >
< library >
ABC < book1 > < / book1 >
BCA < book2 > < / book2 >
ACR < book3 > < / book3 >
ACR < book3 > < / book3 >
tray of < bookn_1 > < / bookn_1 >
adjusted cost base < bookn > < / bookn >
< / book >
< library >
ABC < book1 > < / book1 >
BCA < book2 > < / book2 >
< / book >
< / books >
I tried this... query.
Select
XMLQUERY ('count($doc/Books/Bookstore[1]/descendant::*)' in the way of xmltype ("< books >
< library >
ABC < book1 > < / book1 >
ACR < book1 > < / book1 >
Lac < Book4 > < / Book4 >
< / book >
< library >
ABC < book1 > < / book1 >
BCA < book2 > < / book2 >
< / book >
(< / books > ')
as 'doc' of happy return) .getNumberVal () as node_count
of the double
Select
XMLQUERY ('count($doc/Books/descendant::*)' in the way of xmltype ("< books >
< library >
ABC < book1 > < / book1 >
ACR < book1 > < / book1 >
Lac < Book4 > < / Book4 >
< / book >
< library >
ABC < book1 > < / book1 >
BCA < book2 > < / book2 >
< / book >
(< / books > ')
as 'doc' of happy return) .getNumberVal () as node_count
of the double
How can I get the counts for each parent in a single query
Published by: user7955917 on August 24, 2012 07:26Generic function how you want the query to be.
If the structure is known in advance, as in your example a 'books' and then a 'library' root element, it's as simple as:
SQL> select x1.parent_id, x2.child_name, count(*) 2 from tmp_xml t 3 , xmltable( 4 '/books/bookstore' 5 passing t.object_value 6 columns parent_id for ordinality 7 , child_list xmltype path '*' 8 ) x1 9 , xmltable( 10 '/*' 11 passing x1.child_list 12 columns child_name varchar2(30) path 'name()' 13 ) x2 14 group by x1.parent_id, x2.child_name 15 order by x1.parent_id, x2.child_name 16 ; PARENT_ID CHILD_NAME COUNT(*) ---------- ------------------------------ ---------- 1 book1 2 1 book2 1 1 book4 1 2 bookn 1 2 bookn_1 1 2 book1 1 2 book2 1 2 book3 2 3 book1 1 3 book2 1 10 rows selected
If you want a generic solution that works without knowledge of the structure, you will need a recursive approach, and most importantly, you should know which nodes in distinct, I suppose that the leafs?
Also, please help if you can provide the link of reference on the function name() years what are the other expression, that I can use after the path
You can start reading the documentation: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb_xquery.htm#CBAGCBGJ
The clause PATH expects a XQuery expression however before 11.2, we can put only simple XPath expressions.
-
How to count the number of data records?
Hey guys, how to count the number of records, I had on a data object variable?
Im having a result of sql query in a variable like this:
oDB.resolveNode("#command").query.select.value = "SELECT * FROM Customers WHERE CliNombre LIKE ' % ' + input1 +" %' ";
oDB.open ();
oDB.first ();
So I need to count the number of records retrieved by this SQL query at the moment. Help please
Then move the cursor back to the first record after you have your account.
There is a keyword count in SQL that will allow you to get the account of your request. You can run that first - get your account, and then run the actual query to get the Recordset. This would require a separate data connection. Some examples of code.
var xfa.event.newText = inName;
If (inName == "") {}
App.Alert ("you must enter a name--try again!")
}
var nIndex = 0;
While (xfa.sourceSet.nodes.item (nIndex) .name! = "DataConnection2")
{
nIndex ++;
}oDB = xfa.sourceSet.nodes.item (nIndex) .racing var (1); pertaining to the specified data connection node
App.Alert (ODB.saveXML ("Pretty"));var nIndex = 0;
While (xfa.sourceSet.nodes.item (nIndex) .name! = "DataConnection3")
{
nIndex ++;
}
var oDBCount = xfa.sourceSet.nodes.item (nIndex) .racing (1); pertaining to the specified data connection node
Configure sql call DB to get the number of records that match the criteriaoDBCount.nodes.item (1).query.setAttribute ("text", "commandType");
oDBCount.nodes.item (1).query.select.nodes.item (0) .value = "Select count (*) from table1 where AcctNumber = '" + inName + "'";
oDBCount.open)
oDBCount.close)Configure sql call DB to get the specified employee number
oDB.nodes.item (1).query.setAttribute ("text", "commandType");
oDB.nodes.item (1).query.select.nodes.item (0) .value = "Select * from table1 where AcctNumber = '" + inName + "'";
App.Alert (ODB. Nodes.Item (1) .saveXML ("Pretty"));now connect to the DB and get a recording
oDB.open)
oDB.close ();Note the SQL command use the keyword count (take a look at the oDBCount section). This will return a number of return to the cllaer. When I set up the data connection, a node count (*) that appeared there. I dragged to the form and it has created a field called count that the onus at this node. When the query is executed, the number of resulting records returns to this field. You can have hidden it so that your users can not see it and also to change the binding votes to zero, so it is not included in the data file that is submitted when the form is complete.
Paul
-
Help on query: how to produce from columns of ranks?
Hi all
I have a table table1 with below the structure and data
I have a requirement to query this table and generate the output belowItem State Value A1 MS 100 A1 GOA 3 A1 UP 4 B2 MS 34 B2 GOA 55 B2 PB 3 B2 DL 4 B3 MS 99 B3 TN 1
The problem here is that we can have multiple status codes, so as a result the query should return dynamically the number of columnsItem MS GOA UP PB DL TN A1 100 3 4 0 0 0 B2 34 55 0 3 4 0 B3 99 0 0 0 0 1
Is it possible to produce above output? Any help will be appreciated.
Oracle DB Version - Oracle 8i
Thanks in advance!Hello
This is called a pivot .
The basic technique is something like:SELECT item , SUM (CASE WHEN state = 'MS' THEN value ELSE 0) AS ms , SUM (CASE WHEN state = 'GOA' THEN value ELSE 0) AS goa , SUM (CASE WHEN state = 'UP' THEN value ELSE 0) AS up , SUM (CASE WHEN state = 'PB' THEN value ELSE 0) AS pb , SUM (CASE WHEN state = 'DL' THEN value ELSE 0) AS dl , SUM (CASE WHEN state = 'TN' THEN value ELSE 0) AS tn FROM table_x GROUP BY item;
but this requires you to know indicates how many there are, and what they are, when you write the query.
Since you have not, you must run a preliminary motion that will generate a select like the one above, or at least SUM expressions for variable columns. This is called dynamic SQL code , and a technique to do this is included below. (The example uses COUNT, but any aggregate, including the SUM function, work).
Another possibility is the aggregation of the chain, where instead of individual columns for each State, you have a huge column VARCHAR2, formatted to look like separate columns. The avaiable tools to do this in Oracle 8.1 are quite poor, however, so I think you're better with dynamic SQL.
/* How to Pivot a Table with a Dynamic Number of Columns This works in any version of Oracle The "SELECT ... PIVOT" feature introduced in Oracle 11 is much better for producing XML output. Say you want to make a cross-tab output of the scott.emp table. Each row will represent a department. There will be a separate column for each job. Each cell will contain the number of employees in a specific department having a specific job. The exact same solution must work with any number of departments and columns. (Within reason: there's no guarantee this will work if you want 2000 columns.) Case 0 "Basic Pivot" shows how you might hard-code three job types, which is exactly what you DON'T want to do. Case 1 "Dynamic Pivot" shows how get the right results dynamically, using SQL*Plus. (This can be easily adapted to PL/SQL or other tools.) NOTE: Using SQL*Plus file I/O, as in this example, is just one of many ways to do dynamic SQL. */ PROMPT ========== 0. Basic Pivot ========== SELECT deptno , COUNT (CASE WHEN job = 'ANALYST' THEN 1 END) AS analyst_cnt , COUNT (CASE WHEN job = 'CLERK' THEN 1 END) AS clerk_cnt , COUNT (CASE WHEN job = 'MANAGER' THEN 1 END) AS manager_cnt FROM scott.emp WHERE job IN ('ANALYST', 'CLERK', 'MANAGER') GROUP BY deptno ORDER BY deptno ; PROMPT ========== 1. Dynamic Pivot ========== -- ***** Start of dynamic_pivot.sql ***** -- Suppress SQL*Plus features that interfere with raw output SET FEEDBACK OFF SET PAGESIZE 0 SPOOL p:\sql\cookbook\dynamic_pivot_subscript.sql SELECT DISTINCT ', COUNT (CASE WHEN job = ''' || job || ''' ' AS txt1 , 'THEN 1 END) AS ' || job || '_CNT' AS txt2 FROM scott.emp ORDER BY txt1; SPOOL OFF -- Restore SQL*Plus features suppressed earlier SET FEEDBACK ON SET PAGESIZE 50 SPOOL p:\sql\cookbook\dynamic_pivot.lst SELECT deptno @@dynamic_pivot_subscript FROM scott.emp GROUP BY deptno ORDER BY deptno ; SPOOL OFF -- ***** End of dynamic_pivot.sql ***** /* EXPLANATION: The basic pivot assumes you know the number of distinct jobs, and the name of each one. If you do, then writing a pivot query is simply a matter of writing the correct number of ", COUNT ... AS ..."\ lines, with the name entered in two places on each one. That is easily done by a preliminary query, which uses SPOOL to write a sub-script (called dynamic_pivot_subscript.sql in this example). The main script invokes this sub-script at the proper point. In practice, .SQL scripts usually contain one or more complete statements, but there's nothing that says they have to. This one contains just a fragment from the middle of a SELECT statement. Before creating the sub-script, turn off SQL*Plus features that are designed to help humans read the output (such as headings and feedback messages like "7 rows selected.", since we do not want these to appear in the sub-script. Turn these features on again before running the main query. */
-
How to boot from a USB - Portege R500 flash drive
Hello
I have a Portege R500 running Windows XP, presented about 2 years ago and recently contracted a virus that has infected some of the startup files as the minute I connect it disconnects again, even in SafeMode! The quickest way I can think sorting is to reformat with the XP Recovery disk and reinstall windows.
Problem! The CD/DVD drive on the computer laptop stopped working earlier, tried almost everything in the thread on this site, but had no luck.
So my plan was to boot from a USB flash drive and do it this way. However in the boot parameters I only have the options of HARD drive / floppy drive / CD-ROM / LAN, none of them work. Does anyone know how to boot from USB flash drives?
Any help would be really appreciated
Hello
As far as I know, it should be possible to boot from USB FDD
I don't know if you would be able to boot from a USB flash drive, but it of certainly worth a try m
Generally, you can try to press the F12 key when the laptop is turned on.
A start menu should appear on the screen, then you should see all bootable devices.PS: as far as I know the USB startup was available in ToshibaHWSetup (tool of Toshiba which changes the settings of the BIOS under windows OS.) So I guess boot from USB must be possible.
Welcome them
-
How to delete everything on computer, and then reinstall all?
Quests? Do someone know how to delete everything on computer, and then reinstall all? Have a dvd restore cd, but it's not working.
Receive a toshiba computer: Windows Xp Home Edition Sp2, 1, 73Ghz, 503 MB Ram. Cause there is some problems with the computer, so I have to erase everything.
Hello
Boot from the recovery disc using the button 'C' at the beginning.
The laptop should begin to boot from the disc. Then simply choose the standard recovery procedure, and the restore process will start. -
How to inherit from Actor.lvclass?
Hi all
I'm playing with the framework of the actor. After reviewing the sample cooler evaporative project, I want to make an absolute minimum example from scratch. I want to open a blank project, manually add a few classes, make them inherit from Actor.lvclass so on (for example not start since the draft framework for actor model).
The first problem I encountered (and not yet resolved) is How to inherit from the Actor.lvclass?.
Time evaporation cooler project (ECEP) example and the project of the actor model framework (AFPT) have some classes already inheriting from Actor.lvclass new classes will have this option of legacy. ECEP and AFPT have also vi.lib-> Framework.lvlib actor in their dependencies.
But how actor Framework.lvlib in my dependencies? I can't just drag C:\Program NIUninstaller Instruments\LabVIEW 2012\vi.lib\ActorFramework\Actor Framework.lvlib with dependencies in my Project Explorer.
However, I can drag C:\Program NIUninstaller Instruments\LabVIEW 2012\vi.lib\ActorFramework\Actor Framework.lvlib in my Project Explorer (like adding a VI to the project). This gives me the ability to inherit from Actor.lvclass and if I remove actor Framework.lvlib in my project again (after a class inherit) it will be listed under dependencies. But I hope that there is a way to better / cleaner to him.
I wish it works when I move the project to another computer with a different labview installation path. My approach above will ensure that Framework.lvlib of the actor is still loaded in the subfolder vi.lib or is it now "hardcoded" aware of my installation path?
Best regards
Jonas CJYou should read some documents and tutorials on LVOOP, because it is the mechanism that is used. In this case, you must have the responsible actor in the project, so the simplest is the frame screws fall into a vacuum of VI, then go into your properties of the class, go to the legacy page and click the button change. The tree shows you the class loaded into the project, that's why you need the first step for the first class. After that, the class is already loaded, because the other your class inherits from this one, you don't need something it explicit the call.
With respect to the path, vi.lib is a logical path, so it does not work properly when moving between computers and versions of LV.
-
I have an acer aspire 4720z / with windows vista home premium / with the enabling technology / processor intel pentium dual core. I think I downloaded a program limewire lennex, it was suppose to be something else. Somehow that he closed my computor, luckly my cuzin was able to download windows vista ultimate SP1 64 2007 multimedia content on my laptop so that I can at least use MY COMP. But I think I like the version that is installed on my comp.better to the ultimate version on my comp.now, it does not seem as before prefome. Some things on my computer laptop don't prop wk. What should I do, go back to my version Home premium of moose? If so how to do that? I don't have a home premium recovery disc. I tried to install the updates of windows SP2 64 thought repairs that would set back 2 the origonal but settings it na not or at least update the ultimate version do you think I should do.
If you have downloaded Vista Ultimate and not bought, you use pirate software.
You will receive NO Support for pirated software.
If this does not work, contact Acer:
Acer eRecovery made
1. on the Acer splash screen, you can press Alt and F10 (at the same time press F2 to enter the BIOS) to make it appear a version BACK style eRecovery.
· The unit is able to reload Windows from this mode faster then CD.
· The default password is 000000 (6 zeros) and it is shown when you are prompted for the password.
· Users are able to change the password in this mode for eRecovery only.
· The system can retrieve the hidden on the hard disk (partition PQService) image or a CD/DVD media.
· It is possible to reload the factory CD/DVD style or snapshots that creates the eRecovery Windows version.
2. in Windows, there are 3 ways to access eRecovery functionality.
· Press Alt and F10
· Open Acer eManager and then double-click eRecovery.
· When a system is new it should automatically open this application and invite you to do the recovery media.
3. the Windows version of the eRecovery program is stronger then the Dos Version. Below you will find the various features of the Windows version:
Recovery settings: create backup files and change password
· Picture of the backup snapshot (create a disk image of your system configuration)
1. the system is able to make a CD/DVD image of the current state of mobile software including customer programs installed.
2. This CD/DVD is usable in Windows and DOS of the program version.
3. the drive should start, but isn't always.
4 when a snapshot is in fact the image is on the D: partition and then can be burned to disc if eRecovery is said to.
· Burn the Image to disc (create a backup disk)
1. you can create 3-7 CD or DVD 1-2 such as those that were sent with the units before eRecovery.
2. the serious CD are equal in usage to the system recovery CD and CD
· Remove data from backup image of capture instant user (if available)
1. This is how delete you the snapshot on the D: partition images
· Password: (change the eRecovery password)
1. measures: restore your system using an existing backup file or restore the default configuration in your system factory.
2 backup copy using one of the snapshots has been filed or the original image on the D: partition.
4. made eRecovery
· When the hard drive is replaced the system loses its characteristics eRecovery. These features are on the hard drive and cannot be reinstalled.
· When reinstalling from the CD/DVD's you will lose the eRecovery program but the DOS version can still function, as if uninstalled, you can not reinstall.
· eRecovery uses Ghost (as well as the use of our recovery CD) to create snapshot images.
· If the PQService partition is removed using fdisk or a utility under Windows, you may need to reinstall Windows.
· If the system is recharged using the DOS version you retain the eRecovery feature
Mick Murphy - Microsoft partner
-
How to count characters in Notepad?
I need to write a script in Notepad, and I also need to make sure I'm not more than 5500 characters. How to count characters? I can't find a button to do it.
Select all, then copy. Paste it into this online character counter
http://www.webworldindex.com/countcharacters.htmCheck again if necessary.
Bruce Hagen
MS - MVP October 1, 2004 ~ September 30, 2010
Imperial Beach, CA
Maybe you are looking for
-
Need driver SATA XP for Satellite Pro L300
Hello I have a Satellite Pro L300 Vista.If I have problems of major incompatibility with Vista I can swap the readers so I want to set up a second hard drive running on XP Pro. When I try to set up the XP he sees not the SATA hard drive. I know that
-
Pavilion g6: customer loses power on password and I need to recover the laptop - Pavilion g6
customer lost power on password and I need to recover the laptop - Pavilion g6 The disabled return code is = 63078592
-
Satellite Pro A200: I want to disable "tap to click".
Hello I want to disable the "tap to click" on my machine I tried to go to the settings of the control panel - mouse - device - settings - buttons, but the only choice there is 'enable the buttons' and if you clear the check box that you can not get o
-
Continuously perform calculations on the data
Hey guys,. So I have this program that generates pulses of signals using NOR-SCOPE, and I initially did so that each time that the user presses a button that they will perform certain calculations in order to generate a value that is stored in a tabl
-
Hello world I need to measure temperatures between 15 ° C to 40 ° C and to resolve precisely the changes in 0.1 ° C. My thermistor has a nominal resistance of 22 kOhm at 25 ° C and the resistance of 14 KOhm at 37 ° C. constant dissipation in air at 2