In design mode (Visual Studio 6.0),I want to programmatically change the fill color in properties of cwslide ActiveX Controls.what's the command?
How can I programmatically change the fill color Settings of the Cwslide ActiveX Controls
use USB-6501 output like a chopper circuit
I’m terribly new to this sort of thing so forgive me if my questions seem trivial. I’m looking for VB code that allows me to pulse the outputs on the USB-6501 24pin I/O. Or, is it possible to view/edit the code that that MAX uses in its test panel ?
If any of these are possible, could someone point me to a link please? I’m trying to edit the output so that I can make the ports behave like a chopper circuit (ie. Pulse the output high for 25ms, low for 75ms. My expected result would be 25% of ttl voltage or read from a meter connected to the output – 1.25V rms). Does anyone see a problem with this?
How to generate analog pulse using ni usb 6009
hello,
I need to control the on and off of a trasistor, for that i need to give a on pulse with 1ms and off pulse of 360ms using ni usb 6009. is there any example vi for that.
USB-6501
Is there an example program for communicated to the USB-6501 digital ports (output ports) using microsoft excel VBA?
I add a reference to NIDAQmx library. I need help on initiating communications.
Thank you
Questions about SslStream and binary data
Hello everyone. First off, please excuse my ignorance, and if I should be posting this elsewhere. I'm entirely self-taught in VB.NET and I'm not exactly a great programmer yet. That said, I'm a bit stumped on this.
I'm trying to make a server that can send and receive TLS 1.2 connections. I've actually successfully made the TLS part, using the SslStream class from System.Net.Security. I can successfully preform a TLS connection with my "server", and either send messages back and forth with my makeshift "client" application, or even act as a webserver and serve pages to Chrome.
However, I'm trying to make it work as a Key Management Server for VMWare vCenter. I can successfully set up a TLS connection with it, but i just get a bunch of junk. I come to find out, that the KMIP protocol that it uses once a TLS connection is established, is a binary format. My concern is that I'm reading everything in a byte array, as all the examples for SslStream show to do. So my question is, am I going to have to convert between the two? My understanding is that binary is a bit level, whereas a byte array would be a byte level? Hopefully I'm making sense here.
GPIB Issue
I am working on some legacy software (VB6) on a Windows 7 machine. I was adding some code totally unrelated to my GPIB issue. After I updated my code, I ran it in the VB6 IDE and had NO issues whatsoever. This includes the area in which GPIB is utilized. However, once I compiled it, it faults out with a "CIEEE: No GpibCard lGpib0 = -1". This is code that was implemented by a previous engineer in the past due to some issue he was having with the executable (he is no longer around for me to inquire what the issue was).
The call that is creating the check for the "-1" is: lGpib0 = ibfind32(ByVal "GPIB0").
Which is derived from: Declare Function ibfind32 Lib "Gpib-32.dll" Alias "ibfindA" (sstr As Any) As Long
When I trap lGpib0 via a VB6 label and run it in the VB6 IDE, I get a "31000" instead of the "-1" and the code runs fine.
I've tried driver updates, commenting out code, faking the results all with the same results. When I run the tracer, it says that GPIB0 has the incorrect address. Yet nothing has been changed by an individual and I can only assume it was a corruption of some sort. I can find no way via MAX to check or change the address of GPIB0 to ensure it is correct. And why would it work OK in the VB6 IDE and not as an executable???
I appreciate any and all assistance or recommendations. I am about out of any and all ideas on how to correct this issue and I have to get this test stand back on-line ASAP.
Thanks
Create a DVM with USB-6008?
Installing NIMax on legacy system?
I just installed NIMS6 ver 8.1.2 Enterprise Edition and in the process NIMax got left out due to a newer version being installed. However, NIMS6 was previously uninstalled and the executable for NIMax is longer resident, except in name only in the registry. How do I get NIMax reinstalled back onto this sytem? Is there a way to "trick" the installation into thinking/knowing that NIMax is NOT installed already?
This is a Dell Optiplex 260 running WinXP Pro. Yes, it's old, but it is what I have to deal with.
Thanks for any assistance.
Excel VBA, C-API Problem with DAQmxLoadTask
Hello,
ich have a problem using the DAQmxLoadTask funktion. I have a task which I created in the NI-MAX. The device is connected and I can execute the task in the NI-MAX.
Now I'm trying to access that task from Excel via VBA. I've set the reference to the NI C-API
but the following code always produces the error -200089, which means "Task name specified conflicts with an existing task name."
What am I doining wrong?
With kind regards,
Alex
Daqmx C-API 64-Bit Version
Hi,
I'm struggeling with a older Excel VBA application which is supposed to run on a new LapTop. Unfortunately this Laptop comes with a 64-Bit Office. Now DAQmxRegisterEveryNSamplesEvent is causing an type mismatch for the parameter of the callback handler. I think this comes because a 32-Bit address is expected by the fuction.
Is there a 64-Bit Version of the C-API or an other solution.
With kind regards,
Alex
Reading a network variable in visual basic
I followed many walkthrough tutorials in my endeavour to read network variable in a VB script. However, the line "Imports NationalInstruments.NetworkVariable" (in VB) doesn't have any effect.
If any one got any experience in this please advice.
Thanks in advance
CWAIPoint, CWDIO VB6 on windows 10
I have a project using vb6 running on win7 using the CWAIPoint and CWDIO
using the code example:
I have to rewrite the part of the code that using
CWAIPoint and CWDIO that use Read the Measurement on win10
That is possible? There is an example of that?
Thanks
Driver for NI DAQ USB 6525 for XP
I can't found the driver for the device IO NI -USB 6525, I have system operating windows XP
Thnaks
Regards
Compile error: Constant expression require
I have an error using a VI_NULL
What can couse it?
Maybe I have to miss a DLL?
This is the DLL I use
AI_Configure iDriveAIS Alias in DAQ Mx
I'm looking for the alias configuration in DAQMx for the parameter iDriveAis of the function AI_Configure (nidaq32.dll).
Can anybody give me an advice, which DAQmx function i need to call, to set this setting?
Sascha Lüthi
How to check if Instrument (LAN) is online?
Hi!, so I have started using some Keysight DMM's using LAN - Until now I have only used GPIB.
In my old setup, when I launched my program (VBA in excel) I would check with DMM1.IsOnline to see if the instrument is avaliable. (Using CWGPIB lib)
But with my new LAN interface, how do I test if the instrument is reachable? CwVisa doesn't have an command similar to .IsOnline. From what I read online the most common thing is to write "*IDN?" to the instrument, but using DMM1.Write("*IDN?") I get the error that the specified device is not configured - And I guess that is because I cannot write before I run DMM1.Open - But if I run that first, then I get an error that either the resource have insufficient info or its not present in system (well its not )
So how do I test if the instrument is present before runing the "open" command?
Install kit for VB6 components
Hi folks!
I have to work on an old VB6 project where there were apparently some NI ActiveX controls used. I looked around but have not been able to locate an install kit for them, specifically CWDataSocket. Can anyone assist?
Thanks
Traditional NI-DAQ (Legacy) C Reference Help
Does anybody have or know where to find the document "Traditional NI-DAQ C Reference Help"?
This document is referenced in the Traditional NI-DAQ User Manual, but I can't seem to find it anywhere. My reason for searching is I am updating a program from traditional NI-DAQ and I would like to use this document to understand the functions in the program a bit better.
Thanks
"Method 'Start' of object '_DCWIMAQ' failed" - Image aquisition troubles
Hello,
in our company we use PCI/PXI-1411 camera (with NIMAQ 4.6.4) on Windows XP to aquire images for our VB 6 test applications. But since we switched to Windows 10 (and IMAQ 18.0), I get a runtime error "Method 'Start' of object '_DCWIMAQ' failed". Same problem when I try to run one of the example programs (e.g. "Grab"). Grabbing and snapping pictures with Measurement Automation Explorer works fine, it just won't work with VB 6. I am grateful for any ideas or suggestions!
Best regards,
Nick
TCPIP connection to instrument closing after being idle for 6 seconds
I've been using the NI-VISA library in Excel VBA for controlling various instruments using TCPIP raw sockets. Without any change to the VBA programming, connections to instruments started reporting I/O errors. Apparently something other than my VBA code is closing the socket.
For debug, I wrote a simple macro in VBA to loop sending instrument commands at a periodic rate. The macro would run indefinitely without error. If I pause it, the connection will close after 6 seconds, indicated by the "remote" light on the instrument extinguishing. Resuming the script would result in an I/O error message.
Back then (three months ago) we rolled back the NI-VISA version (to 2019, I believe), and that fixed the problem temporarily. A month later, the problem came back even though the system still thought the older NI-VISA version was installed. My guess is that something had changed in an automatic Windows update (e.g., a driver used by NI-VISA) to break the connection. My workaround was to rewrite the script to use direct raw socket programming, avoiding NI-VISA altogether, and haven't had any problem with that Excel VBA script since.
The same problem has just resurfaced in a different Excel VBA script that had previously worked. This time, the script is talking to a different instrument from a different manufacturer. The only commonality is using the NI-VISA library for TCPIP connections from VBA. Unfortunately, this instrument only supports the VXI-11 TCP/IP Instrument Protocol, not direct raw sockets.
Is there something new in the latest NI-VISA drivers that requires me to "enable keepalive" or take some other action to make a connection persist while my script is off doing other things? How do I fix this?