[W] Communicat​ion between EXEs
IPC.llb (InterProcess Communication) provides a way to exchange data between
LabVIEW created EXEs. Event driven, no polling. Compatible with Event structure.
Available for download at:
http://www.geocities.com/gzou999/demo.htm
George Zou
http://webspace.webring.com/people/og/gtoolbox
Why can't you use shift registers. And shift registers don't work on case structures. They work on the While loop that surrounds the case structure. Same thing for the event structure.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Similar Messages
-
Communicat​ion between threaded VIs with queues
Hi,
I would like to communicate between VIs (thread structure) with queues. But sending messages with queues increases the memory until crash.
I try to release the queue each time I send new message, but I also destroys the recipient !
Any suggestions for reliable communication between VIs (launched dynamically) -> Like Windows messaging ?
Thanks in advance for your answers.Here you have an example.
LabVIEW Portal
Attachments:
VI2.vi 15 KB
Main3.vi 11 KB
VI1.vi 16 KB -
Problem Description :
Dear Sir,
We are doing a project where we are using Lookout with
Front end Modicon PLC. The communication is by
Ethernet, using Modbus.
Since the installation is at a distant place, we wanted
to use another PC (running Lookout) to simulate the
PLC. For this, we tried to communicate
a: the server Lookout PC running Modbus Ethernet mode of
Modbus object as Master
b: with another PC (for simulating the PLC) running
Modbus Slave
We did not get any communication. (we have given the
details of what we have done, at the end of this email)
We also tried connecting the above 2 PC's as
a: the server Lookout PC running Modbus Serial mode of
Modbus object as Master
b: with another PC (for simulating the PLC) running
Modbus Slave object
Again we did not get any communication.
If instead of PC (b) we connect the Modbus simulator to
PC (a), there is no problem in communicating
Please let us know how to go about establishing the
communication between 2 PC's using Modbus serial,
and Modbus Ethernet. A detailed step by step procedure
would help us a lot.
Thanking you
Warm Regards
Raja Mahbubani
Procedure of our trial with ethernet.
This is what we have done in detail.
On PC A:
We created an object (Pot) and connected it to
the modbus data member of the modbus object say 40001. In the
properties of the modbus object we selected modbus ethernet mode
of communication and in the IP address field we wrote the IP
address of the machine B to which we are trying to communicate
i.e. 152.63.50.2.
On PC B: we tried the following two methods
Trial 1 : We created a modbus slave object and
inserted an expression for the same data memeber to which the
object was connected hoping to get the value of the pot of machine
A on machine B.
Trial 2 : We created a modbus object on machine B and we wrote
the IP address of machine A and inserted an expression for the
same datamemeber to which the object was connected hoping to get
the value of the pot of machine A on machine B.
NI Software : Lookout
Version : 4.0.1 or 4.5
OS : Windows 98
NI Hardware : N/A
Drivers : N/A
Other Hardware/Instruments : N/A
CPU : Pentium
RAM : 64
Vendor : S-Tech
Customer Information :
Raja Mahbubani
Theta Controls
IN
[email protected]
Ph: (+91) 20 4222556/7The ModbusSlave which comes with Lookout currently supports only Serial communication. So, you cannot use Ethernet between your two PCs. At least not with Modbus Master-Slave setup (if you must speak Ethernet between the two PCs, IPASCII object lets you do that, but then you'll need to implement your own protocol).
Since all you want to do is simulate a Modbus PLC on a PC, you can use the Serial mode of communication for now. And later on just modify the Object in your Server Lookout to use the Ethernet mode.
For setting up a Serial Modbus Slave, use a null-modem cable between the two PCs (lines 2 and 3 are swapped). On your PC 'B,' create the Modbus Slave object with the right COM port for that PC. And on your PC 'A' create the regular Modbus Object as if you w
ere connecting to the Modbus Simulator box. The only difference here is the cable. The simulator box uses a straight-through cable whereas the Slave needs a null-modem cable.
Hope this helps.
Rgds,
Khalid -
6500a e710 a-f - Scanner Communicat​ion Error Windows 8.1
We have been experiencing issues with scanning whilst connected via USB, using the HP Scan software. The software returns an error message saying scanner communication cannot be established, half way through scanning. Then HPScan.exe fails to load again. The printer just says “scanning cancelled” on its display.
This is only effecting one model of PC and that is a HP 8300 Ultra-Slim PC.
We are running Windows 8.1 64 bit from an image install. However, I have tested this with a fresh Windows 8.1 retail installation and get the same problem.
We have tried various actions to fix this:
- Various accounts, admin accounts, domain admin accounts, local accounts etc.
- Uninstall and reinstall. Basic and Full driver packages including the latest versions
- Removed all other HP software from PC including registry keys
- Used built in Windows 8 scan software with basic driver
- All USB ports tested including 2.0, 3.0 and powered / non-powered
- Replaced cables
- Re-isntalled USB bus drivers for 8300
- Followed the print/scan doctor which shows a driver error - scandriver unable to communicate with product
- Run HPScan in compatibility mode for 7/XP
- Updated firmware on printer
- Installed latest Windows Updates
- Checked WIA service and dependencies are running
- Semi and Full factory resets on Printer
- Shell hardware detection service set to manual
- We have replaced the printer for an affected user - same issue
- Also replaced PC for an affected user - same issue.
- Updated PC BIOS
I have tested connecting the printer to the router with a network cable and then installing printer as a networked device rather than USB and then the hpscan.exe works. So this is only an issue with USB (though it wouldnt be practical to try and talk 200+ users through networking their printer).
As you can see, we have tried almost everything. Interestingly we havent been able to replicate this issue in one of our main offices - despite collecting the same PC and Printer from an estate and bringing it back to an office.
We have also sent out a working PC and Printer combo to an affected estate office and it has not worked there.
Our Estate Offices connected via an ADSL Router and "My Documents" are re-directed to a network location. Could a failure in accessing this network location cause the problems? I have tested connectivity to network store from PC and it accesses the files fine.
Any solutions would be greatly received, I have spoken to HP After Sales support but not received an working solution yet.Greetings, @Scammell29
I have read through your post and have very ideas left for you, as you've tried quite the load of troubleshooting!
I am thinking the issue could be power related, so try a power reset and plug the printer in directly to the wall outlet. Avoid power bars, surge protectors, etc. Just a direct plug in to the wall to test the power. Afterwards, see if you still receive the communication error.
If the issue continues, next try a disk cleanup, the instructions are included in this guide: A 'No Computer Detected' or 'Connection Error' Message Displays during Scanning for HP Officejet 650...
If the error still persists, perform a Clean Boot and restart the PC and then disable the Firewall and Anti-Virus scanners.
Please let me know the results!
Good luck
R a i n b o w 7000I work on behalf of HP
Click the “Kudos Thumbs Up" at the bottom of this post to say
“Thanks” for helping!
Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution! -
Serial communicat​ion does not work in an executable​.
I have created a vi that communicates with a serial device. It works fine on the computer that it was creatd on. I then created an application and then built an installer to put it on another machine. The second machine does not have LV 2009 on it. Once installed on the machine the vi does not work. When it runs on the computer with LV 2009 the the com port control is a pull down, and it lists all comports on the computer and then you select the one you want to connect with. The computer that the vi is installed on does not list the available com ports. This leads me to believe that there is no serial comms support in the installable version. What do I do now?? I noticed that you can add "Additional Installers" when you build the installer and one of them is NI-Serial 3.4. I try to add this and a message said that it had to get, so I didn't use it thinking it was more than I needed and that standard com port driver would be included. Am I wrong here or am I missing something else?? All help is greatly appreciated.
[email protected]
Solved!
Go to Solution.claudio.rossi wrote:
Hi at all!!
I'm new in NI forum.
I have one similar problem. My VI communicate with external device on serial port. The VI work very well, but when I create executable (.exe) file with Labview application builder (on Labview 2010) the .exe don't use serial port!!! The executable run perfectly (nothing error or warning by the application builder), but the serial data on selected COM port isn't send!!! Also on the PC where I developed the VI!!!
What do you mean by your last sentence? Are you trying to say that you can't run your executable even on the same computer on which you developed the application? If so, was LabVIEW open when you tried to run it? Try quitting LabVIEW; if you had previously run your VI and didn't close the serial port, LabVIEW might have kept it open, which would prevent the executable from accessing it. If the executable won't run on the development machine it's unlikely to be resolved by installing VISA since you need that installed for the VI to work properly in the development environment. Do you have any error handling in your code that would indicate if an error occurred after trying to write to the serial port (an indicator on the front panel, or a call to Simple Error Handler)? -
How can I communicat​e between two computer via RS 232 port?
I would like to communicate between two computer in order to servo a motor motion to an acquisition.
Thank you in advance for your answer an your solutionsPreScript: I did not rate the above answer!
Here's a VI I use to test my instruments - if you have it running on both PCs, you should be able to communicate (with the help of a Null modem between them - cross Rx and Tx) - hopefully this will get you started.
cheers,
Christopher
Christopher G. Relf
Certified LabVIEW Developer
[email protected]
International Voicemail & Fax: +61 2 8080 8132
Australian Voicemail & Fax: (02) 8080 8132
EULA
1) This is a private email, and although the views expressed within it may not be purely my own, unless specifically referenced I do not suggest they are necessarily associated with anyone else including, but not limited to, my employer(s).
2) This email has NOT been scanned for virii - atta
ched file(s), if any, are provided as is. By copying, detaching and/or opening attached files, you agree to indemnify the sender of such responsibility.
3) Because e-mail can be altered electronically, the integrity of this communication cannot be guaranteed.
Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
Attachments:
Test_RS-232_Serial_Communications.vi 118 KB -
Intensity plot and MSnode-win​dow communicat​ion
Two questions:
1) Is there an intensity plot function that can be called from the mathscript window to display 2D arrays (such as a grayscale image), similar to the matlab function "image" or "imagesc"? The only options I saw were to display a 2D array on a 3D plot. Yes, I know the intensity plot is available in the variable display window, but I would really prefer a command-line option.
2) When I wire a variable to a matlab script node and run the VI, that variable becomes available in the matlab command-line window. I find this very convenient. Is it possible to do this (or something like this) with the mathscript node and window? I know I can communicate between the node and window with globals, but I have to go through the trouble of defining globals, and this only works if I create a project for my VI, which is just far too much overhead.
thanks.Hello,
In response to your first question, we currently do not have such a function. However, such functionality is on the roadmap for a future release. As for the second question, each MathScript node is currently sandboxed -- that is, it has its own variable space. This was done so that there is no variable collision between different MathScript nodes. We will be improving the interaction between the MathScript node and the MathScript Window in the future and your suggestion is one idea we are considering. It would most likely be an option on the node and not enabled by default to prevent any variable collisions.
You do not need to create a project in order to use globals to share data between the MathScript node and the MathScript Window. However, the MathScript node and the MathScript Window need to be in the same application instance. Thus, if you are already using projects, make sure you launch the MathScript Window from the same project in which your VI is located. If you are using the default application context (no projects open), then you should be able to share a variable "a" between a MathScript node and the MathScript Window by typing in each:
global a
Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments -
TCP communicat​ion temporaril​y dies
Hi There
Im using TCP to communicate between my ARM processor and PC. However, the communication sporadically dies for 3 to 4 seconds and then resumes, as shown in the Task Manager Networking (attachment 1) . This happens with the simplest of test programs, as shown in the attachments, and no delays or sequences seemed to solve the issue.
After some duration the communication dies completely with error code 66.
What is causing the delays in communication and is there a fix for this?
Attachments:
simple TCP failure.jpg 527 KB
Simple Server - ARM.jpg 72 KB
Simple Client - PC.jpg 74 KBHey,
What kind of delay did you add into the VI? it sounds like a pretty classic case of reading and writing TCP too fast. You may want to take a look at this article: http://digital.ni.com/public.nsf/allkb/4CB799F36D0EA56A862576200064B2F9?OpenDocument
Regards,
Eric L.
Applications Engineer
National Instruments -
Communicat​ing between LabVIEW and Basic Stamp 2.0
Hello,
We are trying to control the movement of a Parallax Boe-Bot (robot with
Board of Education) via LabView programming. The BOE operates on
Basic Stamp programming to control the pulse width sent to two servo
motors.
Is there a way to establish communication between LabVIEW and Basic
Stamp 2.0? We need to send commands from LabVIEW to the
Basic Stamp to control the pulse width and therefore the rotation of
the two servo motors. We also need to send a signal from an
accelerometer based on the robot to the LabVIEW ADC.
The ultimate goal is to do this with wireless communication, but for
right now we are simply trying to figure out any way to send the data
between LabVIEW and the Basic Stamp.
Any ideas?
Thank you,
AdamHi Adam,
You can communicate with a BASIC Stamp microcontroller over GPIB using VISA. To see some LabVIEW example code, just search for GPIB in the NI Example Finder (Help>>Find Examples). This will show you the basics of GPIB communication in LabVIEW. I also found this link by searching the NI discussion forums for "basic stamp"
http://www.parallax.com/html_pages/downloads/software/software_basic_stamp.asp
Here you can download an example using LabVIEW 7.0 or higher to communicate with a BASIC Stamp 2.
I hope this is helpful! Let us know if you have further questions.
Megan B.
National Instruments -
Fpga: Communicat​ing between fpga and third party program running on pc
I am using a C-Rio to control a planar robotic joystick. The goal is to use the joystick as a force feedback controller for a computer game running on a pc.
My program as is for now runs a program on the fpga to read the encoder values and run the pwm for the motors. An RT program reads those values and performs the control as well as it calculates the fwd and inverse kinematics of the robot.
What I would like to do now is to pass the x-y values of the joystick on a third program (computer game) that runs on a PC.Currently the game runs on LabVIEW but I would the system to be combatible with other programs written in different programming languages. I have been told that the best way of doing this is to setup a server. Is this the only/best way of doing this?
I would like to know what is the best way to communicate between a program running on a pc and a program running on the fpga for this type of application. What is the best way to pass along information from fpga to third party app running on pc and vice versa?
I am sorry if this has been asked before but I couldn't find a relevant thread. Thank you for reading this!
AresIf you need every command to make it, then you should use TCP. I would recommend taking a look at the STM library that is floating around somewhere on the LabVIEW Tools Network.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Interproce​ss Communicat​ion C++ - LabView
Hi,
I have a C++ *.exe file wich is grabbing images with a Matrox framegrabber. This program ist startet via "system exec" from LabView. I want to do a kind of time measurement with this program so i need the exact time when the grabbing of frame starts. At the moment I dont know how long the *.exe file needs to initialize the framegrabber (something about 500-1000ms).
My idea is to start a continous grabbing but start saving the images when another command via LabView will be send to the C++ application. But I don't know how to send this command! It should be a kind of a "wait until key pressed" controlled by LabView. Maybe a global bolean or something like that.
I hope somebody can help me!
(programming with LabView 7.0 and Visual C++ 2003.NET)Hi,
What
you are looking for is called an “inter-application communication”.
There
are several options to realize it. LabVIEW supports TCP/IP, ActiveX or UDP to
communicate with another application. So
it’s not as simple as using a “global Boolean”
as you mentioned.
I advise you, to use the LabVIEW
examples which shipped with the NI example finder to get some programs as
reference. Search for keywords like TCP/IP, ActiveX and UDP.
Attached
you’ll find a link to a knowledgebase.
Hope this helps.
How Do I Use LabVIEW to Communicate with Other
Applications?
http://digital.ni.com/public.nsf/allkb/B3959ED76D55A9E586256965004D8092?OpenDocument
Regards,
Ulrich
AE NICER -
Hello,
I'd like to communicate between LabVIEW (CompactRIO) and the S7-300 PLC.
Which is the protocol NI recommend to use?
I read, that TCP/IP over OPC and profibus work fine. Maybe MPI or Modbus, too.
But I would favor a cheaper solution like the communication directly over TCP/IP. The problem is in my opinion, that Siemens modified the TCP/IP protocol and the protocol itself is not public. I found an example library at ni.com but this was build by using reverse engineering. And I'm not sure, if such a library would work reliable.
I know this topic is interesting for many people, but I could not find a general recommendation here in the forums.
RegardsI have direct experience using the NI OPC servers to talk to Siemens S7-300 PLCs, and it's by far the easiest way I've found to communicate. There may be 'less expensive' options out of the box, but from purely a development standpoint, it's very fast and easy to get working.
-
Siemens S7 300 PLC and Labview Communicat​ion
Hi,
I am attempting to communicate between Labview 7 and a Siemens S7 300 (CPU 314) PLC. I would prefer the communication to be over Ethernet or RS 232. Could you help me out with this implementation and let me know what additional hardware/software I may require for doing this.
Thanks,
ShameekShameek wrote:
I am using a CP-343 communications processor to connect the S7 300 to industrial ethernet.
Now can I commnicate directly from Labview to the PLC?
I still havent figured out where the OPC server comes in and whether it is an option or a necessity.
Using OPC is an option.
Siemens has an the add-on ($$) library/FB that includes code for enabling Modbus communication with S7 300 CPUs. I've never used it, but info is here.
<snip>
Our solution
With its MODBUS function block (FB) and the CP343-1 and CP443-1 SIMATIC S7 communications processors, Siemens can supply a proven solution for the integration of SIMATIC automation systems into other system landscapes. This function block enables data to be exchanged easily between MODBUS-compatible devices from different manufacturers and SIMATIC S7 stations from S7-300 and S7-400 systems.
</snip>
=====================================================
Fading out. " ... J. Arthur Rank on gong." -
I must communicate with my instrument, but I must change its value, for example temperature, every loop. See the Figure to understand:
I think that it is better if I open communication with my instrument out of while loop so I many operation: if I put Open VISA in While loop I open VISA session every loop, instead I think it is not intelligent. Can I open VISA SESSION out of the while loop or it is an error for EXCELLENT LABVIEW VI and I must open and close VISA SESSION every times I must talk (and set) with instrument? What is the better way?
Message Edited by Michelle1892773 on 02-22-2010 02:00 PMSomething like this?
I do have to say, i don't know what is happening in the false case of yours, but if nothing happens with the 100 that is wired to the shift register, once you enter the true case, the value in the shift register will always be great than "i". You might as well do what I have done then. However, if something does happen with that number in your false case, then keep it the way you have it.
That being said, why is the condition there to see if it has looped 100 times before doing the visa write??
Message Edited by for(imstuck) on 02-22-2010 04:45 PM
Message Edited by for(imstuck) on 02-22-2010 04:46 PM
CLA, LabVIEW Versions 2010-2013
Attachments:
visa.PNG 13 KB -
OfficeJet Pro K8600 looses communicat​ion -will not print
This is our main printer in the design area at work and I really need this to work!! Any help appreciated.
Vista SP2 Dell Pavilion Intel Quad 2.33ghz 64bit OS 8gb RAM OfficeJet Pro K8600 on USB cable to main ports
I loose the connection and have to reboot the computer to get it to print again.
It prints fine for several hours or a day or so, then suddenly will freeze part way through printing, or simply will not print at all. In Printer preferences I click on services - Ink levels tab - "computer unable to establish 2 way communication"
Removing the USB and reattaching does not help, nor does changing the USB port used.
Disconnected unit, rebooted, deleted printer icon, uninstalled printer drivers, rebooted, did full install using the HP CD and I still have the same problem after printing for awhile.
HP Diagnostic utility does not detect any problems when printer is not working or when it is working.Did you install the two HP updates slp_dd_hati_110_107.exe and ConvergedIO_HPCOM_V3.exe?
Please mark the post that solves your issue as "Accept as Solution".
If my answer was helpful click the “Thumbs Up" on the left to say “Thanks”!
I am not a HP employee.
Maybe you are looking for
-
HR - Training and event management
How to create a location (japan,China) while creating a Program schedule????
-
i cant download new application on my Iphone everytime i open app store then searching for the application i want to download when i Tap the FREE sign it become half square and never downloaded.
-
ITunes Unexpectedly Re-Opens after Closing
I just reformatted my laptop and upon installing iTunes 6.0.3.5, I noticed that iTunes, after closing it, will relaunch a few times, usually two. I figured maybe it was something with the software version, so I just updated to 6.0.4 and it does the e
-
Do i need to update to ios4.3 first before ios6 for my iphone 4?
Hi, do i need to update my iphone4 to ios4.3 first before updating ios6 ? or can i skip all previous iOs version and update iOS6? pls advise. thanks Steve
-
Error message ORA-0097 missing right parenthesis
Dear all; Please what is wrong with this particular code because I keep getting the error message ORA-0097: missing right parenthesis pl/sql: sql statement ignored. Thank you spectification of package create or replace package NEW_INFORMATION is func