Controlling NI2568 Switches using VB6 and DAQmx

Can the NI-2568 (and similar) switches be controlled using VB6 and DAQmx?
I got the impression from the "NI-DAQmx C API VIsual Basic 6.0" Help, that by using the "Digital Output API ",  it could be done very similarly to opening/closing a discrete , but no samples were included.
I just need to close a few relays and don't know if I have to install the "NI-Switch" software or not.
If it can be done, what would be the channel string to pass to the DAQmxCreateDOChan dll function
(in place of "Dev<x>/Port<y>/Line<z>").  MAX shows my (simulated-don't have the hardware yet) switch device to be "PXI1Slot3" .
Thanks,
Jon 

Hi Jon,
You can also use NI-DAQmx Switch functions to control PXI-2568 rather using NI-SWITCH (NI-SWITCH installs ready-made VB examples)
You can use functions such as
DAQmxSwitchSetTopologyAndReset, DAQmxSwitchCloseRelays, DAQmxSwitchOpenRelays to control individual relays in PXI-2568. ANSI C Examples for DAQmx switches can be found at C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Switches. This can be used to write VB 6 code. Refer to  using "C Examples to create VB 6.0 Applications" in C:\Program Files\National Instruments\NI-DAQ\Docs\cvb60daqmx.chm for help on converting C examples to VB 6.0.
Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments

Similar Messages

  • Defining sort criteria using vb6 and CR XI

    using vb6 and cr XI and I am trying to provide the user with the capability of defining sort options using options defined on a VB6 form.  The sample code I've found as described below doesn't seem to allow me to change the sort criteria by field name
    'General Declarations
    Dim CRXDatabaseField As CRAXDRT.DatabaseFieldDefinition
    Private Sub Form_Load()
    Set CRXDatabaseField = CRXReport.Database.Tables.Item(1).Fields.Item(8)
    CRXReport.RecordSortFields.Item(1).Field = CRXDatabaseField
    I would like the user to select an option to sort by say Client and then provide this information to the report like I could with CR 7 as follows
    crReport.SortFields(0) = "+{Horse.Location}"
    Thanks for any help
    Gerry

    Hi Gerry,
    Have a look to  [Sample codes|https://boc.sdn.sap.com/codesamples] and [Dev Library|https://boc.sdn.sap.com/developer/library]
    Hope that helps!!
    Regards,
    Shweta

  • Unable to Meke EXE using VB6 and CW

    I know that I will be a little bit long, but that's the only way to be precise.
    So please, maybe someone out there can help me, since th NI Knowledge Base
    didn't ...
    We use ComponentWorks 2.0.1 and we also got 3.0.1 update.
    My computer runs Windows98SE (German version) on an INTEL Pentium III - 600
    MHz.
    Using Visual Basic 6.0 (SP4) and trying to "Make EXE" the compiler stops
    when displaying "Writing EXE" at about 80% gauge. The error message will
    always be (I try to translate, since I use a German OS):
    "This application was closed due to an critical error". And: "VB6 caused
    an critical error 10H in module CW3DGRPH.OCX at 016f:07c5a14e. ..."
    If I click "Close" the whole VB6 environment will close. If I click "debug"
    C++ comes up and says: "Unhandled exception in VB6.EXE (CW3DGRPH.OCX): 0xC0000090:
    Float Invalid Operation". In the disassembly line stands: "07C5A14E fld
    qword ptr [esi+200h]"
    What did I try to resolve the problem?
    1. I installed a "clean" Windows 98 (First edition!), installed my components
    and VB6. The error did NOT occurre! After installing a newer dated application
    (Outlook Express) the error came. So I guess it will deal with some overwritten
    dll or so.
    2. I installed Win98 SE and the error always occurred.
    For Your information: I named my Windows directory "C:\WIN" and teh System
    directory is "C:\WIN\SYSTEM".
    3. I reinstalled CW2.0.1 and tried using CW3.0.1. No change. I still couldn't
    make the exe file.
    The OCX files seem to be registered properly.
    (BTW: Any other application not using Component Works can be made to EXE
    files.)
    4. In my office others are working on this project too. They use Windows
    95, Win2000 and Win NT4 WITHOUT any trouble. None is using Windows 98SE.
    I am almost changing to Win 2000, but first I don't think it is a secure
    way to handle the problem. Who knows, if it appears some day again when any
    specific dll or so had been changed in the system folder? And second, I might
    need a hardware based OS some day in near future and wish to have Win98 SE
    again on my disk.
    In all above cases the error message was the same.
    Thank You in advance.
    Siegfried Wessler

    To make ur Project an exe file u should have the full version of the cw works installed. As expected of exe files it should run on any machine. so the best way out ( the way i used in my project ) is to go to start -> programs -> measurement studio tools -> package and deployment wizard,click on it. It will ask u to select the project. chose it from ur dir and clik on the PROJECT button.
    the wizard will guide u through the rest of the set up. and it will create u a set up file which u can install like any windows application.
    This method has always worked for me.
    all the best
    partha

  • NAC : CAM control over switch using SNMP

    Hi
    I have CAM , CAS in Central, OOB,Virtual,Layer2 lab
    I can see on CAM the access switch ports status which means that SNMP works but when a user is logged on the access switch , the user vlan is not inforced to be changed to Auth vlan
    and he remains in the trusted vlan which is already configured on the acces switch
    I can change in configuration on the switch through CAM but the CAM itself cant change Vlan
    thanks to advise me what part i am missing
    thanks

    in the CAM, when you see the access switch ports status, click on the magnifying glass icon next to a port which is up and see if it's detecting the MAC address of the device which is connected to that port. If it is not it means that SNMP mac-notification is not configured properly. If CAM doesn't detect the MAC address of the device, it wont change the switchport vlan...

  • Control which apps use en0 and en1 (airport & ethernet)?

    Hi,
    I've got access to both my shool's wireless network and my own cable modem account. Is there any way to direct particular kinds of traffic to a particular network interface -- for instance, if I want to play games over one connection and use the other for surfing, email, etc?
    Supposedly the order of the interfaces in the Network Preferences list dictates which has priority, but is there a way to set up exceptions for particular applications?
    thanks a lot,
    Lucas

    ...that helps, thanks. One thing - from what I can see so far route lets you select by the destination address, but not by the application making the request. (Maybe it does and I missed it.) I keep thinking there's gotta be a way to aim an app at a particular network interface...
    cheers
    Lucas

  • Simultaneously Connecting Multiple Tables of the same Database to Textboxes of the same Form using a single ADO Control Code using VB6 Enterprise Edition and MS Access 2007

    Iv 10 Tables consisting of atleast 10 fields each in a single Database. Bt, Im only able to connect 1 table at a time to a form using an ADO Control. Im able to add data from table 'student' to text-boxes in my form. Bt, hw can I add data from field(0) of
    Table 'Student' to Textbox1 and data from field(0) of Table 'Marks' to Textbox2 using VB6??
    This is the current sample coding iv got to connect a single table to a form:
    Global con As New ADODB.Connection
    Global rs As New ADODB.Recordset
    Public Function Connect()
    If con.State = 1 Then con.Close
    con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\bca.mdb;Persist Security Info=False"
    End Function
    Private Sub Add_Click()
    If rs.State = 1 Then rs.Close
    rs.Open "select * from student", con, adOpenDynamic, adLockOptimistic
    rs.AddNew
    rs.Fields(0) = (Text1.Text)
    rs.Fields(1) = (Text2.Text)
    rs.Fields(2) = (Text13.Text)
    rs.Fields(3) = (Text4.Text)
    rs.Fields(4) = (Text5.Text)
    rs.Fields(5) = (Text6.Text)
    rs.Fields(6) = (Text7.Text)
    rs.Fields(7) = (Text8.Text)
    rs.Fields(8) = (Text9.Text)
    rs.Fields(9) = (Text10.Text)
    rs.Fields(10) = (Text11.Text)
    rs.Update
    MsgBox " Record Added"
    End Sub
    What can I do to add fields from 2 different tables to different text boxes within the same form using a single ado control using vb6 and MS Access 2007??

    Hi,
    Since VB6 product is not supported in this forum, you may go to these forums for support:
    #Where to post your VB 6 questions
    http://social.msdn.microsoft.com/Forums/en-US/6a0719fe-14af-47f7-9f51-a8ea2b9c8d6b/where-to-post-your-vb-6-questions
    Thank you for your understanding.
    Best regards,
    Franklin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to control a solenoid via PXI-2520 and DaqMx Switch

    I am a LabView novice with Core 1 and Core 2 training so I am familiar with the fundamentals of LV process flow however, this is the first application I am attempting to develop that is not a simulated training VI. That said, I am having trouble ironing out the necessary logic to control a 10 solenoid 2 position valve manifold. I have developed a VI that will contact and disconnect a particular relay in the style of the "Switch Controlling Individual Relay.VI" on my PXI-2520 module but these are single instance events. Ie. i set the device, name the relay, and tell the VI which action (make or break) and run the VI. What I am trying to develop is a continuously running VI where any one or multiple solenoids can be energized/de-energized using simple boolean control whereby each relay is represented by a switch on the front panel.
    It is clear that a while loop is necessary and a series of case structures or State Machine architecture is necessary but all my attempts have been fruitless. the common failure mode tends to be when following iterations of the while loop tell a switch that is already open to reopen or vise versa thereby causing an error. My thought here ist that some feedback from a former  iteration is necessary so that only "unequal" boolean values for the former iteration calls a case to connect/disconnect. What are your thoughts?
    Eventually this VI will also need to control these solenoids automatically (i think DaqMx Create scan list with software triggers will suffice) but each action willl need to be timed. For now though it is most critical that I have the capability of operating the solenoids manually and dynamically.
    Thankyou,
    DK01

    Welcome to the forums! 
    If you can, please post a snippet of code from what you've attempted so far. We can take a look at it and make some recommendations. 
    One of the lessons in Core 1 also talked about the use of the event structure. It may be a good use case for an event driven state machine that can modify the states of specific switches. 
    Nathan M.
    Applications Engineer
    National Instruments

  • How to remap keyboard - Looking to switch the "fn" and "control" buttons?

    Hi I was looking for a way to switch the function and control on the bottom left side of the keyboard on my macbook pro laptop. I am used to the control button being the button that is furthest to the left and its just really throwing me off having the fn key all the way to the left. If anyone knows how to remap these keys, I would really appreciate the help.
    Thank you.

    Firefox 4.0 has a combined Reload and Stop and Go button that appears at the right end of the location bar.
    To restore the Firefox 3 appearance you can use these steps:
    * Open the "View > Toolbars > Customize" window to move the Stop and Reload button out of the location bar.
    * Move the Reload and Stop buttons to their previous position at the left side of the location bar.
    * Set the order to "Reload - Stop" to get a combined "Reload/Stop" button.
    * Set the order to "Stop - Reload" or separate them otherwise to get two distinct buttons.

  • Switch the function and control keys

    Sounds like a stupid request but my life would be much simpler if my Lenova T540p keyboard had the function and control keys switched. I use the control key ALOT and having it to the far left hand lower corner would be awesome.
    Thank you.
    R

    Hey there Redrabbit,
    Try your BIOS. For me (Thinkpad T540p), it's in Config>Keyboard/Mouse>Switch FN and CTRL keys.

  • Ni-daqmx using vb6

    Hi
    iam trying to connect ni-daqmx to vb6 and here is my code.
     Sub temp1()
    Dim mytask As Long
    Dim Data(1000) As Double
    DAQmxErrChk DAQmxLoadTask("temp1", mytask)
    DAQmxErrChk DAQmxReadAnalogF64(mytask, 1000, 10, DAQmx_Val_GroupByChannel, Data(0), 1000, 1000, ByVal &O0)
    Text14.Text = Data(1) ' for displaying data in textbox
    Text14.Text = Format(Text14.Text, "#00.00") ' making 2decimal digit
    DAQmxErrChk DAQmxStopTask(mytask)
    DAQmxErrChk DAQmxClearTask(mytask)
    Exit Sub
    errorhandler:
    DAQmxStopTask mytask
    DAQmxClearTask mytask
    MsgBox Err.Description
    End Sub
    Private Sub cmd_acquire_Click()
    Timer1.Enabled = True
    Timer1.Interval = 60000 ' setting 1minute
    End Sub
    Private Sub Form_Load()
    Timer1.Enabled = fasle
    End Sub
    Private Sub Timer1_Timer()
    temp1
    End Sub
    like wise i have 8-10 task whih diplays the temperature value in text14 to text22
    using timer iam calling this function for every 1 minute ,
    iam getting data but as time progresses the data capture is getting delayed means initialy it will execute at 1minute
    after say 1or two hours the capturing is getting delayed by 30-40 sec.
    iam using scxi chasi with temperature module. using task iam calling in to my vb application.
    iam unable ti figure out the route problem for time delay.
    Regards
    Raj

    Hello Raj,
    Yes, so since the program runs continuously, and the Windows OS is not deterministic unlike Real-Time OS which is deterministic, the processor usage builds up and it slows down on continuous run of the LabVIEW application, so the time taken increases down the line. This kind of behaviour is expected and can not be avoided on the PC.
    Regards,
    Sahil Singla
    Applications Engineer | National Instruments
    (Give Kudos to good Answers and Mark it as a Solution if your problem is Solved)

  • Strongly recommended: ios7 control center switches to user-defined, we can add the cellular and 3G switch.

    Strongly recommended: ios7 control center switches to user-defined, you can add the cellular and 3G switch.

    You can use this Link to send your request to Apple
    http://www.apple.com/feedback/

  • How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    unless i'm missing something, i think you got mixed up, this is easy google for walk throughs
    i'm assuming this is the new 3tb tc AC or 'tower' shape, if so, its wifi will run circles around your at&t device
    unplug the at&t box for a minute and plug it back in
    factory reset your tc - unplug it, hold down reset and keep holding while you plug it back in - only release reset when amber light flashes in 10-20s
    connect the tc to your at&t box via eth in the wan port, wait 1 minute, open airport utility look in 'other wifi devices' to setup the tc
    create a new wifi network (give it a different name than your at&t one) and put the tc in bridge mode (it may do this automatically for you, but you should double check) under the 'network' tab
    login to your at&t router and disable wifi on it
    add new clients to the new wifi network, and point your Macs to the time machine for backups

  • I have just dowloaded the icloud control panel on my PC and i am am able to see everything that has been pushed to icloud from my ipad. However i cannot see my email. i can send from the computer using icloud, but i do not see any mail that is being rec.

    i have just dowloaded the icloud control panel on my PC and i am am able to see everything that has been pushed to icloud from my ipad. However i cannot see my email. i can send from the computer using icloud, but i do not see any mail that is being received by my ipad, which is set up with my mail server. What haven't i checked lol?

    turn your ipad off by holding the sleep wake button for 5 seconds and slide to turn off then turn it back on and the apps should be finished and if the apps didnt finish just redownload them

  • How do i drag indicator control type on WPF instead of using Drag and Drop points

    In my WPF application, i have a window which is docked with the screen. i want to automate to expand the window using an Indicator control type, by sliding it. As of now i use StartDrag and StopDrag using specific points, which is not correct when it runs
    in many other screens.
    Could you please let me know, is there way to slide the control (to set window display size to viewable) without using  drag and drop action using points.

    Hi Pavithra,
    >> As of now i use StartDrag and StopDrag using specific points, which is not correct when it runs in many other screens.
    To really understanding this issue, could you share us what you mean by ”which is not correct”? It would be much helpful if you could share us a screen shoot about your UI and your issue.
    >> Could you please let me know, is there way to slide the control (to set window display size to viewable) without using  drag and drop action using points
    Do you mean that the control of the WPF is invisible and you want to set the window display size to make it visible? If so, I think you could use the Mouse.MoveScrollWheel Method to change the windows view until the control is visible. The link below might
    be useful to you:
    # CodedUI cann't find the controls outside the screen view, Mouse.MoveScrollWheel doesn't work too
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/e1dba9ee-dc51-4160-9a1a-a2220c903db0/codedui-cannt-find-the-controls-outside-the-screen-view-mousemovescrollwheel-doesnt-work-too?forum=vstest
    If I misunderstood you, please feel free to let me know.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • My iphone 5 screen has gone black in the middle of updating a app. i have tried to back it up using itunes and restore it however it will not restore my phone as i have got the app find my iphone switched on. i cannot turn it off as the screen is black

    my iphone 5 screen has gone black in the middle of updating a app. i have tried to back it up using itunes and restore it however it will not restore my phone as i have got the app find my iphone switched on. i cannot turn it off as the screen is black. can anyone help me please??

    christobell86 wrote:
    ... it will not restore my phone as i have got the app find my iphone switched on.
    You can access iCloud.com on a computer to turn it off.
    http://support.apple.com/kb/PH2702

Maybe you are looking for

  • My PC won't recognize Zen Micro- please h

    I have Windows 98 on an older PC, and am planning on buying a new computer later this year. I received the Zen Micro as a Xmas gift but am just now getting around to loading songs onto it (so my free service is expired). It's supposed to be Windows 9

  • COOIS report: not able to select operations based on work centers

    Hi All, When accessing the COOIS report using operation listv& selecting the std profile.I need to get the operation perfomred on specific work center. I enter the work center & plant code in the selection fields available in the "select at operarion

  • Need help on NetBean 4.0

    Hello Up until now I have used an Emacs to write and compile java code, but It was always a hassel to specify all files etc. So I decided to upgrade to netBeans 4.0. But I need help to set that dam� thing up. I just want to write: import com.myName.p

  • V29 streaming video: not in Adobe Content Viewer?

    I tried the streaming video in v29. The http adress is correct (I can check in in the browser) but it does not show/play in the Desktop Content Viewer. Is this a limitation?

  • Adobe X font issue

    A friend made a PDF using different fonts, when I open the PDF one of the fonts is changed from what she used to Times New Roman. How do I get it to the fonts she used to make the PDF. Suzanne