Cluster to C formatting style struct (Named pipes (Windows), OpenG implementation), best/correct approach?

Greetings,

I'm trying to send commands to 3rd party software, through pipes (Windows). The 3rd party software implements channels appointed for me this approach should be used. The 3rd party software returned data me through a separate set of named pipes. The pipe command accepts the following structure as input:

typedef struct _pipe_CMD

{

WORD wCMD

BYTE, Byte [2]

} PIPE_CMD;

An example of command shows the following values:

wCMD = PIPE_CMD_EXAMPLE

bYte [0] = 0 x 0001

bYte [1] = 0

Similarly, the exit pipe returns the following structure:

typedef struct _PIPE_OUT_PUT

{

Double x

Double y

Double z

} PIPE_OUT_PUT

Question:

What is the way to better/correct to imitate the structure of the typedef above in/to leave LabVIEW? Note that the channel named (OpenG application) for Windows takes string input (and similarly returns a string output).

In the below attempts, I use a named pipe created by LabVIEW to test what can be read as I wrote my order for the named pipe. At this point, I was not able to get the 3 rd party software to respond to one of these commands, so I set the channel control named and listen to the output of the channel named, but I can type a channel named, successfully providing information (read only) house-keeping.

Try 1: cast

See Screenie 1. I threw each of the values in a string and it concatenate to send through named pipe. One of the problems here is that, in my view, type casting 0 creates a NULL character, who does not intend. The other problem is that I can not actually the 3rd party software to recognize that I sent an order!

Attempt 2: Flatten the cluster chain

Screenie see 2: I create a cluster and flatten it into a string to be sent by the named pipe. Here a number of characters represented is apparent in the output. Again, I fear that these are not representative of what I'm trying to send (wCmd and bYte [2]). Yet once, none charged with receipt of the 3rd party software that I sent an order.

Thoughts:

Should I change the channel named call library function node to accept clusters/structs to send what I want? This will break something else down the line? My "gibberish" (Screenie 3) return attempt, but same "gibberish" regardless of whether I used method 1 or 2 above, indicating that maybe I don't know how to read what is returned? (Could say "fool you, stop this")

Thank you very much in advance for all your comments!

Nicolai

If your named pipes pass binary data - and it seems that they are - so don't expect to get an ASCII string. You will also need to send binary data. The wCMD is setting a WORD (2 bytes, or 16 bits) - so why do you send 15 bytes (PIPE_CMD_EXAMPLE length)? Moreover, since the data is an array of 2 elements of fixed size, it would be preferable to use a 2-element cluster for byte element, and not a picture of LabVIEW. Who's going to flatten properly, while a painting may not (depending on whether you set the flag to prepend to the size of the array). For data read back, you will need to unflatten it in a cluster of 3 values double precision, and it is possible that you will need to reverse the order of each element byte to get the correct values.

Tags: NI Software

Similar Questions

  • Is possible Firefox redirection for win32 to named pipe?

    example \\.\pipe\xxxx as http://localhost: port

    I am also having the same problem... How to read from a named pipe?
    Anyone found any solution for this?

  • Option named pipe to add the missing Serial Port to Linux host

    Hi all

    I try to add a serial port as a channel named for a kernel debugging

    the installer, but this option is missing (see screenshot1). There are

    However the options to add the serial port in the file/socket.

    The host is 64-bit Fedora 10 2.6.27.24 - 170.2.68.fc10.x86_64 running.

    Workstation is 6.5.2 build-156735. I found that the named pipe option is missing, regardless of the type of the guest OS.

    I had posted this last week.

    http://communities.VMware.com/message/1267552

    and he said since as soon as I put in the following options in the marked .vmx file, a serial port option came (see screenshot2).

    Serial0.present = 'TRUE '.

    Serial0.filetype = 'pipe '.

    Serial0.filename = "/ tmp/com_1".

    I realized that I have a VM as the serial port server and others as a customer. So adding the option-

    Serial0.pipe.endpoint = 'server '.

    However, this option is breaking the vm configs (cannot start VM until I have delete this line).

    Please see the attached screenshot3 6.5.2 on Windows and you will see that there is a different and complete serial port setting to the research. You can easily set a virtual machine as a client/server side of the connection series on Windows.

    I would really appreciate if someone could give me some pointers as to why this difference between Linux and Windows, and how to get the type parameters for the serial ports under Linux Windows?

    My main goal for the purchase of workstation was to do kernel debugging using the serial ports, and now I'm totally paralyzed because of this. Pointers and suggestions are greatly welcome.

    Thank you very much

    HS

    no need to apologize

    Hey - if you work with functions like this - use the vmx directly - file so you can be sure that you get what you order

    ___________________________________

    VMX-settings- VMware-liveCD - VM-infirmary

  • Export and import using named pipes

    Hai,
    I need a clarification to the export, import and compress dumps using named pipes. I use Oracle 9i RAC 9.2.0.4 in AIX 5.3. Every month I have to move the list of tables in a database to a different database after shocks of export. The list of activities made by me at the present time are given below.

    1 account export and gziping file dump at the same time by using named pipes.
    2. to unzip and import into database using named pipes second.

    We do the compress for space constraints. Now my doubt is if using named pipes, we can make two import operations and compress the dump file at the same time. That is to say, at the time of export, using channels named, I need the import into the database in another and compress the zip file. Is this possible?

    mknod exp.out p
    mknod imp.inp p
    owner of dbadmin/admindb queue = exp.out exp = scott log = export.log statistics = none &
    gzip < exp.out=""> a.dmp.gz
    IMP file = imp.inp dbadmin/admindb fromuser = scott touser = foobar log = import.log &
    gunzip < a.dmp.gz=""> imp.inp
    RM exp.out
    RM imp.inp

  • How to read the data from a channel named in windows using labview

    Hello

    I need to read the channel named in windows data. The pipe is created by python by another application. This application post permanent data on the pipe. But I don't know how to read data using labview. is it possible to read the data from different application? If possible, how to start?

    Thanks in advance

    concerning

    RJ

    Hi Rolf,.

    It's just, because of driving is not initialized completely, pipe read returns error 42, I added 2 seconds late, then its work perfect.

    Thank you very much.

    Concerning

    RJ

  • How to make a free software for my laptop newly formatted? In addition to Windows 8.

    How to make a free software for my laptop newly formatted? In addition to Windows 8. I have an extended warranty at the dealer where I bought my laptop and do not know if the installation of free software is covered. But I want to do it myself if the resources are available.

    You can order Windows 8 update from the following link:

    http://www.windowsupgradeoffer.com/

    The following link will offer you if HP has tested your system for Windows 8:
    http://WWW8.HP.com/us/en/Ad/Windows-8/instructions.html

    If your system is not tested, HP will not release the drivers directly for your site template Web HP.com.

    The following hyperlink will suggest if your system is compatible with Windows 8:
    http://Windows.Microsoft.com/en-us/Windows-8/upgrade-to-Windows-8

    If your system is compatible with Windows 8, most of the pilots would be available through Windows 8. If you need any specific driver, please follow these steps:
    1. in the run box, type devmgmt.msc.
    2 unknown devices would be listed as such and plotted with a yellow question mark.
    3. Select the unknown device or any other device you need of drivers and right-click to access the properties.
    4. in the Properties window, click the Details tab and select Device Instance of Id or hardware ID from the drop-down.
    5. an alphanumeric string, like this DEV_7130 & PCI\VEN_1217 & SUBSYS_012F1025 & REV_01\4 & 6B16D5B & 0 & 33F0 is the marker for the identification of the unit.
    6. Please provide this number so we can offer you the appropriate driver.

  • Cannot format drive DVD - Rw with Windows Vista.

    Cannot format drive DVD - Rw with Windows Vista. Download "Windows cannot format... or is unable to complete the format.  Something like that. See a solution with Windows 7, but I use Windows Vista. Help?

    Hello

    ·        What is the model number of your computer?

    ·        Who is the manufacturer of your computer?

    ·        Did you format the disc earlier?

    ·        Are you trying to format the drive using windows Explorer or through third party software?

    I suggest you read the web link, below he provided information related to the formatting of disk.

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

    Hope the helps of information. Please post back and we do know.

  • format a blank disk with Windows 7

    How to format a blank disk with Windows 7?

    Question? Go you into computer, and then right-click the drive has? If not go ahead and do that and then in the list, there should be an option for formatting. Click on format and a window will be displayed, and then select the check boxes that you want to use, and then click the format button. This should be it.

    Hope this helps

  • Why can't I play the videos to M4V format bought in iTunes in windows media player

    Original title: M4V format

    Why can't I play the videos to M4V format bought in iTunes in windows media player. Thank you

    If the video does not the restrictions of DRM (Digital Rights Management), so you can see just by changing the .mp4 extension allows it to be played in Windows Media Player, but if Apple added restrictions to the file DRM then you will be limited to such players as apple deems suitable to be used, probably iTunes or Quicktime.

  • How to format a flash drive using windows 7?

    question: how to format a flash drive using windows 7 OS?

    Hello

    1. Connect the drive to a computer
    2. Click on the button - computer and locate the flash drive,
    3. Right-click on the Flash drive and select "Format".
    4. Click on 'start '.

    Note: Do not forget to save files you want to keep from a flash drive before formatting.

    It will be useful.

  • Format hard drive and reinstall windows xp

    I need help formatting my hard drive & reinstall windows xp. I have all the Dell CD, cd of the operating system, drivers & utilities cd, installed programs on my computer cd. I know that to change the BIOS to boot from the Dell operating system cd. What should I do after that?


  • Bug with the tag source formatting STYLE (DW CC 2015)

    The command 'Apply Source Formatting' formats incorrectly the content of the < style > tag. Instead of putting in the form and content of implementation set back as I specified in the tag library, the content and the closing tag will remain embedded to the left, for example:

    < style >

    {body

    background-color: #00005D;

    do-family: Verdana, Arial, without serif.

    }

    < / style >

    The code must be indented manually, which is having little pain, not to mention what to do so defeats the purpose of the command 'apply Source Formatting '.

    I searched the Forum of discussion here, but did not find any help for this problem.

    Is this a known bug that I'll just have to live with, or is it possible I can fix this in the configuration files?

    I think the reason for this is the default mode that CSS is formatted. When you run apply Source Formatting on an external style sheet, all selectors are flush with the left side, even within the questions from the media. The mode CSS formatting is determined by the Format of Code category in preferences (click the CSS button for advanced formatting). However, there is no option to indent the selectors.

    If you want to file a bug/feature request, use the official form: feature request/Bug Report Form

  • Word format / style rules to improve the conversion of PDF forms

    I remember seeing in a help file guides for people who use Office to adhear to a few simple rules to help when converting to a PDF form.

    We have many check list in different bets on the page and by different people with often little or no training or understanding.  (Notepad is complicated for their understanding - but I digress).

    Thus, we have checklists / Questions etc. in Word tables or in a document, etc.

    There are no guides I can find it recommends no spicific formatting to improve the conversion of Word to PDF format.

    For example.

    Name: OR name: _______ OR name.    Name the name in a field and the next field empty or _ _ or (_ = Undersore)

    So inconsistent as to what is a field and what is NOT...

    Then, it is the common problem of the users using "Insert symbol" like a box (how I hate forms of words that are filled with this Jem)

    Is there a formatting guide 101, which could help to provide assistance to those who are often responsible for "make a form / check list" so that when these documents are then required to be converted into a form PDF; do not start from scratch.

    There must be a document that identified what looks like the PDF Converter in deciding whether or NOT it is a domain!

    OH...  And is there a setting that will allow these symbols of checkbox dredded be recognized as a checkbox form?

    Thanks in advance.

    Mark

    First of all, when you set up the form in WORD, make sure that the Adobe PDF printer is selected in the menu of the printer so that the provision complies when converting to PDF. That has long been a problem with WORD documents/forms that reflow based on the connected printer.

    Acrobat Search essentially everything that seems to be a standard form element (a line of underscores, box or circle) and create a field related to these items. If you leave space, easy to use form tools in Acrobat to create your own fields (or modify those that Acrobat has attempted to add). The key is therefore what would be a normal type of the input in a form field. I'm not sure that the spaces after the colon are recognized as such. I suggest you create a simple shape style in WORD and add a variety of aspects of different shape type to the document and try the conversion. The manual says really nothing more that I mentioned. There are a few tutorials on the creation of the form at Adobe.

    You might find these useful tutorials: http://acrobatusers.com/tutorials/filter/search&keywords=wizard&channel=tutorials&category = 8 & 86 & tut_type = video-OnDemand-graphics-HTML /. I didn't help much in the present, but they can be useful for you.

  • A more effective way to format/style...?

    Hi people,

    See screen shot (below). I need to ask some similar stuff each month. I want to increase my efficiency. This provision requires that two paragraph styles: one for the name of the instrument and one for the name of the musician/address. But I still have to do a lot of button manual-push to come and go between these two styles. I am aware of the "paragraph format" feature, but I can't understand how to set up for this kind of page layout. Any suggestions on how to accelerate or to automate this type of layout? Thank you... Here is the screenshot...

    Sample3.jpg

    Assuming a five-digit address zip code all select and give it the style of the instrument, and then search for ^ 9 ^ 9 ^ 9 ^ 9 ^ 9 (^ 9 is just generic figures) and replace it with the style of the musician

    Jay

  • Paragraph - specific text formatting styles

    Hello

    At the moment, I have the following provision, which uses the paragraph style on data from an XML file. (part code/description/price)

    screenshot 1.png

    The question I have is that some products have a long description so bump the price to the bottom of line. (What causes the price stay to the left):

    screenshot2.png

    Is it possible to use a style to produce this provision if the description falls on two lines?

    -Description should not take visible range allowing the price to stay upwards

    -Description should align together rather than to the left of the frame

    screenshot3.png

    See you soon

    CM Bali says:

    .. Is it possible to use a style to produce this provision if the description falls on two lines?

    -Description should not take visible range allowing the price to stay upwards

    -Description should align together rather than to the left of the frame

    Are there tabs between the catalogue number and description text and text and price (?)? If this isn't the case, you can easily add them?

    If so:

    1. Add a tab the first dash remote

    2. turn left at that same number

    3. set back from front-line to the less that number

    -It supports the left indent. Then,

    4. Add a right-aligned tab at the right possible position - all the way at the end of the text block. Do not try to 'drag' marker tab enter any where inside the rule of the tab, and then type the exact number. This figure will be the width of your text block.

    5 put a dash on the right to a reasonable value - this will be the distance where you want as your long descriptions to fragmented.

    6. set a final withdrawal line unless this same number.

    If you find that the last before Word of the tab and the price (?) can sneak to the top too close to the price, type an em space just before the tab.

Maybe you are looking for