Hardware control via a cin

I have the c++ code to control and collect data from an external piece of hardware (Nest of Birds) and I am trying to get LabView to both control and acquire data from it. The C code has an initialization, data acquire and shutdown stage. I am able to complete the whole sequence using a CIN provided there is no loop on the data acquisition stage. However if I try to split the code into separate CINs I can not get the data acquisition stage to loop.
Please could you help me?
Ol

onlyol wrote:
What you are saying makes a lot of sense!
The reason I was trying to use the CIN is because I have all the C++ code for the hardware control. My programming knowledge is fairly limited and as the C++ code is quite complex (for me!). I thought using a CIN would require the least manipulation of the program - but clearly this isn’t going to work.
So do you recommend that I try to rewrite the C++ code in LabView and only call the DLL?
It would really depend. If that C++ code is doing anything complex and involved it definitely wouldn't be feasable to try to do this all in LabVIEW. The you have another option: Turn that C++ code into your own DLL and call that DLL from LabVIEW. CIN development is only fun anymore if you want to do some pretty esotoric stuff or are doing it just for the fun of tinkering with a technology which at some point was quite useful. (LabVIEW for Windows 3.1 really needed that for interfacing in a good way to all kind of external code without always having to convert between 16bit and 32bit memory and causing performance hits by this.) Another approach might be to write one CIN which implements all three functions and takes an extra selector input to tell it which of the three functions it should execute. Then you won't have troubles with global variables residing in three different code resources and not being able to reference each other across CIN bounderies. But honestly the DLL aproach is most probably the best to follow.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • How do I set up different hardware controls for different patches in mainstage?

    I'm using Mainstage 3.0.4 and a Novation Impulse.
    I created a concert, with the drawbar organ as my first and most important patch. I assigned the hardware controls on the Novation exactly how I wanted them, with the sliders controlling the drawbars, and the rotary controls changing the distortion, reverb, etc. It was perfect. I was happy.
    Then I added a new instrument (a new patch, not a new channel or anything like that), a Wurlitzer. Once again I assigned my hardware controllers as I wanted them, and was happy with that.
    When I saved the concert, and went back to my organ patch, my settings didn't stay the same, but they still work for the Wurli.
    My question is this - do I have to have a new concert for each instrument patch I want to use, if I need to assign different controllers for each patch? This would be stupid! If not, what I am doing wrong, that I can only set up one set of hardware controls per concert, instead of per patch?
    Thank you in advance for the help!!!

    Hi
    matthewabennett wrote:
    CCTM, thank you! I have a small idea what you mean, but I still can't implement it :-)
    You have some fundamental choices:
    A) If you want to see Drawbar Controls for organ Patches, and then have other types ( knobs/sliders etc) for other Patches, you could simply make all the screen controls you need, then assign and map them as required.
    B) you could simply use drawbar screen controls only and remap them to other parameters for non-organ patches
    C) You could use Smart Controls ( which will update their appearance in a 'smart' way
    D) You could make your own Drawbar type controls using standard faders
    The basic process in a 2 part thing:
    Assign incoming MIDI messages from your controller to Screen Controls in Layout mode. This is global for concert. Per patch ( or Set or globally for the Concert) you then map the Screen Controls to parameters for each patch as needed.
    Smart Control MIDI assignment is done in the Assignments and Mappings pane
    CCT

  • Function returning control via CType. Is this risk-free?

    I want an easy way to get a TabPage's child (user)control without writing CType() functions everywhere.
    For this I created a function that returns the control via CType:
    Private Function ChildIRCControl() As IRCControl
    Return CType(Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls(1), IRCControl)
    End Function
    Now, is this risk-free to do or are there any chances that it will bug or don't work in some cases?
    Thanks
    //Visual Vincent
    EDIT:
    Now to rephrase and explain my badly written question:
    The user is able to create new tabs, and for each new tab a IRCControl (which is a UserControl) is added to the tab's controlcollection.
    Now there's no problem doing the above. BUT since the tabs are created programmatically, I cannot get the control inside the tabpage without some kind of cast function.
    Example of creating a new tab:
    Private Sub CreateNewTab()
    Dim IRCc As New IRCControl 'This is a normal UserControl.
    Me.TabControl1.TabPages.Add("New Tab")
    Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls.Add(<a control that has nothing to do with this question>)
    Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls.Add(IRCc)
    End Sub
    Now to access the UserControl in the currently selected tab I need some kind of Cast function. I use CType for this:
    CType(Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls(1), IRCControl)
    But typing this long CType function in every If statement needed and every Loop used takes time, and is horrible to read.
    Now, will it work just like the normal CType if I access it like this instead?
    Private Function ChildIRCControl() As IRCControl 'The UserControl
    Return CType(Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls(1), IRCControl)
    End Function
    Private Sub ModifyTextBox() 'Example
    ChildIRCControl().TextBox1.Text = "Hello World!"
    End Sub
    Hope this explanation is better for you guys, and sorry for not bringing all this up before.
    I hope your day has been better than yesterday, but that it's worse than tomorrow...
    Please mark as answer if I solved your problem. :)

    Now, is this risk-free to do or are there any chances that it will bug or don't work in some cases?
    To make it safe you would subclass the Tab and TabPage controls and make this method a function of the new Tab.  Then, that class would include code to ensure that only your custom tab pages were added, and that for each added tab page the first
    control was the correct type - presumably creating it automatically or from a value passed to it in the constructor.  That control is then a property of the tab page, and there is no need to use the Controls collection or do any type conversion.
    The problem is that you actually have no control over the order of items added into the Controls array if you are using the designer.   Even if you are sure that each tab page has one of the controls, it might not be at index 1.  
    You could scan the tab page Controls collection, but if there are several of that control type then you also need a way to know which one you really want.  That's what your code should be checking.   If you correctly identify the control in
    the collection there is no need for CType - it's already the correct type.   You can check the type without trying to do the conversion by using TypeOf.  See
    https://msdn.microsoft.com/en-us/library/0ec5kw18.aspx
    Thanks for the answer.
    I guess I could have added this to my initial question too: I'm creating the TabPages and UserControls programmatically and that's why I need to use some kind of Cast function. There are two controls in each tabpage, and they're added in this order:
    Private Sub <Some kind of sub>()
    Dim IRCc As New IRCControl 'The UserControl
    <The new TabPage>.Controls.Add(<The other control>)
    <The new TabPage>.Controls.Add(IRCc)
    End Sub
    So the only thing I wanted to know was if I could do this:
    If ChildIRCControl().TextBox1.Text = "blahablaha"
    ChildIRCControl().RichTextBox1.Text = "blabla"
    End If
    Instead of writing the long CType, or any other cast function all the time,
    If CType(Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls(1), IRCControl).TextBox1.Text = "blahablaha" Then
    CType(Me.TabControl1.TabPages(Me.TabControl1.SelectedIndex).Controls(1), IRCControl).RichTextBox1.Text = " "blabla"
    End If
    as it's both a readability and writability nightmare.
    And at last I apologize for the badly explaining question that I wrote.
    I hope your day has been better than yesterday, but that it's worse than tomorrow...
    Please mark as answer if I solved your problem. :)

  • How to create user credit control via customization

    Hi !
    I have to create user credit control via Transaction :
    SPRO.
    path:
    Sales and Distribution->Basic Functions->Credit Management/Risk Management->Credit Management->Define Automatic Credit Control.
    I want to check the user checkbox, and create my logic
    of credit control.
    In the help of credit control screen, it says that i have
    to use user exits LVKMPTZZ and LVKMPFZ1.
    However when i looked for that user exits at SMOD
    that user exit don't exist !!!
    How do i use those user exits ? Why can't i find those user exit ?
    Can you give me please  a code example of how to use
    the user checkbox to change the logic of credit control ? or any material about the issue.
    thanks
    moshe

    Hi,
      You dont find the programs LVKMPTZZ and LVKMPFZ1 in SMOD transaction, check in SE38 by typing the program names, there you have the provision to write your custom code,
      As user exits are specific to the business, it would be difficult to send the sample code to cater the functionality expected by your business,
    Hope this helps,
    Rgds,

  • Can Wireless Home Audio products be controlled via IP with any other devices?

    I'm interested in knowing if the Wireless Home Audio Director, Conductor or Player can be controlled via IP with alternative controllers?  Specifically, I'm interested in integrating the products into a universal remote control or home control system and still have 2 way communications with feedback.  IP and RS232 are the most commons ways of accomplishing this.

    Hi,
    Maybe for basic functions like (play, stop, next) using the IR remote, a third party IR based universal remote may work but that's a big gamble to take, anyway what would be the purpose then of the Linksys DMRW1000 (IP based remote control) remote that Linksys is selling if its compatible with third party remotes.
    Wireless Home Audio remote
    Well that's my thoughts on this, I hope you'll find the device your looking for.

  • Error 1082 when setting Strings[] property of a menu ring control via property node.

    I've attached a VI in which I attempt to set the Strings[] property of a menu ring control via a property node.  Can anybody figure out what I'm doing wrong here?  I'm using LabView version 7.1.
    Thanks,
    Mark Moss
    Attachments:
    Bug Test.llb ‏69 KB

    Open up your Stations Parameters Control.ctl file and change it from a Strict Type Def. to just an ordinary Type Def. (the pull down menu is located next to the font selector).

  • Main Stage_Learning Hardware Controls

    Adored Readers,
                              Am trying to configure Main Stage to respond to/"learn" hardware controls on a Roland RD-300 keyboard. (Nothing fancy, just assigning next/previous buttons.) Have followed all manual/guide/help instructions but am getting nowhere. I'm assuming this is because  the keyboard is not recognized by MainStage on some level (if so, I don't know what). Software for the Roland is installed but perhaps there is some way to assign/activate the info? Many Thanks in advance for all replies!
                                                                                 -Charlie

    CCTM
                  My thanks to you. I'd thought that to be the case but now this is confirmed. Thanks again!

  • Mac Mini with no monitor controlled via VNC - video output corrupt

    Hi,
    I have a Mini running with no monitor, mouse or keyboard connected (it's used as a Server for my music library) that I control via VNC on my Mac Book.
    Everything works fine until I ever have to reboot the Mini. After the reboot, logging into the machine via VNC shows all the video corrupt (jagged horizontal lines through the whole display making it totally undreadable).
    This happens both with ARD and Chicken of the VNC (tried both in case it was an issue with the VNC software).
    To fix it I have to connect a monitor to the Mini. Then I can just unplug the monitor again and the video output via VNC is fixed.
    Anyone have any ideas? It's driving me nuts
    Thanks,
    Neil

    After some more searching I stumbled across this thread on another forum;
    http://www.macusenet.com/archive/index-t-75211.html
    It seems that the problem can be avoided by connecting the DVI-S-Video adapter that ships with the Mini.

  • A lab view VI to control a tank system which is controlled via 3 solenoid valves

    a lab view VI to control a tank system which is controlled via 3 solenoid valves

    Perhaps he's asking for bids for the job. If so, perhaps posting in the LabVIEW Job Openings would garner more responses.

  • T61 Notebook Hardware Control dont work help

    hello, I bought a license  Notebook Hardware Control Lenovo  t61 goes can someone help me and I look ACPI control system not yet Configured

    @GMAC-R60:
    Because the Hotkey driver is installed, bluetooth cannot be activated by pressing Fn-F5 until the BT-driver has been installed.
    Otherwise:
    Bluetooth can be enabled before the Hotkey-driver is installed.
    I've tested it on several T61/X61 and older.
    My home-forum: http://www.thinkpad-forum.de
    Wiki: Deutsches ThinkPad-Wiki English ThinkWiki
    My ThinkPad-Collection

  • HP Hardware alerts via iLO

    Well that stinks. I really don't have $400 to spend just to get alerts.  Do Dell's include email alerting out of the box with their DRAC remote management, or do you have to pay for it as well?
    Thanks for the info Ace

    I recently attended an HP/VMware webcast where the HP host said that iLO4 equipped servers were capable of sending hardware alerts via email.  I've logged into our iLO on a ML350 Gen8 server, but I don't see the option for this.  Can somone please advise on how to do this?
    This topic first appeared in the Spiceworks Community

  • Satellite M50-182: Computer Hardware Control - can't see CPU temp

    Hello,
    I have M50-182 Satellite.
    I have installed the Computer Hardware Control 1.10 Beta 02.
    I can't see my CPU Temp.
    Can anybody help me.
    Thanks

    I don't know the program you describe but you could perhaps download the last free version of the Everest Home Edition analytical tool from OldVersion.com
    When you run it look under Computer/Sensor. It will show you your CPU temps and then you will at least know if it is the program or the sensor which is not working properly.

  • HT5886 Switch control use for hardware control

    The switch control description in support says the menu provides you hardware control including "Press the Sleep/Wake button to lock the device" I do not see that anywhere on the menu? What am I missing?

    Hi Eyal,
    Thanks a lot for your answer it has been very helpfull so far, but what I is happening now is as follows:
    - I have a text type ZUZZ which contains some text on the original activity.
    - I also have text type ZINT which should then contain the info from the the text type ZUZZ from the original activity. (That is the text from ZUZZ in the original activity should be copied into ZINT in the follow up activity).
    I did as you told me and the text from ZUZZ was copied into ZINT but not on the follow up activity but on the original activity. I think that I might just be missing something on the customization but I don't know what it could be.
    May I also clarify that the text ZUZZ is being filled up as a log (It takes the texts from another text and appends them with user name and time).
    Type    Desc               Seq     Changes Transf     Access
    ZUZZ     Clico Log          200     R     A     ZCLILOG
    ZINT     Clico Internal Note     250     R     A     ZCLIINT
    Access ZCLIINT has this:
    Ref. Object     CRM_ORDERH             
    Ref. Object     Transaction header     
    Ref. Text Type  ZUZZ                   
    Ref. Text Type  Clico Log              
    Function        CRM_REFERENCE_TEXT_GET 
    Do you know if there is something else I am missing so the field text get copied to the follow up instead of being copied to itself?
    Best Regards,
    Felipe.

  • Notebook hardware control on a Satellite

    Hi,
    I want to ask if somebody has expirience with the programm notebook hardware control on a toshiba satellite.
    Greetings.

    Hi Olser
    Usually if you use Toshiba designed tools it is enough for successfully notebook usage. Can you please tell us what you mean exactly with "hardware control"?

  • Controlling hardware automatically via modbus control

    Hey guys, Im in a bit of a bind. Im looking to switch in my power supply via modbus control. I am using an ADAM-4068, so for instance if i switch the first relay the dc power supply will be on with a voltage level of say 230V, il the second relay switches i want to switch off the dc power and switch in ac power. The ADAM-4068 has 8 relays where i want each relay to control  a piece of hardware. The voltage level is controlled by parameters in the database. I am using the modbus vi library serial master query write multiple coils, But my question is(i am quite new to labview) how can i automatically control the modbus to switch the particular coils to switch in the power supplies. I am lso looking to use the ADAM for communication to a PLC.
    Please any advice helpful.
    Damien

    I would start with Chapter 4 in the manual and use NI-MAX to see if you can send commands/receive responses from there succsessfully.  Learn also how to do basic serial port communications in LabVIEW.  Lots of good stuff in this forum as well as in the LabVIEW examples.  Then you should be good to go. 
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Maybe you are looking for

  • Syncing an outlook exchange and a regular outlook calendar to IPod Touch

    I have a personal outlook calendar on my home machine and have had no problems syncing it with the IPod Touch. However, when  I added the outlook exchange calendar I have from work onto that outlook program  (office 2010) and tried to sync with the I

  • IMac 10.5.8 Crashes upon sleep

    Frequently, when my computer either goes to sleep as scheduled, or when I put it to sleep via the Apple pull-down menu, the screen goes black but the mouse light & fans stay on, and the computer will not respond.  The computer has to be shutdown and

  • Maximum Number of Items has been reached in FI

    Hi All We are working on MySAP ERP 2005. We received the following error massage: [Maximum number of items has been reached] we then updated table TTPYV using MATNR,MEINS,MENGE,PAOBJNR,POSN2,VBEL2,WERKS,ZEKKN  We had these same settings in R/3 4.7 an

  • Airport Express Ethernet to Wifi repeater

    So I got a linksys router about 70-100 feet away from me and I would like to repeat the signal. It doesn't offer WDS but I have an ethernet switch right next to where I'm at (2 feet away) that is on the same network. Is it possible to extend the link

  • Battery Health after 13 cycles?

    I recently downloaded istate pro to check my battery and to my suprise my battery health is currently at 96% after 13 cycles. Yesterday I calibrated the battery and it was at 98% health.  Could be battery by obsolete? And I just got my mbp 1 week ago