How to read COM port in Developer 4.5 or 6i?
Dear all
Have any one please let me know how to create forms with Developer6i join Barcode Scanner in COM port?
At the time, I import OLE Library interface to be developer's package body (Component MSCOMM32.OCX) It isn't efficiency.
Have any one Please let me your method and how to ?
Thanks a lots.
Parallel threads are easy in Labview. You just create two loops where the output of either loop is not connected to the input of the other. Without this data dependency, the two loops run in parallel. See the attached vi, my producer-consumer template. Replace the random number generator in the top loop with your serial port code. Put your other processing code in the bottom loop. Use the queue to pass info from one loop to the other. You can signal the lower loop when the serial port receiving is done by putting something on the queue that signifies the completion (like a "done" string). Your lower loop will constantly check the queue, looking for the "done" string. You can use a boolean if you remove the string wires and replace them with boolean types.
Bytes at Port will look at the serial port buffer and report the number of bytes sitting there waiting to be read. Call it before you read, and pass the number from bytes at port to the read function. Search the LV examples for serial port and you will see how bytes at port is used.
Message Edited by tbob on 10-04-2005 03:51 PM
- tbob
Inventor of the WORM Global
Attachments:
ProducerConsumer.vi 40 KB
Similar Messages
-
How to Use Com ports on oracle forms
Hai,
how we can use com port to communicate to the device like Pole Display(output device) or fixed scaneer (input device) having serial port(Input device) in oracle forms.
Thanks & regardsFor web forms you will probably need to create a PJC and/or use webutil and make calls to the device's API.
-
How to connect com ports in forms 6i
hi im creating a POS in Kuwait but i dunno how to connect the com port in forms 6i if any one know plz tell me
Hi,
.odb is openoffice.org database file or open source database file. Anybody has any knowledge on how to use Form 6i with this database file.. -
How to find COM port for a specific USB device
I want to automatically find the COM port for a specific USB device. I use the VISA find resource function but I can't get the manufacturer's ID. VISA says the device doesn't have this information. The find resource function does narrow my search (and often finds the port depending on what other usb devices are connected). In the case where it finds multiple possible ports, can I safely send a message to each port to determine if it is the correct device? I know it will work for my purposes but I don't know if I am asking for trouble by sending messages to unidentified devices. Any thoughts on how I can identify my device port will be appreciated. Thank you - Dave F
You can do it using WMI. I have C# code I am supposed to convert into LabVIEW foing something similar to what you want to do. In my case, I am testing a USB device and need to know which port on the hub is which COM port (the device creates a virtual COM port for communication). Using WMI, you can find the hardware path to the device and know that COM10 is USB hub Port 1 for example. Unfortunately, I cannot share the C# code.
You can download the WMI Code Creator tool from Microsoft, which should help you tremendously find the proper method of getting your info.
You basically want to look at all the W32_USB devices for the specific device you are looking for. Once you have that, you can look for the COM Port associated with it. I don't know when I will get to coding this up in LabVIEW, but will report back when I do, assuming you haven't found the solution by then. -
Reading COM port I/O comma delimated data
Let me start by stating I am completely new to LabView. I am using it for an Engineering Design Course in college in order to collect and analize data being sent from a Silicon Laboratories C8051 Micro-Controller. I am currently using a hyperterminal to see the data that the Micro-Controller is sending. Currently I am just using a printf() statement in the micro-controllers code. The settings at the moment are:
Baud Rate - 57600, Data Bits - 8, Parity - None, Stop Bits - 1, Flow Control - 1. So specifically I would like to take this data and just archive it so I can then later plot it. The data coming in is just intergers in comma delimated form. I went to a breif LabView tutorial and the person told me how to use the VISA i/o functions but I didn't have LabView 7.1 until now. Any help on how to set up the COM port and display the data right now like a hyperterminal would be greatly appreciated.
ThanksIn the NI Example Finder I went to Hardware I/O -> Serial -> Basic Serial Write and Read.vi and I get an error message over and over and the pop up box says:
"Error -1073807202 occurred at Property Node in VISA Configure Serial Port (Instr).vi->Basic Serial Write and Read.vi
This Error code is undefined, No one has provided a description for this code, or you might have wired a number that is not an error code to the code input."
I tried changing the VISA setup options and at one point instead of 8 instances of the error I got it down to 4 but that was one time only. Does anyone know what this error is talking about? -
How to read serial port only when new data has been sent to it
I've written this very simple vi to read the serial port whenever the MKS Helium Detector sends a new value. The timing of new data is controlled directly from the front panel of the MKS instrument. I thought it was as simple as looking at the "bytes at port", and reading the port only if the value is not zero. The problem I'm having is that the read function is occuring whether I want it to or not. Consequently, the "Scan from String" function is returning an error (0) once in a while, because it's reading the serial port as it's being updated (I think). Apparently, when the port is in the process of being updated, it is not zero. Anyway, I'm assuming there is a simple fix, but I'm having no luck finding the Easter egg. Any help would be, as always, very much appreciated.
Attachments:
MKSRead.vi 55 KBYou can approach your problem in a couple of ways. The way you've got it written now, as soon as the number of bytes is non-zero, you read and convert. This means that when a partial string is there, you conversion is nor correct. One way is to wait until non-zero bytes like you do now, and then in another loop, read until the byte count is equal to zero and then do the conversion. You can also read until the cr\lf is detected and then do the conversion on the string. You can also enable the termination character for the read but then you'll have to increase the number of bytes to read to something other than just the number of bytes first available. If the instrument always returns the same number of bytes, you can use that as a constant for the VISA Read. Then the read will terminate whenever the byte count OR the termination character is detected.
I modified your VI to show you how you might put it in a loop and what for the CR/LF to be detected. You would want to add a timeout to this so that if the character does not show up, the loop will not run infinitely
Attachments:
MKSRead_mod.vi 68 KB -
"how to read serial port using labview 6.0"
sir i am doing a project and is in a need to extract data from serial port. can anyone help me
This link, and the links from it, are a great place to start:
http://zone.ni.com/devzone/conceptd.nsf/webmain/8DECBF3E0B714BF3862568F9006E7851?opendocument
2006 Ultimate LabVIEW G-eek. -
How to read binary file in developer 2000
Hi,
Is there any method through which i can read a binary file(pdf)
in developer 2000
Thanks in advanceHello,
Basically you can do it by saving the data in a file in MATLAB and reading it directly from LabVIEW, or vice versa. In MATLAB , the command "save" allows you to save the data in binary format (*.mat) or ASCII format. You also have an option of saving it in ASCII format using a tab delimiter between data points.
There is a knowledge base which talks in detail about how to share data in between labview and matlab Import data from labview to Matlab and vice versa.
Hope this helps. If not, please feel free to ask more questions.
Good luck and have a great day!
Koninika
National Instruments -
How to read serial port and substring
I am new for labview .I send data from microcontroller with C languange every 1 minute this codeprintf("T%3.2f,H%3.2f",fTemp_true,fRh_true);
And I read data with Hyperterminal it show this T29.11,H67.88 I want to show 29.11 and 67.88 only and stroe in database. I study connect serial port in example and I have a question. If I use this code.Can I auto read every 1 minute or this code can read 1 time only and I have to click every 1 minute.How to auto read when I send data to serial port with microcontroller every 1 minute. And I cannot substring 29.11 and 67.88 because %3.2f can show T29.11,H67.88 or T129.11,H100 . and How can I simple send data to database. Thank you .No, you don't have to click run every minute. You just need to place a while loop around the VISA Read. You could use Wait (ms) but it would be better to use something like the Elapsed Time function and wire the time has elapsed output to a case statement with the VISA Read inside the true case.
This is one way to parse the string:
If you have the database connectivity toolkit, you can easily write to a database. There is also something called LabSQL.
Message Edited by Dennis Knutson on 01-22-2010 01:42 PM
Attachments:
Parse String.png 16 KB -
"how to read parallel port using labview"
"i am doing a bio medical project and need to read data from parallel port using labview. can anyone help me"
Hi
in most cases a simple example helps best.......see attachment. Find in addition in Word document a helpful picture of LPT - Pins.
In case you work with WinNT, W2k, XP - you need to install accesshw.
Regards
Werner
Attachments:
printer_port_test.zip 41 KB
dsub_25_parallel_port.doc 29 KB -
Reading from COM port, in forms 6i.
Hi All,
Can anybody help me how to read COM port, capture from comport in forms 6i, we have weigh bridge system and they have supplies MS access bases application, i would like to use forms based own application instead that.
please anybody help me..
thanks in advance[http://www.java2s.com/Code/Java/Development-Class/COM-Port.htm]
-
Hi all,
maybe not entirely sure if this is a labview question, but i was using labview when it happened. I am using labview to open and run a batch file using a COM connection and an FTDI RS232 to USB. Now i believe that portion of the code runs smoothly, ive tested it out and it worked at one point. After using an instr property node to check if port is open, which i now know cant be used on non ni devices anyways, it will not open to run the batch file. I have run it from command prompt and i get a communcation port cant be open error. Now i moved one of these devices from COM16 to COM2 and it works perfectly now, but the other one wont work at all and why should i have to change port numbers? any tips or troubleshooting advice?Just in case anyone out there runs into the same problem, i followed this link here, uninstalled all com ports, then reinstalled com ports and is now functioning properly. But it seems that my port 18 which was not working before is still not working.
http://theitbros.com/how-to-delete-com-ports-in-use/ -
I need to connect a PDA Fijitsu Siemens Pocket Loox to the PC using the Bluetooth. I have successfully installed software for the dongle on the PC side BUT there is a problem to connect PDA to the PC using Bluettoth Serial Port. PDA Bluetooth software (Pocket PlugFree) is ALLWAYS using COM5 but this port on the PC is not available because it's occupied by Bluetooth Fax Modem installed from the dongle installation package. If I disable the modem then COM5 is still not available (niether COM6 and COM7, which are also blocked for Bluetooth Modem and Bluetooth Null Modem and also can't be reconfigured). Please, don't you know how to reconfigure COM ports for the dongle?
I use Windows XP on the PC. Both devices can communicate to each other and files can be transfered with no problem.
LeonHi
I had the same problem with my T61 and my HTC Touch Diamond, and found the help I needed here: http://lopsa.org/node/788
It did not work the first time, I had to do I a couple of times, but it finally worked out.
Hope you get your problem solved.
Best regards
John Klit
Message Edited by JohnKlit on 09-03-2008 06:24 AM -
Hi!
I have USB port in my test jig. So first i want to scan my usb port and it also reads com port number.
what happened, if i connected my test jig with one PC than USB port (COM 4) and some other PC it gives (COM3) through device manager. so every time i have to look device manager and look which port is connected with USB and i have to change port number in program.
so i want to scan usb port and read which com port is connected to USB
thanksHi swami,
I think there is no way to distinguish between native COM-ports and virtual serial RS232-devices via USB. If you use the VISA VIs to control your serial interfaces, use "VISA Find Ressource" to list the available serial interfaces. As an example you can use it as follows:
Greets, Dave
Message Edited by daveTW on 01-24-2007 09:44 PM
Greets, Dave
Attachments:
Example_BD.png 2 KB -
How can i read an COM port ???
Hi,
somebody knows how can i read an COM port from Forms 4.5 ?
Thanks in advance.
PatricioHi Patricio
have U got any solutions?? Im also trying to send message to display panel from forms 5.
If You got any please let me know itll help me a lot
Thanx
Suraj
Maybe you are looking for
-
I'm managing several devices from my itunes account. If I delete a song from my iphone, will it also be deleted from other family member's devices as well as in itunes?
-
Transaction PFTC_CHG - standard task
Hi All, in work item text i have given Nessie Performance : Approval Payment : &_WI_OBJECT_ID.WORKITEMTEXT& and in discription i have given So please analyse this payment batch number: &_WI_OBJECT_ID.WORKITEMTEXT& and select one of the following opti
-
Which would be the better approach?
Hello! I'm a working java professional, but has taken on some courses on the local University. Of course there is a difference in how things are solved in theory and practise, but it makes me wonder what the "best" solutions to some problems are... C
-
I can't purchased anything from the App store..... HELP ME
I can't purchased anything from the App store, it keeps telling that there is a problem with the previous purchased and when I tried to re-enter the information , this message keep showing " your payment method was declined please use valid method" e
-
Error in editing object..
hi, i created a data element. after sometime in se80 when i tried to edit it, i get an error message saying " system settings does not allow changes to be made to the object" ..why ? whats the solution ? thks