SetLine in DotNet

Hello world

I'm developing an application that uses VB.NET and VISION.
I want to do a SetLine to change some pixels of my Image. Unfortunately, I have the exception "in a parameter of a type of VARIANT, you spent an invalid type.

Here is a code example:

Dim Image As New NationalInstruments.CWIMAQControls.CWIMAQImage

Dim line As New NationalInstruments.CWIMAQControls.CWIMAQImage

Dim data As Byte ()

Dim line As New NationalInstruments.CWIMAQControls.CWIMAQLine

Image.Type = NationalInstruments.CWIMAQControls.CWIMAQImageTypes.cwimaqImageTypeU8

line. Type = NationalInstruments.CWIMAQControls.CWIMAQImageTypes.cwimaqImageTypeU8

line. SetSize (1, 100)

Image.SetSize (100, 100)

ReDim data (1, 100)

data = line. ImageToArray()

line. Initialize (1, 1, 1, 100)

AxCWIMAQVision1.SetPixel2 (line, new NationalInstruments.CWIMAQControls.CWIMAQPoint, 1) / / Ok with this function

AxCWIMAQVision1.SetLine2 (image, line, data) / / Exception thrown here

I understand that AxCWimaqVision is only one active X control and NEITHER provided a code of the DLL from C++ VIEW for DotNet wrapper. We must therefore spend type VARIANT.
But in dotnet, the Variant Type is the object type. In my code SetPixel accepts an integer and the DLL, to appropriate type cast to make the service...
In SetLine , I tried a byte array, an object... It does not strange...

There is no problem LV and CVI. In the CVI, we pass a char * to the data type

Thank you very much!!

Hello
You are right... I have a camera of GIRLS offering a line of 12288 pixels I have seen that the image is always a 2D array
But the best way to do this is to use GetLine and then SetLine...
Another function is more optimized, it is ImageToImage. With this feature, it is not necessary to convert the images to the berries!

Thank you

Tags: NI Software

Similar Questions

  • Dotnet system.array, method

    Hello Council

    I'm stuck by calling a dotnet assembly in LabVIEW. The final step is to pass a system.array into a method to have the result of calling the method listed in this table. I don't really understand how to do this.

    Help is greatly appreciated.

    The details are in the attached example of the LV2011.

    Thank you

    Dermot

    Your LabVIEW code is supposed to match the c# code in the comments above it?

    Instead of reading the file as a text file, read in a binary file and define the type of data entry in a table of the appropriate numeric type. When you play the file as a text file, it can convert the end-of-line character for you, which can cause corrupt data. In addition, it will be more efficient memory because ignore you the unnecessary conversion of an entire string.

    I understand exactly where your problem is the code is not more clear, and this link could help show how to convert an array of LabVIEW in a .NET table: http://forums.ni.com/t5/LabVIEW/How-to-pass-a-Labview-array-into-a-C-NET-array-object/m-p/1992795#M6...

  • MeasurementStudioVS2008\DotNET\Assemblies\9.2.35.32

    Hello from NOR-DAQ Fan and expert.

    a ViusalStudioExpress2008 on my computer works very well with the NationalInstruments.DAQmx.dll and a NIDAQ USB product. Now our admin will share an installation routine of the file for our production, but we did ' t find the version of setup.exe from NIDAQMax supporting us

    the following assemblies.

    C:\Programme\National Instruments\MeasurementStudioVS2008\DotNET\Assemblies\9.2.35.32

    I hope that each of you know with Version will create these files.

    Thank you

    Daniel

    Thanks, I find the file NI-DAQmx\MSSupport2008\MStudioDAQInstaller2008.msi NIDAQmx 9.2.2 by myself

    Best regards

    Daniel

  • Quadrature encoder frequency division dotNet VB Net c#

    Hello

    After a long search on this forum, I decided to start this thread for dotNet developer.

    I have a PCI-6602 with an encoder in quadrature (A, B, Z). The frequency of the pulses is average (10 kHz).

    I'm only using the channels A and B.

    The function I need to implement is to output all N pulses forward. N is a natural number and ranging from 1 to say 100.

    I have no constraints on the output. I may be a little switch or a generation of impulses.

    What features I'll call in MeasurementStudio.Net to implement this?

    How many counters should I use?

    On the registry, my guess is that I have to preload a value in the registry.

    Then when countdown counter reaches 0 this in turn does 2 things:

    • reload its set value meter
    • triggers the generation of output (TerminalCount)

    Thanks for any help you can provide

    Guy nOTEs for EITHER:

    ---------------------------------

    Moreover, in samples of NOR, squaring does work all the way.  I NLE sample "CountDigEvents" with CountDirection the 'Externally controlled' value, backward motion is never displayed. This is because the meter is read as a UInt32.

    Hi anthony75fr,

    Although there is no support for A, B and Z entries, the behavior you're looking for is essentially how a counter output tasks works.  Wouldn't not enough output on each pulse signal of A N (ignoring B and Z)?

    If so, you can configure it with only one meter by making a simple change to the example of GenDigPulseTrain_Continuous.  The basic shipping example uses the CreatePulseChannelFrequency method.  You want to use the CreatePulseChannelTicks method to specify your low and high time regarding ticks of the external signal (regardless of the PFI line the A out of your encoder is connected to).  By default, the output of the meter will switch between high and low in a way the number of ticks high and low ticks that you specify (for example, you can set up the meter for the output up 2 ticks and low for 98 ticks, giving a boost all 100 ticks - 2 is the minimum value for high or low ticks).

    Best regards

  • dotnet 2003

    Is dotnet 2003 always supported

    Hello
     

    Are you referring to Visual Studio .NET 2003 or .NET Framework?
     
    Please use the links below to check the life cycle of the product.
  • Error code 101-752 dotnet framework error, problems to load the new software of the printer

    Error code 101-752 dotnet framework error, problems to load the new software of the printer

    Hello

    (1) have you made changes before the start of this issue?

    (2) when you get the error message?

    (3) is the specific question of the installation of the printer software?

    (4) what is the brand and model of the printer?

    It seems that you need to fix .net Framework installed on the computer. Follow this link and see if it helps.

    Fix the .net Framework installation

    http://support.Microsoft.com/kb/976982/en-us

    Note: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: 322756 (http://support.microsoft.com/kb/322756 /) how to back up and restore the registry in Windows

    See also:

    http://Windows.Microsoft.com/en-us/Windows/help/printer-problems-in-Windows

    Let us know if that helps.

  • Dotnet 4.0, cannot be upgraded - "Setup cannot continue because a previous installation requires your computer needs to be rebooted...» »

    original title: Dotnet 4.0, cannot be upgraded.

    I need help on problem mentioned below, the error obtained when upgrading to 4.0 on XP with SP3 dotnet even machines with and without the dotnet 3.5 installed.

    "error: Setup cannot continue because a previous installation requires your computer needs to be restarted." Restart your computer and run the Setup again.

    Hello

    ·         Did you do changes on the computer before the show?

    Follow these methods.

    Method 1: Temporarily disable the security software.

    Note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable the antivirus software. If you do not disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network at the time the anti-virus software is disabled, your computer is vulnerable to attacks.

    Method 2: Put the computer in a clean boot state to see if there is a software conflict as the clean boot helps eliminate software conflicts.

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    Note: After completing the steps in the clean boot troubleshooting, follow the section How to configure Windows to use a Normal startup state of the link to return the computer to a Normal startupmode.

    After the clean boot used to resolve the problem, you can follow these steps to configure Windows XP to start normally.

    (a) click Start, run.

    (b) type msconfigand click OK.

    (c) the System Configuration Utility dialog box appears.

    (d) click the general tab, click Normal startup - load all services and device drivers and then click OK.

    (e) when you are prompted, click on restart to restart the computer.

    Method 3: You can also manually install updates (KB number) by downloading from the Microsoft Download Center.

    http://www.Microsoft.com/download/en/details.aspx?ID=17851

    http://www.Microsoft.com/downloads/en/default.aspx

    For reference:

    How to reset the Windows Update components?

  • DotNET application is not

    HI team

    We are trying to control the application in dotnet using Foglight (5.6.4), we deployed the Dotnet 5.6.8 cartridge

    We installed the Manager Agent and deployed the dotnet cartridge and also created the Agent for Dotnet, we are able to see the army under the view domains .net , but the application is listed, or the request it is not true, we couldn't see anyting in the ask .net view

    We configured the agent properties to control the Application and also provided a list of the applications to use the properties by default, but still its not monitored or to its not displayed under the view REQUEST .NET

    We tried several settings as settings of user like True and false always the application management console are not listed

    When I checked for Services on the monitored host, I could see the two Agent Manager and the interception Service are started... I also rebooted the issue of services always the same, so tried to restart IIS by using the settings and also manually, the application always getting are not included.

    I have attached the properties of the Agent and the views of .net for your reference

    Concerning

    Sriram S

    Additional accessories:

    In your properties, you have "set up by using the management console (ignore all the settings below)" set to true, can you please try to change it to false and restart the agent?   I suspect that a restart of IIS is also necessary.

    Monitor all brands of web applications specifically defining the list of web applications not required (also your settings for web applications are VERY low (threshold of 0 and 0 sensetivity will be followed MUCH)).

    Long story short, try the following:

    1. power set it up using the GPMC to false.

    2. If you monitor all web applications you need not the list, especially with the thresholds that are weak, if I were you I would try to delete this list and let the 'monitor all web applications' do its thing.

    3. alert threshold of 500ms and sensetivity of 10ms is also low, unless your application is very fast, I would like to change it to alert threshold of 3000 or 5000 ms and sensetivity of 100.

    After these changes, you have to restart the agent and I suspect you will need to restart IIS, and then exercise the application.

    Golan

  • Help running DotNet samples

    I built the DotNet CS samples successfully, but as I am new on the WSSDK, I'm not clear how to operate.  For example, I'm trying to run GetVMFiles or GetVirtualDiskFiles from the inside of the host (Windows 2003 Server) running on vSphere 4.1.

    I don't understand what more of the different parameters mean.

    I ran this command-line, divided for readability (192.168.123.121 is the IP address of the server vSphere, the client runs on):

    GetVirtualDiskFiles.exe - url https://192.168.123.121/SDK username - root - password rootpswd - Server 192.168.123.121 - hostname 192.168.123.121

    I get the following result. It lists VMDK that one only which is not even used by the current customer! Can someone tell me what the various parameters and how to get the VMDK for the current customer?  Thank you.

    • A string of certification handled properly, but finished in a certificate root that is not approved by the trust provider.
    • The certificate CN name does not match the passed value.
    Start the journal. Started there were one or more problems with the certificate of the server: search the storage of data search Datastore Storage1 disks files virtual CL - w2k3x64a3.vmdk files of the virtual disks Searching The Datastore Storage2 No. thin provisioned found completed VirtualDiskFiles journal of end.

    Hello

    The other filter criteria that uses this example is the controllerType to be "VirtualIDEController". You can try to remove/comment following the line, re - build the sample and post the output. Removal of the threshold will ensure that no filter criteria apply when searching for the data store.

    searchSpec.query = arr;
    

    About your application to the parameters specified when running the example, they seem to be correct. They mean following:

    -url: URL of the ESX/vCenter Server

    -username: user name for authentication

    -password: password for authentication

    -hostname: host where the search data store must be performed

    I couldn't find the "-Server" parameter, so do not know what that means.

  • Oracle coherence in dotnet

    Hello
    I'm trying to implement consistency using coherence 3.6.1.0 dotnet.having version installed.trying to run the sample application dotnet with the addition of coherence.dll as one of the references. But I get a msg of error as

    "could not establish a connection to one of the following addresses: [MyIpaddress:Port]; Make sure that the configuration of addresses item "remote control" contains an address and a port of a TcpAcceptor running.

    Think she's looking for some port is to be tuned my local address and port. Please help me to solve it and tell me the step by step process.


    I'm going to app.config with

    <? XML version = "1.0" encoding = "utf-8"? >
    < configuration >
    < configSections >
    < section name = "coherence" type = "Tangosol.Config.CoherenceConfigHandler, consistency" / >
    < / configSections >
    < coherence >
    file://../../../resource/config/examples-coherence.XML < cache-factory-config > < / cache-factory-config >
    file://../../../resource/config/examples-extend-cache-config.XML < cache-config > < / cache-config >
    file://../../../resource/config/examples-POF-config.XML < pof-config > < / pof-config >
    < / coherence >
    < / configuration >

    * examples - coherence.xml *.

    <? XML version = "1.0"? >
    < consistency xmlns = "http://schemas.tangosol.com/coherence" >
    <>logging-config
    stderr < destination > < / destination >
    > < 5 severity level < / severity level >
    < message format > {date} & lt; {level} & gt; (thread = {thread}): {text} < / message format >
    > limit of < 8192 characters < / character limit >
    < / operational forest-config >
    < / coherence >

    * examples-extend-cache - config.xml *.

    <? XML version = "1.0"? >
    < cache-config xmlns = "http://schemas.tangosol.com/cache" >
    < cache-system-mapping >
    <>cache-mapping
    contacts > name-cache < < / cache-name >
    < scheme name > examples-remote control < / system-name >
    < / cache-mapping >
    < / cache-system-mapping >

    <>- cached patterns
    < remote-cache-system >
    < scheme name > examples-remote control < / system-name >
    < service name > ExtendTcpCacheService < / service-name >
    < initiator-config >
    <>tcp-initiator
    <>remote addresses
    > the socket address <
    localhost < address > < / address >
    < port > 8089 < / port >
    < / socket-address >
    < / remote-address >
    < / tcp-initiator >
    < serializer >
    > class name < Tangosol.IO.Pof.ConfigurablePofContext, consistency < / class name >
    < / serializer >
    < / initiator-config >
    < / remote-cache-system >
    < / cache-plans >
    < / cache-config >

    * examples-pof - config.xml *.

    <? XML version = "1.0"? >
    < config-pof xmlns = "http://schemas.tangosol.com/pof" >
    < user-type-list >
    <! - consistency POF user types - >
    < include > assembly://Coherence/Tangosol.Config/coherence-pof-config.xml < / include >
    <! - Tangosol.Examples namespace - >
    Type < user >
    < type id > 1001 < / id-type >
    > class name < Tangosol.Examples.Model.ContactId, Contacts < / class name >
    < / user type >
    Type < user >
    < type id > 1002 < / id-type >
    > class name < Tangosol.Examples.Model.Contact, Contacts < / class name >
    < / user type >
    Type < user >
    < type id > 1003 < / id-type >
    > class name < Tangosol.Examples.Model.Address, Contacts < / class name >
    < / user type >
    Type < user >
    < type id > 1004 < / id-type >
    > class name < Tangosol.Examples.Model.PhoneNumber, Contacts < / class name >
    < / user type >
    Type < user >
    < type id > 1005 < / id-type >
    > class name < Tangosol.Examples.Contacts.OfficeUpdater, Contacts < / class name >
    < / user type >
    < / user-type-list >
    < allow-interfaces > true < / allow interfaces >
    true < subclasses allow > < / subclasses allow >
    < / pof-config >

    Hello

    The consistency-java - b 411 .zip v3.4.2 is a very very old version of coherence. From your previous post, I see that you are using version 3.6.1.0 consistency .net client. You should at least try and download the zip file from Java to address 3.6 http://www.oracle.com/technetwork/middleware/coherence/downloads/coherence-archive-165749.html here or if you are not concerned, on which version you have and download the latest 3.7.1 versions of coherence .net and Java here http://www.oracle.com/technetwork/middleware/coherence/downloads/index.html

    In the C:\Program Files\Oracle\Coherence pour.NET\examples\ContactCache.Java directory is a file called start-cache - server.cmd which will start the process of single server. Before you run this you must...

  • Set the COHERENCE_HOME environment variable to the directory where you unzipped the zip file of coherence Java for. FOR EXAMPLE if you have unzipped the file into a directory called c:\dev , then there will be a directory under that called coherence so set COHERENCE_HOME = c:\dev\coherence

  • You must also set the JAVA_HOME on your PC environment variable to the location that you installed Java - usually something like C:\Program Files\Java\jdk... ... For example, if you had 1.6.0 - 25 Java installed on your PC, then you would set JAVA_HOME = C:\Program Files\Java\jdk1.6.0_25

    Once you have set these environment variables, you should be able to open a Dos window and run the script startup-cache - server.cmd. Once it is running, your customer must start and connect to this server.

    Some tips for you if you're a .net developer and new coherence and Java.

  • Buy this book http://www.packtpub.com/oracle-coherence-35/book I know it says 3.5 but it is always topical and very good
  • Work through the examples and documentation http://docs.oracle.com/cd/E24290_01/index.htm
  • Learn some Java or find someone in your team or a company who knows Java.

    JK

  • Call a procedure that returns an array of the results of dotnet

    Hi I have a function in the database (see below), I am creating a Web page and you want to call the function and get the results, how can I do this in dotnet using the ODP.net. does anyone have a code please... I called procedures in the database that return of refCursors but not tables.


    Type rec_user is record (call varchar2 (200),)
    Identification number);

    Type tab_user is table of the rec_user;

    function populate_user (piusername in varchar2) return tab_user;

    ------------------------------
    Concerning
    Ash

    Hello

    Registration table is a PLSQL type and cannot be called from OIC (this is what ODP.NET is written in). If you change the procedure to return the table or Varray of the object instead, you could do that with the support of the UDT available in ODP 11106.21 and higher.

    There is an example in this thread that you may find useful:
    By the way the table of the UDT or Collection, as IN to the OracleDbType.InputOutput HELP

    It will be useful,
    Greg

  • Driver Oracle client for DotNet Application necessary

    Hello

    We have an Application of Windows Desktop DotNet, written in c# using Visual Studio 2005.

    We are now able to connect to the Oracle database 10.2 with it using ODBC, but we need to know what driver to use.

    The DotNet Application is put on all of our Call Center Representative for desktop computers by using ClickOnce technology.

    We would like a light driver to install on each of the desktops, but you need to know where to download a driver and how to install it.

    All advice is appreciated.

    Thank you!
    :) Anne

    For light xcopy deployment of ODBC, you probably want to go with the moment customer, more information here.

    It will be useful,
    Greg

    Published by: gdarling on January 20, 2010 10:39
    I may misread your message. The application uses ODBC? Most .NET applications would use ODP.NET instead, and you can get a version of xcopy of this here

  • Run DAQmxWithUI DotNet example

    Hi, I have an error when I try to run the DAQmxWithUI sample using Measurement Studio 2008 - SynchronizeTwoAIContinuous example. Basically, the error stated that I don't have the license for the analysis module. My question is that I don't see in the code example that is to import the analysis module. Is there something that I am missing to build the example?

    Thank you.

    K.

    This example uses the Analysis.Math Library, which requires a license. This example is installed with Measurement Studio instead of DAQmx and it is assumed that you have a license for all components of Measurement Studio. If you want to use this example, you can remove the assembly from the list of project references and remove using the statement. Then when rebuilding, errors will indicate the methods of ArrayOperation.CopyRow. They can be easily replaced with your own code.

    You can also use API .NET DAQmx examples that don't depend on a Measurement Studio license. They can be found in start > all programs > National Instruments > NI DAQ > text Code support > .NET 3.5 examples.

    If you have a valid license of Measurement Studio, try to refresh the license file. In Visual Studio, go up to the Measurement Studio section and select refresh the license of the project file.

  • dotnet framework will not initialize

    When I try to start a new program (Vegas Pro 9 0a) I get an error saying that .net runtime is not initialized.  In detail, he says I have to install .net framework 3.0.  I already have the .net framework 3.5.  After clicking on OK, it appears with the error code 0 x 80131702.  What is going on?  Help, please

    .NET framework 3.0 comes as part of Windows Vista, Mick. It seems that something is wrong with the installation of .NET Framework 3.5
    Suggest you check is the installation by following the steps here:

    .NET framework Setup verification tool user guide MowGreen MVP Data Center Management - update of safety Consumer Services

  • Consuming webservice with widget Blackberry - Visual Studio dotnet

    Hi team,

    I have developed a webservice in ASP.NET and consumed it in using the Blackberry application

    HTML/JAVASCRIPT with XML HTTP REQUEST. It works very well and gives the O/P expected only when the

    Web service runs in LOCALHOST. When it's hosted Web service on a different server, I have m

    access with browser.but through the application of BLACKBERRY, unable to get the answer.

    Hearing from friends that JAVASCRIPT cant directly consume not on Web services

    LOCALHOST and the fact using WEBSERVICE behaviors (downloaded webservice. HTC) and

    After writing all the code, and then the debug gives the error to the so-called CALLSERVICE method

    undefined function , I guess that BB doesnot support webservice behavior option.

    Thus, even tried with the approach by JQUERY. It gives an error: external resources error requested resource and doesnot even run with LOCALHOST as well.

    Please help me the way out...

    Kind regards

    GOUSSARD

    Hey! I thought I did, but no jajaja

    I added the http://192.168.1.114:90 address to areas in the config.xml file an it worked!

    Yeiiii! I am so happy

    Thanks for your reply.

Maybe you are looking for

  • ICloud photo storage

    Hello I will be backpacking for a month or two and probably will not have enough room on my phone to store all of the photos I take. I intend to upload them to iClould whenever I had the chance to connect to the Internet. I would ask if I wanted to d

  • How can I remove the "subtitle" that comes after the main title of the effect of title page of Chronicle?

    I use Final Cut Pro 10.1.3 I have a question about the effect of the title page, or the "browser title". I chose the 'Chronicle' effect which contains a main title as a second line that says "subtitles". I don't know how to delete or change this seco

  • East fell off my bike yesterday evening and damaged left hand, angle of body load. How much is it?

    I was bike correctly and safely, but leaned into a corner too at a crossroads and there is frost on the road and slipped pretty hard and fast. First things I checked where my phone and the laptop (it is a start 2011 15 "macbook pro)... Laptop was wor

  • Add captions to photos in my Wondows Live Photo Gallery

    Please tell me how to add captions to my photo in my galleryt. I'm their tie-in at the base of the phioto but when I try to move them to another file or e-mail them, legends disappear. Please notify. I'm on Win XP. * E-mail address is removed from th

  • Random blue screen errors

    I use windows 8 64-bit on my laptop, and lately I've been doing bluescreen errors frequently. It says «DRIVER_IRQL_NOT_LESS_OR_EQUAL (NETIO.» (SYS) 'and when I restart the system, it displays' runtime error Visual C++ to not enough space for thread d