DAQmx 7.5 - how to use Events in VB 6.0
I'm using the type library (nidaqmx.tlb) supplied by DAQmx 7.5 to control a NI PCI-6251 board from VB 6.0
(unfortunately Measurement Studio does not support this board for VB 6.0 anymore).
Is there any tutorial or example describing how to use events (e.g. DAQmxRegisterEveryNSamplesEvent)
in VB 6.0?
hi, you must create connection like this:
Set Connection = New ADODB.Connection
Connection.Open "Provider=OraOLEDB.Oracle; " & _
"Data Source=" & strServer & "; " & _
"User ID=" & strUserName & "; " & _
"Password=" & strPassword & "; "
where strUserName - your user,
strPassword - password to your user,
strServer - alias to your server.
My Oracle 10g is installed on c:\oraclexe\...in access you have database file, in oracle - data source
your alias is maybe XE, if not you seek it in file tnsnames.ora which is in path like this c:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
Andy
Similar Messages
-
Why and how to use events in abap objects
Dear all,
Please explain me why and how to use events in abap objects with real time example
regards
pankaj giriHi Pankaj,
I will try to explain why to use events... How to use is a different topic.. which others have already answered...
This is same from your prev. post...
Events :
Technically speaking :
" Events are notifications an object receives from, or transmits to, other objects or applications. Events allow objects to perform actions whenever a specific occurrence takes place. Microsoft Windows is an event-driven operating system, events can come from other objects, applications, or user input such as mouse clicks or key presses. "
Lets say you have an ALV - An editable one ...
Lats say - Once you press some button you want some kind of validation to be done.
How to do this ?
Raise an Event - Which is handled by a method and write the validation code.
Now you might argue, that I can do it in this way : Capture the function code - and call the validate method.
Yes, in this case it can be done.. But lets say .. you change a field in the ALV and you want the validation to be done as soon as he is done with typing.
Where is the function code here ? No function code... But there is an event here - The data changed event.
So you can raise a data changed event that can be handled and will do the validation.
It is not user friendly that you ask the user to press a button (to get the function code) for validation each time he enters a data.
The events can be raised by a system, or by a program also. So in this case the data changed event is raised by a system that you can handle.
Also, Lets say on a particular action you want some code to trigger. (You can take the same example of validation code). In this case the code to trigger is in a separate class. The object of which is not available here at this moment. (This case happens very frequently).
Advantage with events : Event handlers can be in a separate class also.
e.g : In the middle of some business logic .. you encounter a error. You want to send this information to the UI (to user - in form of a pop up) and then continue with some processing.
In many cases - A direct method call to trigger the pop up is not done. Because (in ideal cases) the engine must not interact with UI directly - Because the UI could be some other application - like a windows UI but the error comes from some SAP program.
So - A event is raised from the engine that is handled in the UI and a pop up is triggered.
Here -- I would have different classes (lets say for different Operating Systems). And all these classes must register to the event ERROR raised in application.
And these different classes for different Operation systems will have different code to raise a pop-up.
Now you can imagine : If you coded a pop-up for Windows (in your application logic) .. it will not work for Mac or Linux. But of you raise a event.. that is handled separately by a different UI classes for Win, Linux or Mac they will catch this event and process accordingly.
May be I complicated this explanation .... but I couldn't think of a simpler and concrete example.
Cheers.
Varun. -
How to use event structure of event data nodes event filter nodes in programming
hi,
I need manual of how to use 'event structure' events of 'event data nodes' and 'event data filters'...please help me....
Regards
RavindranathI'm not really sure what you are looking for here. Did you do a search in the LabVIEW help for Event Structure?
The Event Data Node just returns information about the event, like control data, control reference, what caused the event, etc.
The Event Data Filters are just used in Filter Events. This allows you to discard an event or change the data that the event will recieve.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
How to use Event Tracking Code for Google Analytics in Dreamweaver CS5
I need to track clicks on links that go to an outside website. I've read about "event tracking code". I'm not sure if it's the right tool to use. And if it is, I've spent several hours reading about it and I can't figure out how to use it. It looks like you need to be an expert developer to be able to make sense of all this. I've always been helped when I ask a question here, I'm hoping that someone can help me.
What my client needs is to know what links are being clicked, and how often. Here's the page where I want to do this: Available Homes - Arizona Vacation Home Rentals
I added a code that I created using the tool I found here: General Event Tracking Code for Google Analytics but can't see to be able to make this work. I added this code to the first link called "View it Here" for the top, left house. Here's the code: <a href="http://www.homeaway.com/vacation-rental/p3495538" onClick="ga('send', 'event', { eventCategory: 'clicks', eventAction: 'clicks on homes', eventLabel: 'Clicked'});" target="_blank">View it HERE!</a>
Then I set a Goal in Google Analytics like it said in the instructions but it doesn't seem to work... I would APPRECIATE ANY HELP!
Thanks,
BrigitteI think you misunderstood what Event Tracking is designed for. This is from Google Help
Tracking Code: Event Tracking - Google Analytics — Google Developers
"Use this to track visitor behavior on your website that is NOT related to a web page visit, such as interaction with a Flash video movie control or any user event that does not trigger a page request."
Clicks on links are page requests. I think for your purposes, you may want the Cross Domain Link Tracking plugin.
Cross Domain Tracking - Web Tracking (analytics.js) - Google Analytics — Google Developers
Nancy O. -
How to use event parameters?
Hi
I've made simple eem applet for shutdown the port which trigered storm control event.
It is look like that:
event manager applet shut-storm
event storm-control
action 1.0 cli local python bootflash:shut-storm.py
and the script is
from cisco import CLI
from cisco import cli
import sys
import datetime
import time
import re
whitelist = [
"Ethernet1/1",
"Ethernet1/2"]
shlog = CLI('sh logg last 100 | i ETHPORT-5-STORM_CONTROL_ABOVE_THRESHOLD | last 3',False).get_output()
pat = re.compile(r'(\d{4} \w{3} \d{2} \d\d:\d\d:\d\d) \S+ \%ETHPORT-5-STORM_CONTROL_ABOVE_THRESHOLD: Traffic in port (Eth\S+|[Pp]o\S+)')
now = datetime.datetime.now()
delta = datetime.timedelta(seconds=180)
for l in shlog:
mobj = pat.match(l)
if mobj:
port = mobj.group(2)
logTimeStr = mobj.group(1)
logTimeObj = time.strptime(logTimeStr, "%Y %b %d %H:%M:%S")
logTime = datetime.datetime(*logTimeObj[:6])
if now-logTime < delta:
if port not in whitelist:
cli("conf t")
cli("interface %s" % port)
cli("shutdown")
But the python script is a bit complecs because it shoud find triggered interfece in log.
Is it possible to use event parameters? And how?
I know that they are:
sw1# sh event manager history events det
Event ID Time of Event Event Type Slot Policies
32 09/30/2013 15:40:51 storm_control active(1) shut-storm
interface = "Ethernet1/16", cause = "storm-control"Thank you Joseph.
It works.
Now the applet looks like:
event manager applet shut-storm2
event storm-control
action 1.0 cli local python bootflash:shut-storm2.py $interface
And the script:
from cisco import cli
from syslog import syslog
import sys
whitelist = [
"Ethernet1/1",
"Ethernet1/2"]
port = sys.argv[1]
if port not in whitelist:
cli("conf t")
cli("interface %s" % port)
cli("shutdown")
syslog(2, "Interface %s was shutdown due to storm conditions" % port) -
How to use event to detect the change of a array variable?
I have a main application that includes a lot of sub
components. the main app mxml file import a public class that
includes an array variable. Each of the values in the array can be
updated in the sub components.
I would like to have the main mxml be able to detect the
change of the values of the array. Is it possible to use event? And
how? Is there a good example to follow?See this FB3 help topic, particularly watchers:
Defining data bindings in ActionScript -
IMovie: How to use events with low resolution?
When I have a less than HD (either 720p or 1080p) movie I like to reduce the size of the screen that it is showing in. Since I like to show my movies on a 1080p 55 inch lcd screen, I really don't enjoy having these 640 x 480 or smaller movies blown into a blurry mess.
What I have done is make a piece of blue or other color footage and enlarge it to whatever length I need by dragging pieces from the event into the project story board. Then I open up a new event and bring in the less than stellar resolution movie.
I drag this movie into the Project Story Board, and click on PIP on the resulting menu. I put a border around the PIP movie and enlarge it to a size that still has it sharp. Then I trim the movie to what fits.
IS THERE ANOTHER WAY TO DO THIS?I think that's an excellent method. It works for you and is a straightforward workflow. You may already be doing this (and I haven't tested it), but you could drag coloured backgrounds to your project from the Maps, Backgrounds and Animatics panel (centre toolbar far right). Then do your PIPs as you described.
I can't think of a better solution using iMovie. Probably it can be done differently in Final Cut Pro X (available from the Mac App Store).
John -
How do I use event.target.name in AS2?
Thanks to kglad I was able to see how event.target.name in AS3 could make a button load a movieclip with the same namesake.
I'm doing the same thing now in AS2 but don't know what to write instead of event.target.name.
And so at the moment each button pushes info into an array and then a function uses that to decide which movieclip to attach to a holder after it has faded out once, and then fades in again...
// ***** IMAGE GALLERY START ***** //
// Add image to holder
imgholder.attachMovie("img0", "image0_0", 1)
// Array
var nextLoad = ["img0"];
// Btn listeners
img5.onRelease = function() { trace (nextLoad); nextLoad.pop(); nextLoad.push("img5"); btnClick() } // Written on 1 line
img4.onRelease = function() { trace (nextLoad); nextLoad.pop(); nextLoad.push("img4"); btnClick() }
img3.onRelease = function() { trace (nextLoad); nextLoad.pop(); nextLoad.push("img3"); btnClick() }
img2.onRelease = function() { trace (nextLoad); nextLoad.pop(); nextLoad.push("img2"); btnClick() }
img1.onRelease = function() {
nextLoad.pop();
nextLoad.push("img1");
btnClick()
img0.onRelease = function() {
nextLoad.pop();
nextLoad.push("img0");
btnClick()
// The btn function
function btnClick() {
trace ("click");
var myImgTween:Object = new Tween(imgholder, "_alpha", Strong.easeOut, 100, 0, 1, true);
myImgTween.onMotionFinished = function() {
fadeOutImg();
// The btn function part II
function fadeOutImg() {
trace ("fadeOutImg");
imgholder.attachMovie(nextLoad, "image1_1", 1);
var myImgTween:Object = new Tween(imgholder, "_alpha", Strong.easeOut, 0, 100, 1, true);
I know I should be able to push the button name into the array, but am having to use a string... I'm sure my code is cumbersome!! But it works. I've tried pushing the button name but it end up including the full stage reference.
Is there a cleaner way of doing this using event.target.name?
Thanks for looking!There is no event.target in AS2. However since AS2 has no way of remembering the scope object where the target object resides, you can use this to your advantage to retrieve the name of the target by using the "this" command in the function whenever you use the above format "mc.onPress = myfunc". FYI, the popular workaround Delegate, made it possible that when you called "this" in the function, you could retrieve the scope object where the target instance resides. So without its use, "this" will return the name of the target object. Anyway this is the code you can use:
imgholder.attachMovie("img0","image0_0",1);
var nextLoad = ["img0"];
img5.onRelease = onImgRelease;
img4.onRelease = onImgRelease;
img3.onRelease = onImgRelease;
img2.onRelease = onImgRelease;
img1.onRelease = onImgRelease;
img0.onRelease = onImgRelease;
function onImgRelease():Void {
nextLoad.pop();
nextLoad.push(this._name);
btnClick();
// The btn function
function btnClick() {
trace("click");
var myImgTween:Object = new Tween(imgholder, "_alpha", Strong.easeOut, 100, 0, 1, true);
myImgTween.onMotionFinished = function() {
fadeOutImg();
// The btn function part II
function fadeOutImg() {
trace("fadeOutImg");
imgholder.attachMovie(nextLoad,"image1_1",1);
var myImgTween:Object = new Tween(imgholder, "_alpha", Strong.easeOut, 0, 100, 1, true); -
Hello Everyone
I am using Datagrid in my Canvas.
I use mouse wheel to scroll the datagrid. But in one scroll
through that wheel make the more than 4 rows to be scroll.
So Now my requirement is to control the delta value of mouse
wheel event and how to use that with my datagrid so that i will
able to scroll one row through mouse wheel scroller.
Thanksplease give me some suggestion around it.
I want to scroll one row of datagrid with per mousewheel
scroll. I am not getting how to use the scrollMouseWheelMultiplier
property of the IConfiguration class because i am not able to
create the object of this class.
I am using the Flex 3.0 and flash 9 version.
please help me out around this. -
I have 55,000 images organized into about 1700 events. The only reasonable way to view my library is using events in iPhoto where each event has one image That still leaves 1700 images to sort through but that is a lot easier than 55,000 images. In the side bar is a folder with "iPhoto Events" but those views still show all of the slides. How can I create events and view my photos as events as in iPhoto? Events are critical for large libraries and has been my primary way to sort images.
Thanks!I had a problem a couple of months ago when iPhotos suddenly rearranged the order of my Events (Why won't iPhoto let me arrange my photos?) . I was told "Use albums not events - events are not a good way to organize - albums and folder are designed for organisation and are very flexible".
Haha! I should have paid attention and read between the lines! My iPhotos were highly organised groupings - not according to date but the way I wanted them - and it was so easy to do! I see now that if I had them all in albums, as per the Apple Apologist suggestion, I wouldn't have this unholy mess I have been left with just to make iPhone & iCloud users happy. I am now going through Photos and making Albums (of what used to be in my Events) ... maybe I'll get this finished before they do another non user friendly update! -
How to use the table maintenance events for validating the input entries..?
Hi,
I have created a Z table with 6 fields in which all are KEY fields. All are of CHAR type. I have created the Table Maintenance Generator for the same. While maintaining the entries in the table, even though I maintain a blank entry for a field it is saving the entry. But, I don't want that way. All the fields are mandatory in my table. One should enter all the fields. Otherwise it should not allow to save the entry. So, I think it can be done using the Table Maintenance Events. can someone tell me how to use the Table Maintenance Events. and which event to use for my reuqirement and what is the logic to be written.
Or Is there any other way to solve my problem.
Please share your inputs. Thanks in advance.
Best regards,
paddu.In the table maintenance generator, Environment --> Modifications --> Events then a screen will be appear here,we need to create the Events.In the EVENTS screen, press new Entries, there give 01(Before Saving the Data in the Database) and give a name(This will become a PERFORM), then click the Editor pushbutton, this will be there at the right side of the entry, then a popup will be appear, you can create an include program, there inside of the include program write ur code.
Here is documentation for Event 01(Before Saving the Data in the Database )
Event 01: Before Saving the Data in the Database
Use
This event occurs before new, changed or deleted entries are written to the database. Other activities can be performed, for example:
hidden entry processing
fill hidden fields
flag data to be written to hidden tables after the database change.
To have the changes saved by the central maintenance dialog routines, SY-SUBRC must be set to 0 at the end of the routine.
Realization
This event has no standard routine. The following global data is available for the realization of the user routine:
internal table TOTAL
field symbols
field symbols <ACTION> and <ACTION_TEXT>
<STATUS>-UPD_FLAG
If internal table data are to be changed before saving, t he changes should be made in both the internal table TOTAL and in the internal table EXTRACT.
FORM abc.
DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
LOOP AT TOTAL.
IF <ACTION> = desired constant.
READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
IF SY-SUBRC EQ 0.
F_INDEX = SY-TABIX.
ELSE.
CLEAR F_INDX.
ENDIF.
(make desired changes to the line TOTAL)
MODIFY TOTAL.
CHECK F_INDX GT 0.
EXTRACT = TOTAL.
MODIFY EXTRACT INDEX F_INDX.
ENDIF.
ENDLOOP.
SY-SUBRC = 0.
ENDFORM.
Regards,
Joy. -
How to use a event structure with a state machine
First, I would like to inform you that I only work on LabView part time, and have much to learn. Anything I do learn, I usually forget until I need it again, because I only work on it part time.
Using your StopWhileLoopMOD[1].vi, I am trying to put a state machine inside the event structure.
Related link: http://forums.ni.com/t5/LabVIEW/How-to-stop-while-loop-in-Event-case/td-p/465564/page/2
Here is my application: on the front panel, the user can select any combination of 7 different tests. I have created cases to perform each step of each test in the correct order, but if the user presses stop, the tests won't stop because some of the cases have a while loop inside the event structure (like you mentioned is a bad idea). The user should be able to stop the test, reselect tests to perform, and re-start the tests.
When the start button is pressed for the event structure, I need all the cases to run in the proper order, unless stop is pressed.
In the past I have indexed an array and used that to run the state machine, but it won't stop immediately.
I have sub VIs that are built in while loops because the outputs of the product needs time to stabilize. The state machine stops and waits up to a certain number of iterations. If it passes the test, the while loop stops and the next state starts. If it takes too long, it exits and reports an error. Maybe I need to just use the state machine and not an event structure?
Is there a good example of an event structure?
metzler CLAD
Solved!
Go to Solution.I'm not sure exactly what you are asking, but it sounds like you want to script a bunch of tests and if the user says stop, to immediately stop the current test and abandon the others? I'm going to assume that you know how to clear the array so that it will abandon the others, so I'm guessing that you are having trouble abandoning the current test? If this is indeed the case, then the problem is that you are not able to propagate the message from the main VI FP which is the GUI to the sub vi which is the test, where the test may or may not have a GUI (FP visible) of it's own. Threading was the first thing to come to mind, but this may not be necessary using events.
You can do this by passing a refnum of the stop button to the subVI, where you can then add that wait to the event case structure.
I've attached 2 VIs, mainvi.vi which is just a loop displays the count*2 (number of seconds passed since running) that will call subvi.vi and then check to see if the stop button is pressed. mainvi.vi is by no means a state engine, it is just a simple loop for demonstration purposes. subvi.vi just waits 2 seconds and leaves, it is a better structured state engine with an init state to start a poll case to wait for events and an exit state to clean up. You can modify this any way you wish to get it to do what you want. You will note that even if subvi.vi is being executed, it will terminate immediately when the stop button is pressed.
Hope this helps.
A
Attachments:
mainvi.vi 17 KB
subvi.vi 33 KB -
How to Disable Event firing while updating a list item using poweshell
Hi All,
I am working on a powershell code which updates most of the list items in the entire web application. I am using SystemUpdate($false) to update the items so that 'modified' and 'modified By' and versions are not changed.
However event receivers gets fired which is now a problem. I want to disable the Event receivers before update and enable it after update. I want powershell code for this. I am using SharePoint 2010.
Your help would be much appreciated. Thank you in anticipation.
Regards
Karthik R.hi
check this thread:
How to disable event firing outside an event. It contains example on C#, but it is not difficult to convert it to PowerShell.
Blog - http://sadomovalex.blogspot.com
Dynamic CAML queries via C# - http://camlex.codeplex.com -
How to Raise Event in BW using ABAP program
Hi BW Experts,
Can anyone tell how to raise event in BW using a ABAP program.
Program should ask for the event to be raised and destination server.
Edited by: Arun Purohit on May 14, 2008 11:04 AMHi Arun,
By Using BP_EVENT_RAISE function module you can raise an event.Create an ABAP program and call the function module BP_EVENT_RAISE and create a avariant to specify the event to be raised. Schedule this ABAP code. Go to the start process type and set the schedule to "after event" and mention the event name that you created. Also, I think now you can mention the time as well and you can also schedule for periodic scheduling.
T Code : SM62 --> To Create an Event.
T Code : SE38 --> To Create an ABAP Program
Use Function Module : BP_EVENT_RAISE to raise an event.
Related links:
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
http://help.sap.com/saphelp_sem40bw/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset
Hope this helps
Regards
CSM Reddy -
HOW TO CREATE and USE EVENTS IN WORKFLOWS .
HOW TO CREATE and USE EVENTS IN WORKFLOWS with the help of classes.
What i am doing is..
open se24
event tab->event name->parameters
method tab->method name->event handler->copy parameters
interface tab->if_workflow->enter
tell me what else to do step by step
Another important thing is that HOW to use these class events to trigger the workflows.
REPLY ASAP
THXS IN ADVANCEHi,
Pl. see this blog...
Raising ABAP OO events for workflow
Regards,
JOy.
Maybe you are looking for
-
Bridge won't open my NEF files
I updated my MAC OS to Yosemite and now Bridge won't open NEF files from my Nikon D7100 SD card. I have updated Camera Raw to version 7.1 and am running Photoshop CS6
-
Is there a way to recover deleted text messages on an iPhone 4s?
Is there a way to recover deleted text messages on an iPhone 4s?
-
Hi, I want to customize the workflow screen. I need to decrease the size of Approval button . Is it possible to do this or it takes the default standard size. Thanks. Shweta
-
How to transfer camera pictures to the microsd card in my 9860 torch?
I can't find how to do that.. Ray A Torch 9860 7.0.0.440 AT&T - no BIS
-
My broadband speed vs surrounding area
my broadband was down last week, so i was having to use a neighbours wireless. I was shocked at how much faster their download speed was, 850 kb/s compared to my pitiful 100 kb/s Now i pay for the highest speed package and get NOwhere near it clearly