Simulated device with visual basic 6.0
It is possible to run a VB application using simulated devices? I have created a simulated PCI6024E, but my VB application does not find the device.
Thanks.
The simulated DAQ devices only work for DAQmx. If you are using the CWDAQ activex controls, you will not be able to see them becuase these activex controls use Traditional DAQ. You can use VB 6.0 with DAQmx. Refer to this KB for more information.
Bilal Durrani
NI
Similar Messages
-
I'd like to measure two differential input signal(I.e. A+ and A-),below is two test projects,
1.connect A+/A- to PCI 6052E card's ACH0/ACH8 ,and refer to GND for testing
2.connect respectively A+/A- to PCI 6052E card's ACH0/ACH8 for testing
Could you tell me the details of the second project?and give me a illustration in measurement studio with visual basic 6. 0 about the second?
In addition,I would like to measure the audio signal frequency,could you give me a illustration in measurement studio with visual basic 6.0?
Wait for your reply!Dear kelven,
Thank you for contacting National Instruments.
To address your question, there are Analog Input shipping examples that demonstrate how to measure an analog input differentially, as you specify in (2).
As for measuring the audio signal frequency, you may want to check out the following KnowledgeBase. The link is:
http://digital.ni.com/public.nsf/websearch/4b08380530d72d3b86256340004c3005
Let me know if you have any further questions or if this does not resolve your issue.
Thanks again and have a great day!
Chad AE
Applications Engineer - National Instruments -
Strange axbridge issue with Visual Basic
I started having a very strange problem with my axbridge wrapped bean around the time I switched to JDK 1.5. Problem is, I can't seem to get rid of it by rolling back to earlier versions.
Here's what happens: I create a very simple non-visual bean:
package pack;
public class Bean1 {
public Bean1()
System.out.println("Constructor");
public boolean someMethod ()
System.out.println("1");
return false;
I then create Bean1.dll using the packager.exe provided with the JDK, and register it as part of the packaging process.
Then, I go into Visual Basic 6 and enter this code:
Private Sub Command1_Click()
Dim xx As Object
xx = CreateObject("Bean1.Bean.1")
End Sub
On the CreateObject call, Visual Basic gives me the error "Object variable or With block variable not set", which isn't helpful.
In the Java console with level 5 tracing turned on, I see this:
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@17ba38f, refcount=1
basic: Registered modality listener
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@9ffe3f
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
basic: Stopping applet ...
basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@9ffe3f
basic: Finding information ...
basic: Releasing classloader: sun.plugin.ClassLoaderInfo@17ba38f, refcount=0
basic: Caching classloader: sun.plugin.ClassLoaderInfo@17ba38f
basic: Current classloader cache size: 1
basic: Done ...
basic: Joining applet thread ...
basic: Destroying applet ...
basic: Disposing applet ...
basic: Quiting applet ...
java.lang.NullPointerException
at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: Exception: java.lang.NullPointerException
java.lang.NullPointerException
at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: Modality pushed
basic: Joined applet thread ...
basic: Unregistered modality listener
The only thing I've found in the bug database that seems even remotely related to this is bug 6391104, which is related to plugins somehow.
I do not understand why applets are involved in this at all.
When I try to instantiate the COM object from a C++ program, everything works fine. My problem only seems to occur with Visual Basic (version 6, not .NET).
This problem seems so fundamental that it seems impossible that no one else has run into it, but there 's nothing about it on any forum or buglist that I've seen. So, I figured there must be something very obscure wrong with my setup. However, I tried installing this on a brand new machine using my trivial case, and I still have the problem. I'm really at my wits' end. Anyone have any ideas?You definately want to go to CR 2008. I'd recommed that you call 866-681-3435 and ask about the possibility of getting a 30 day eval.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
I am in an intro to programming course, and I am writing a console on Visual Basic 2013. My problem with Visual Basic right now is that I cannot get the formula to work. All of my inputted values end up being 0's. Am I using incorrect parameters,
am I misunderstanding how to use arguments; am I not coding correctly? The scenario for my problem is:
Areas of Rectangles: The area of a rectangle is the rectangle’s length times its width. Design a program that asks for the length and width of two rectangles. The program should tell the user which rectangle has the
greater area, or if the areas are the same.
//My code is
Module Module1
Sub Main()
Dim LENGTH As Double = 0
Dim WIDTH As double = 0
Dim AREA_1 As Double
Dim AREA_2 As Double
Dim RECTANGLE As String = " "
area1(LENGTH, WIDTH)
areaCalc1(AREA_1, LENGTH, WIDTH)
area2(LENGTH, WIDTH)
areaCalc2(AREA_2, LENGTH, WIDTH)
decision(AREA_1, AREA_2, RECTANGLE)
displayDec(RECTANGLE)
Console.WriteLine("Press any key to exit...")
Console.Read()
End Sub
Sub area1(ByVal LENGTH, WIDTH)
Console.WriteLine("Please input the following for your first rectangle:")
Console.Write("Length: ")
LENGTH = Console.ReadLine()
Console.Write("Width: ")
WIDTH = Console.ReadLine()
End Sub
Sub areaCalc1(ByVal AREA_1, ByRef LENGTH, WIDTH)
AREA_1 = LENGTH * WIDTH
Console.WriteLine("This is the area for rectangle 1: " & AREA_1)
End Sub
Sub area2(ByVal LENGTH, WIDTH)
Console.WriteLine("Please input the following for your second rectangle: ")
Console.Write("Length: ")
LENGTH = Console.ReadLine()
Console.Write("Width: ")
WIDTH = Console.ReadLine()
End Sub
Sub areaCalc2(ByVal AREA_2, ByRef LENGTH, WIDTH)
AREA_2 = LENGTH * WIDTH
Console.WriteLine("This is the area for rectangle 2: " & AREA_2)
End Sub
Sub decision(ByRef AREA_1, AREA_2, ByVal RECTANGLE)
If AREA_1 < AREA_2 Then
RECTANGLE = "rectangle 2"
Else
RECTANGLE = "rectangle 1"
End If
End Sub
Sub displayDec(ByRef RECTANGLE)
Console.WriteLine("The rectangle with the greater Area is " & RECTANGLE)
End Sub
End ModuleHi,
If you are just beginning to program i highly recommend setting the following options in the Visual Studio menu (Tools/Options). Open the Options window and go to the (Projects and Solutions) and click on (VB Defaults). Now set the options as follows.
Option Strict - On
Option Explicit - On
Option Infer - Off
And probably one of the most important things to do is learning to Debug your code. That will save you hours of headaches when you get unexpected results in your applications. You will know how to track it down and find where in the code your results
are being thrown off. There are quite a few Debugging tutorials on the internet. Here are a few decent ones.
Debugging Express
Breakpoints and Debugging Tools
If you say it can`t be done then i`ll try it -
Problems with visual basic and acrobat X
Hello,
In visual basic (excel), I had written a program in visual basic (excel) to open a pdf file on the local server.
Before I updated to acrobat pro X, I had acrobat pro 8 on my pc.
With the 8 I didn't had any problems to open the pdf-file.
Now with the X version, it only opens the start window of acrobat x pro.
Did they changed something in Xversion?
Does anyone has an idea to solve this problem?
Below you can find my visual basic code.
Thanks in advanced !!
Sylvie
Code:
Sub OpenPDF(bestand As String)
Dim retval
Dim sAdobeReader As String
sAdobeReader = Chr(34) & "C:\Program Files\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe" & Chr(34)
'sAdobeReader = "C:\Program Files\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe"
retval = Shell(sAdobeReader & Chr(34) & bestand & Chr(34), 0)
End Sub
Private Sub SelectedPDF()
OpenPDF ("N:\11276.pdf")
End SubThis is really a user forum, I think you need a developer forum... maybe SDK?
http://forums.adobe.com/community/acrobat -
Examples of using SCXI-1160 Relay Card with Visual Basic 5.0.
I am starting to develop some VB 5.0 code that interfaces with a PXI/SCXI Chassis. One of the cards that I have to work with is the SCXI-1160.
At this point in time (5/14/01), I do not believe there are any pre-existing example programs developed in Visual Basic to control an SCXI-1160 switch module.
However, the process is very easy to explain. You will need to add the NI-SWITCH instrument driver as a DLL reference to your VB program. The DLL file is called niswitch_32.dll and is located at C:\VXIpnp\WinXX\Bin (WinXX = Win95 or WINNT).
Your program will begin with the niSwitch_init(...) function, and end with the niSwitch_close(...) function. The niSwitch_Connect(...) function can be used to actually make switch connections in your application. -
PCI-GPIB Card with Visual Basic gives blue screen and re-boots PC
The application makes the "ibsic" call then "ibln" to find devices on the bus. Running the VB program the first time is fine, but if you end the program and re-run a second time, you get a blue screen and the PC reboots when the program reaches the lines that make the first call to the NI-488 functions. If you close out of VB and then restart VB, everything is OK again.
What is wrong?Hi,
Here's an article that describes the most common blue screen when using VB:
Why Does My Windows 2000 or XP System Crash When I Use Visual Basic to Program GPIB?
Hope this helps
DiegoF -
Buying a Ipad, does it support Excel with visual basic?
I live in PC world with Excel and visual basic for an order program. I would like to know if an Ipad supports Excel and VB. Any help is greatly appriciated.
Thank you,
GabrielSorry, no Excel on iPad. The iPad equivalent of Excel is called Numbers, an Apple-made app.
-
Programming on a MAC with Visual Basic which is unfortuantely from Windows
Good evening. I am going to be taking some courses in Visual Basic.
I presently use a new IMAC computer and no intention of ever going back to PC.
However in course I need to download and learn Visual Basic which is only windows/microsoft based
Does anyone know of a program that is similar to the windows VB that I can use?
Otherwise how would I make the Windows VB work on my MAC, i really do not want to download Windows XP or anyone to work on my MAC, hence reason for switching to leopard and mac.
all suggestions and help is welcome, look forward to your responses.
email me as well please and thank youBeing an outsider to most things programming and almost all things M$
the brief information I found while reading around Visual Basic, is that it
no longer has Microsoft support since 2008. While that may not be a big
issue for those still needing such a beast, there probably is a newer kind
of technology one could be investing time more wisely into the use thereof.
Earlier: http://en.wikipedia.org/wiki/Visual_Basic
Later: http://en.wikipedia.org/wiki/VisualBasic.NET
Free Express Edition: http://en.wikipedia.org/wiki/MicrosoftVisual_StudioExpress
+{Since you have a computer which can support a virtual machine (os) and+
+not need run Windows directly, some software can run without an XP, etc.+
+And there is an open-source virtual machine available, for Intel-based Mac.+
+This in addition to better known retail products, details found in a search.}+
Since the Express Edition above indicates certain tools it provides, one can see
what kinds of Mac OS X software tools are available to perform similar tasks;
then check into how compatible those are with the resulting product you seek to
be engaged in; and if the recipient of said project could use an all-Mac result. In
their PC; if this is the direction you are considering.
You can create content in Terminal, in a Mac, or in XCode, and there are a few
free-ware open source cross-platform programming tools that could be used to
create a more platform neutral product; from what I've briefly read. However,
since Microsoft is playing to their own field, you may find if you have to be there
you will have to get a Virtual Machine to run Windows in the Mac or hope to get
a virtual machine that also can run just the Windows app without Windows in it.
Or, have an old cheap PC off to the side, and put your Windows software into it.
Then keep your modern-era stuff alive in your Mac. If you have Windows-only
clients, some of them may well be using their XP into the next century...
Good luck & happy computing!
{PS: this topic area is within the section for older PPC iMac G4 series computers.} -
I want to take a measurement of the time that i use to make a gpib transmision in a Visual Basic program,i use the function TIME() to take the time in the begining and other time in the end,but this way only give me precision of seconds, and i want miliseconds,can i use other function,other way?
Can answer in spanish?Try using GetTickCount() API function, which provides millisecond precision. If you need more precise timer, try using QueryPerformanceCounter() function.
Makoto -
How to run GPIB based programs with visual basic 3
I have a little test program to comunicate with a GPIB device in a similar way that MAX does.
I type the address of the device, send the command *IDN?
but nothing returns except an error message that says s$ duplicate definition. I'm not terribly familiar with VB 3.0 Does anyone know what this means and how to fix it?I'm assuming since you're using VB 3, I assume you're calling directly into gpib-32.dll - is that correct? Could you possibly post the VB code? Also, if it's possible for you to use a later version of VB, we have ActiveX controls for VB6 and .NET classes for VB.NET that would make GPIB-based I/O much simpler to do than it would be in VB 3.0
-
Error when select sheet for Excel file from Excel 2013 with visual basic
Dim AppXL As Object
Dim MyWorkBook as Object
Set AppXL = CreateObject("Excel.Application")
Set MyWorkBook = AppXL.Workbooks.Open("E:\MyFile.xls)
AppXL.Sheets("Sheet1").Select
The above code run with no problem when use in machines with Excel 2007 and Excel 2010.
But when run in machine with Excel 2013, error with "Out of Range" occur. Kindly advise for any solution.
TS LimWith your highlight on the AppXL.Workbooks.Open, I have solved the problem by re-position the statements.
Below are the 2 situation which works in for Outlook 2007, 2010 and 2013
Situation 1, work for Outlook 2007 and 2010 but d not 2013
With AppXL
Set WorkBookFrom = AppXL.Workbooks.Open("E:\MyFile.xls")
Set WorkBookTo = AppXL.Workbooks.Open("E:\MyFile2.xls")
WorkBookFrom.Activate
.Sheets("Sheet1").Select
.Range("A1:IV65536").Select
.Selection.Copy
WorkBookTo.Activate
.Sheets("Sheet1").Select
.Selection.PasteSpecial Paste:=-4163, Operation:=-4142, SkipBlanks:=False, Transpose:=False
.Range("A1").Select
WorkBookTo.Save
End With
Situation 2, work for Outlook 2007 and 2010 and 2013
With AppXL
Set WorkBookFrom = AppXL.Workbooks.Open("E:\MyFiel.xls")
WorkBookFrom.Activate
.Sheets("Sheet1").Select
.Range("A1:IV65536").Select
.Selection.Copy
Set WorkBookTo = AppXL.Workbooks.Open("E:\MyFile2.xls")
WorkBookTo.Activate
.Sheets("Sheet1").Select
.Range("A1").Select
.Selection.PasteSpecial Paste:=-4163, Operation:=-4142, SkipBlanks:=False, Transpose:=False
WorkBookTo.Save
End With
Thank you for indirectly help me to solve the problem.
TS Lim -
Getting Return values from RFC function call with visual basic
Hi,
I am creating a sample app to connect to a SAP system which call its RFC functions created with ABAP. It was known that the function will return more than 1 return values.
SAP Function name ==> "ZFMTP_RFC_GET_RESULT"
Export parameters (to SAP):
- Student Name [char 10] ==> "STUNAME"
- Student ID [char 20] ==> "STUID"
Return values (From SAP):
- Results [char 10] ==> "RESULT"
- Remarks [char 200] ==> "REMARKS"
i have managed to get sample codes for connecting and call a RFC function with vb but they only get a return value. How do i retrieve multiple return values like the above function "RESULT" and "REMARKS"?
Here's my vb code to accessing the function
Dim R3 As Object
Dim FBFunc As Object
Dim returnFunc As Boolean
Dim connected As Boolean
R3 = CreateObject("SAP.Functions")
R3.Connection.Client = "000"
R3.Connection.User = "BCUSER"
R3.Connection.Password = "minisap"
R3.Connection.Language = "DE"
R3.Connection.System = "dtsystem"
R3.Connection.Applicationserver = "xxx.xxx.xxx.xxx"
connected = R3.Connection.Logon(0, True)
If connected <> True Then
MsgBox("Unable to connect to SAP")
End If
FBFunc = R3.add("ZFMTP_RFC_GET_RESULT")
FBFunc.exports("STUNAME") = "Jonny"
FBFunc.exports("STUID") = "12345"
returnFunc = FBFunc.Call() <<== How do i get the return value? or RESULT and REMARKS of the RFC Function?
thanks alot.
Edited by: Eugene Tan on Mar 4, 2008 7:17 AMHi Gregor,
Thanks for the link....i am having some doubts with the codes, hope you can clarify them for me if you know the codes..
Below is the code snippet.
Set impReturn = CHPASS_FN.Imports("RETURN") <<=== is RETURN the standard keyword to get a return object?
expPassword.Value = currpass
expNewPass.Value = newpass
expFillRet.Value = "1"
''' Call change password function
If CHPASS_FN.Call = True Then
outFile.Write (", Called Function")
Message = impReturn("MESSAGE") <<==== So if i have 3 return values..i just replace with the return value variable names?
outFile.WriteLine " : " & Message
Else
outFile.Write (", Call to function failed")
End If
thanks alot...all your help is very appreciated. -
How can i output a voltage on PCI-6229 port with visual basic 6 ?
Hello,
PCI-6229 card is using DAQmx, that not support VB 6 officially.
However, members of this forum found out a way to write/read on digital port with vb6 and DAQmx.
This was working well for me indeed.
Then, i wanted to output a voltage on AO. I followed the same procedure they used for DI/DO but in vain.
Apparently, the function DAQmxCreateAOVoltageChan()* causes trouble.
Using the .exe of the program, i get this error :
"error -200077 : Requested value is not a supported value for this property."
Thank you for any ideas that can sort this out.
* Public Declare Function DAQmxCreateAOVoltageChan Lib "nicaiu.dll" (ByVal TaskHandle As Long, ByVal lines As String, ByVal nameToAssignToLines As String, ByVal min As Single, ByVal max As Single, ByVal units As DAQmxUnits, ByVal customScaleName As String) As Long
call : DAQmxErrChk DAQmxCreateAOVoltageChan(TaskAnalog, txtChanAnalog.Text, "", Min, Max, DAQmx_Val_Volts, 0)Hello,
What is your buffer size ? The buffer should be 0 or greater than 2. You can get this error if your buffer size is equal to 1.
Regards,
Isabelle
National Instruments France
Isabelle
Ingénieur d'applications
National Instruments France -
Setting Security Options with Visual Basic for Applications (VBA)
Hi there,
I want to print a PDF out of Excel via choosing the Adobe PDF-printer at the print-options-menu and like to apply a password to the PDF-files.
Is there a possibily to set the security options via VBA? I can choose the Adobe-PDF as a Printer, so I hope there is the chance to set the password like i can choose other print-options in VBA.
Thank You in advance!
AndreasAs far as I know, Lync 2013 is not available with Office Home & Business 2013, you can check
http://office.microsoft.com/en-in/home-and-business/
Lisa Zheng
TechNet Community Support
Dear Lisa,
Yes, it's true, Lync 2013 is not part of Office home & Business 2013, but you can install,it as standalone product.
Maybe you are looking for
-
Please help to rewrite this logic to improve the performance.
Hi Experts, In this procedure we are inserting data into the same table using same columns and same values with different WHERE conditions. IN the WHERE clause we have some common conditions in all select statements. Thanks.
-
Hi, I created two files for Rman. One is showall.txt Another one is rman.bat rman.bat contains rman target=sys/system @c:\showall.txt showall.txt contains show all; list backup; when i click the rman.bat,it is simply running indefinitely and no outpu
-
The only reason I keep tiring to get this browser to work is I cant seem to get all my bookmarks and other setting to another browser easily, but i'm working on that also....
-
Hostname, missing last character
hi, I installed the Oracle 9iAS R2 Infrastructure to an XP machine. The installation done without errors, but when I'm trying to see the MyPage, the link puts me to wrong page (the same error is occures with some other pages too). My host is pamoas.
-
download photoshop cc and it get stuck at 2% - DSL Download at 6 Mbps - How big is this program and why is it frozen at 2%