Coldfusion to serial port
Hi
I have a flash application that uses coldfusion to interact
with a database.
Im trying to get the same application to either commniicate
with the serial port via Actionscript or Coldfusion.
Is either possible?
For ColdFusion running on Windows, to talk to the
server
serial port, maybe something like <CFEXECUTE
NAME="mySerialTalker.bat"> would work. Check out
http://livedocs.adobe.com/coldfusion/6/CFML_Reference/Tags-pt126.htm.
Similar Messages
-
Hi
I have a flash application that uses coldfusion to interact
with a database.
Im trying to get the same application to either commniicate
with the serial port via Actionscript or Coldfusion.
I need to send data packets to an active x controller.
Is either possible?well i found this site while searching:
http://people.interaction-ivrea.it/h.barragan/flashserialinterface.html
. this looks like it might be a solution. just have to figure it
out now. -
Unable to capture data from Serial port using LVRT2010 in single core pentium 4 machine
I am using application written in Labview using windows Labview
Runtime environment 2010. Application creates a tunnel to intercept data from
Serial port.
My problem is, Currently, I am using single core Pentium
processor. When I am trying to intercept the data between COM1 and COM7 (COM 7
is a virtual port) it is not able to capture data.
When I am running Labview RT environment using dual core
processor machine it is running normally. I wonder whether it could be the compatibility issues with
single core Pentium processor.Hi Magnetica
Are both of the machines running the same runtime engine,
drivers ect?
Have you had RT applications running on this
machine before?
Is the development computer a 64bit machine?
The processor is a supported model (See link below).
http://zone.ni.com/devzone/cda/tut/p/id/8239
Regards
Robert
National Instruments UK & Ireland -
Problem on WinXP / Labview 6.1 with VISA (serial port)
There is a problem on WinXP / Labview 6.1 with VISA which i use to poll the state lines of the serial port. The only functions that i use are "VISA Open", "Find Resource", line state properties and "VISA close".
On my own machine (WinME) it works fine as a standalone application (with runtime engine in the same direction), even if i rename the Labview directory so that Labview is not found.
From my VXIpnp directory i deleted all but these files:
directory "Win95",
subdirectory "Bin" containing "NiViAsrl.dll",
subdirectory "NIvisa" containing "visaconf.dll".
When shipping this to WinXP (and copying "VXIpnp" to the root directory), the serial port was not found, so i renamed the direction "Win95" to "
WinNT", but this did not work also.
I installed the VISA server, although it seems not to be required -- no result.
Final question:
What must i do for distributing the program as a standalone application for all windows platforms?Hey Joachim,
In order to create an installer that includes the VISA Run-time engine for serial IO you will have to purchase LabVIEW 7.x. See screen shot. This packages a small compact version of the run-time that can only be used for serial, but it takes up much less space. The installer that I created has my application, the LV Run-time, and the VISA run-time and it is about 26 MB.
That is much smaller than if I had to include the 32 MB LV 7.1 run-time and the 14 MB VISA run-time separately. It would have been even smaller if I would have uncheck some of the items that I wasn't using.
-Josh
Attachments:
advanced.JPG 31 KB -
Using a PS/2 keyboard on a Sparc workstation through the serial port
We have recently migrated an application that used to run on a PC, to now run on a Sparc Workstation. This is a SunBlade 1500, running Solaris 8. The application is running in a dedicated console which has a fitted keyboard and trackerball that have PS/2 connectors and cannot be changed.
We need a way of connecting the PS/2 keyboards to the serial ports of the Sparc workstation. We already have a piece of software that will read ascii values from the serial port so we definately want to go through the serial ports.
Can someone please suggest what converters will be required to get the output of the keyboard and trackerball as ascii input to the serial port.Actually, that's not a bit perverse, at all.
Jonathan's suggestion is a standard method of connecting to a server.
(null cable between the computer serial ports)
... see the Solaris man pages.
man tip
TeraTerm and Hyperterminal are customarily used on a PC running some dialect of Windows.
The 'tip' command is all that's necessary between Solaris systems.
PS/2 is not a serial connection, but is a keyboard/mouse interface 'invented' by IBM when they offered their XT-class PS/2 line of desktop systems, back in the 1980's.
I found this next link by using Google:
http://members.chello.at/theodor.lauppert/computer/ps2/
The smaller DIN ports were more compact than the AT-class keyboard ports and the mouse moved from a serial port to a dedicated mouse port.
Serial communication devices are not keyboards, per se,
and keyboards are not serial communication devices.
You need other hardware in between to translate what the human being sends, and another computer is a common method to accomplish that translation.
Having said all that ...
Since you cannot change the dedicated console hardware,
I suggest you go to the manufacturer of that console equipment
and have them suggest some sort of serial-to-serial interface lash-up. -
Using a serial port under j9.. How?
I am trying out j9 on an ipaq. I am trying to get javax.comm to work.
When I call CommPortIdentifier.getIdentifiers ();
I get java.lang.string.NoSuchMethodError: java/lang/String.<init>([BIII)V
It would appear that the javax.comm package was implemented using a now deprecated String method, and that IBM has chosen not to implement deprecated methods in it's j9 vm (I get the same issue trying to run swing.)
One would think that what is needed is an updated javax.comm package. However, there doesn't appear to be a javax.comm package on Sun's site, let alone an updated one. Whats going on here? Can someone give me an idea of how Sun and/or the JCP thinks about developers who want to use serial ports?
Is there a workaround? A different way of talking to a serial port? Or should I abandon j9? I should add that I got my software running just fine on nsi.com's creme vm (javax.comm and swing too) and it worked without any hassles. It even understands jar files (is there a reason why IBM insists on having a link file?). However, the reason I persevered was that a) j9 is cheaper and more importantly b) nsi.com don't seem terribly keen on actually selling their product. I have lots of references to them selling their vm in bundles of 40 ($1000) which is a bit ouchy but hey I'm not paying for it. But, you'd think the nsi.com people would actually confirm this on their site?
So.. can it be done? And why, in the world of embedded systems (my field) and now lots of phones and pdas, is so little attention given to the humble serial port? It doesn't matter how fancy the protocol is, underneath it all is a UART. grumble
-RusselHi Russel,
I will probably soon be in the position you are in trying to get this to work. I found the following page which offers some promise.
http://www.intrinsyc.com/support/I-Linux/405-cube/misc/smf_serial_port_access_example.htm
Mike -
I have problem with delay in serial port
I have problem with serial port. I have connected two computers by serial port and I need to create program in Labview for transfer strings using start bits and stop bits. My problem is that my program is working quite well ...when I press start bit it starts to concatenate strings and if i press stop bits it stops...this is the purpose of this program...but problem is that it working only with delay...and need that this program dont need delay, because it can only concatenating data depends on delay from start bit....I wana solved problem with delay...I dont want using delay process in my program, but allways when I try to delete this delay it stop works correct
here is my programOk this should be simple - if I understand you correctly.
You have the VISA session initialized with read termination character enabled. So reading the number of bytes at port is NOT the correct way to read from the port. Set the read number of bytes to something large (say 4096) and the read will return as soon as a termination character is received (or timeout).
You'll need to make sure the sending device is configured to send termination character on writes (you can set that with a VISA property node) and that you are sending the correct termination character. The default is 0x0A (newline).
Jeff -
Open and configure serial port
Hi,
when i use the function configured serial port, i can work with it.
for which case i need the function open port. do i need both an in which order?
thanks florianHi florian
check the help examples
Attached png file shows the example.
chow
xseadog
Attachments:
serial.PNG 39 KB -
How do I process serial port strings as bits
In response to my commands, my instrument is sending bytes to my serial
port. In one instance, 2 bytes are received. I want to treat these 2 bytes
as a group of 16 bits.
The VISA and Compatibility Serial functions return these bytes from the
serial port to Labview clearly labelled a "string".
Everything I can find in the way of Labview functions and .vis don't want to
do bit twiddling, bit swapping, and bit dropping, with "string" data.
I thought "hex string to number" could be used here, but I can't find a way.
The 2 Bytes in question can be represented as hex, but the data are not the
ASCII codes for the hex representation of a binary number, they are the
binary number. This "hex string to number" seems to want ASCII c
odes.
You can feed a hex number typed into a "control" box wired into "hex string
to number" and you get a meaningful number. You can feed the 2 bytes from
the serial port into an "indicator" set to read in hex and you get a hex
number that is a correct representation. But that is Labview handing them
around to itself. I need to get my "hands" on them.
I can't feed those same bytes that show up as a correct hex representation
in an indicator into the "hex string to number" or anything else, so far,
and get a number that is useful for further processing.
I thought "variant to data", but I can't find enough reference material to
understand how to use it. A boolean array seems like a bit of a weird
approach, so I thought I'd ask before I looked into that.
I'm used to dealing directly with binary numbers on the processor stack, I
call them whatever I want, and turn them into anything I feel like.
I'm sure I'm staring the solution in the face, but I can't find any way to
persuade
Labview to treat this "string" data as 16 bits.
I've got the 16 bits, which is better than not having them, but I don't have
much hair left.duh, well I finally discovered the "Unflatten from String" function. A guy
just feeds in the bytes he's collected from his serial port that Labview
thinks are a "string", and out come lovely little unsigned 16 bit numbers,
or whatever other type of number he wants to turn the bytes into. And there
are great little bit twiddlers available after that, like "swap bytes", and
you can mask out bits with the logic operators, why this is fun. There's
nothing like being a moron...... fly me to the moon...................
"David Lewis" wrote in message
news:[email protected]..
> The two bytes would come from a serial port read.vi in Labview, classed as
a
> string. For instance, D3 and 02. The output wou
ld swap the two bytes,
i.e.
> to 02 and D3, consider the two swapped bytes as 16 bits, drop the six most
> significant bits, and output the ten bits that are left as an integer
> classed by Labview as some kind of number, not a string.
>
> Your example StringToBits_Converter.vi I found on the ni.com site
> unfortunately gives an error message and refuses to open on my system
saying
> it comes from a newer version of Labview 6 than I am running. Mine says
> 6.0.1b3. Thank you very much anyway.
>
> "FightOnSCTrojan" wrote in message
> news:[email protected]..
> > In another words, you want to create a VI in which the input is 2
> > strings (i.e. AB) and the output is the converted array bits (e.g.
> > 1010101010101010)?
>
> -
KM2M serial port not working in Linux
I noticed a few Linux postings so I thought I'd give this a shot. I'm running Fedora Core and for some strange reason I can't seem to send any communications out to the ttyS0 (COM 1) or ttyS1 (COM 2) ports.
Does anyone have any suggestions on making it work?
Thank you.No, your code had no termination characters at all - automatic or not. The enable termination character for the VISA Configure Serial Port is only for reads. Just like the help explains.
And while you should check the download page for updates, LabVIEW comes with the 34401 driver.
Message Edited by Dennis Knutson on 12-19-2009 05:49 PM -
Problem in using serial port.
I am using serial port to get data from a fusion splicer. The number of bytes at the port is 4096 but the read buffer of VISA read is empty. I am reading the same number of bytes. Can any one tell me what is the maximum size of VISA Read buffer? I am trying to put the contents of the buffer in a file. I am using labVIEW 6.1 on linux.I am also attaching the VI.
I also noticed this problem...If I read the number of bytes in the serial buffer many times, sometimes it reads it as 0 and I have to keep trying until it reads this 4096 bytes.
Thanx for any help.
S.Vijayalakshmi
Attachments:
serail_comm.vi 52 KBHey Viji,
In your application it looks like you are just checking to see how many bytes are at the serial port. Is it possible that your application is check for the serial data at the port before the data actually gets there. If you are looping this code as a subVI or just running it over and over it is possible that one of the iterations could occur faster than your device can write the information to the bus. In this instance you are checking the number of bytes at the port and there might not be any there yet. In this case the port reads 0 as you have designed it.
If you want the read function to wait and always read 4096 then don't wire the bytes at port to the read function. Just wire a constant/control equal to 4096 to the read function instead o
f the bytes at port. In this case, if there are not any bytes at the port the read function will wait for the bytes to show up or until the timeout period is reached.
I would also, suggest lowering your time to something more reasonable, because if your instrument quits transmitting your application is going to wait for 33 minutes. That is a long time for a program to hang.
I hope this helps out.
JoshuaP
National Instruments -
I am working on a wireless vital sign monitor. I have 3 signals; heart rate and temperature. I filter and amplify the signals before converting them into digital form. I then pass them via MAX232 before passing them to RS232 serial cable.
I am therefore working on a program to receive the combined signal and separate them.
I have come across serial read and write examples on ni.com but am looking for one where I can actually separate combined signals and display them separately.Reading the serial port will give you a string. How you divide the channels depends on how the data was formatted before it was sent over the serial channel.
If you are designing the instrument, as it seems from your query, then you can set up any form you wish. If your data is always floating point numeric, you could use space or tab characters to separate data words. You could use and XML format. If the instrument is provided by a vendor, contact them for the protocol.
If tabs are used between words and returns between sets of readings, the resutlant string can be interpretted by the Spreadsheet String to Array function in LV.
Things to avoid are characters often used by serial communications systems as control characters. Carraige returns are
often used as command terminators by serial protocols, but may also be used by the port.
Lynn -
Help with reading information coming from a software into LabVIEW through Serial port
Hi,
I am new to LabVIEW and also an amateur in using RS232 for communication. I have this software that has these icons like speed increase/decrease, elevation up/down, start/stop. Now, when I click these buttons on the software, they perform the appropriate functions. For example, if I press start button, the signal must go through a serial COM port into LabVIEW to start the machine. How do I do that? How do I find what format the code word is when I press a button on the software? And how to decode the information to read whether the button pushed is start etc...? Any help would be appreciated.
V
I may not be perfect, but I'm all I got!That information would be in the programming manual for the device you're controlling. Unless you have a device that has no documentation or you cannot get the documentation that's the first place you should look. If you cannot get the documentation at all then you've got some reverse-engineering to do. To do this you will either need a serial port sniffer (a hardware device), or you can try to use a software-based port capturing program. On Windows PortMon is the most prevalent. This will show you how the port was configured (baud rate, stop bits, etc). Warning: the information is technical.
As far as how to get it running in LabVIEW, you should take a look at the serial port communication examples that ship with LabVIEW. The most problems occur in figuring out how to (a) terminate a write command, and (b) determining when to stop reading. For (a) this is typically done by appending a carriage return or linefeed to the command. This is device dependent. For (b) this is usually done by the byte stream ending with a character like a linefeed. Again, this is device-dependent.
You may also want to peruse this KB article: Serial Instrument Control Tutorial. There are also lots of tutorial on the internet for basic tutorials on serial port communication. -
How to get data from serial port to GUI textArea
From Serial Port.....
Messages from base (always 5 bytes):
0xAA, 0, 0, 0, 0xBB - IDLE Mode
0xAA, 0, 0x80, 0x80, 0xBB - Question Mode
messages from terminal (always 6 bytes):
0xAA, a, b, c, chksum, 0xBB
where chksum = a+b+c;
a = address (0-250)
the 2 MSB's of b represenet the answer:
0 0 - A
0 1 - B
1 0 - C
1 1 - D
the 6LSB's of b and 8bits of c is the time for answer, in milliseconds.
(0-16384 milliseconds)
I have VB Code for that but I want the same thing in Java ...
Can any one help me?
Here's VB Code..
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "Aakar GUI"
ClientHeight = 4665
ClientLeft = 60
ClientTop = 375
ClientWidth = 6105
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 311
ScaleMode = 3 'Pixel
ScaleWidth = 407
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton cmdPort
Caption = "Open Port"
Height = 375
Left = 120
TabIndex = 4
Top = 600
Width = 1455
End
Begin VB.ComboBox cmbPort
Height = 315
ItemData = "Form1.frx":0000
Left = 120
List = "Form1.frx":0016
Style = 2 'Dropdown List
TabIndex = 3
Top = 120
Width = 2895
End
Begin VB.CommandButton cmdEnd
Caption = "End"
Height = 495
Left = 1560
TabIndex = 2
Top = 1320
Width = 1215
End
Begin VB.CommandButton cmdStart
Caption = "Start"
Height = 495
Left = 120
TabIndex = 1
Top = 1320
Width = 1215
End
Begin VB.TextBox txtMessage
Height = 2040
Left = 119
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 0
Top = 2475
Width = 5848
End
Begin VB.Timer tmrRead
Enabled = 0 'False
Interval = 1
Left = 2040
Top = 600
End
Begin MSCommLib.MSComm MSComm1
Left = 3120
Top = 360
_ExtentX = 1164
_ExtentY = 1164
_Version = 393216
DTREnable = 0 'False
ParityReplace = 45
SThreshold = 1
End
Begin VB.Label Label5
Caption = "Result Data:"
Height = 375
Left = 120
TabIndex = 5
Top = 2115
Width = 1320
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim PortIsOpen As Boolean
Dim Answers(4) As String
Dim RejectKeystroke As Boolean
Private Sub cmbPort_Change()
Debug.Print cmbPort.ListIndex
End Sub
Private Sub cmbPort_Validate(Cancel As Boolean)
'Cancel = True
End Sub
Private Sub cmdEnd_Click()
MSComm1.Output = "e"
txtMessage.Text = ""
End Sub
Private Sub cmdPort_Click()
On Error GoTo ErrorHandler
If cmbPort.ListIndex < 0 Then Exit Sub
If PortIsOpen Then
cmbPort.Enabled = True
MSComm1.PortOpen = False
PortIsOpen = False
cmdPort.Caption = "Open Port"
cmdStart.Enabled = False
cmdEnd.Enabled = False
Else
MSComm1.CommPort = cmbPort.ListIndex + 1
cmbPort.Enabled = False
MSComm1.PortOpen = True
PortIsOpen = True
cmdPort.Caption = "Close Port"
cmdStart.Enabled = True
cmdEnd.Enabled = True
End If
Exit Sub
ErrorHandler:
Debug.Print Err.Number
Debug.Print Err.Description
MsgBox Err.Description, vbExclamation Or vbOKOnly, "Error opening port"
cmbPort.Enabled = True
PortIsOpen = False
cmdPort.Caption = "Open Port"
cmdStart.Enabled = False
cmdEnd.Enabled = False
End Sub
Private Sub cmdStart_Click()
MSComm1.Output = "s"
txtMessage.Text = ""
End Sub
Private Sub Form_Initialize()
Dim tmp As Variant
tmp = InitCommonControls
End Sub
Private Sub Form_Load()
Answers(0) = "A"
Answers(1) = "B"
Answers(2) = "C"
Answers(3) = "D"
'MSComm1.Settings = "9600,n,8,1"
''MSComm1.Settings = "115200,n,8,1"
'MSComm1.PortOpen = True
On Error GoTo ErrorHandler1
MSComm1.CommPort = 1 ' comm port 1
MSComm1.RThreshold = 1 ' use 'on comm' event processing
MSComm1.Settings = "9600,n,8,1" ' baud, parity, data bits, stop bits
MSComm1.SThreshold = 1 ' allows us to track Tx LED
MSComm1.InputMode = comInputModeText 'comInputModeBinary ' binary mode, you can also use
' comInputModeText for text only use
PortIsOpen = False
cmbPort.ListIndex = 0
' open the port
MSComm1.PortOpen = True
cmbPort.Enabled = False
PortIsOpen = True
cmdPort.Caption = "Close Port"
cmdStart.Enabled = True
cmdEnd.Enabled = True
Exit Sub
ErrorHandler1:
Debug.Print Err.Description
PortIsOpen = False
cmbPort.Enabled = True
cmdPort.Caption = "Open Port"
cmdStart.Enabled = False
cmdEnd.Enabled = False
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If MSComm1.PortOpen Then MSComm1.PortOpen = False
End Sub
Private Sub lblOption_Click()
End Sub
Private Sub MSComm1_OnComm()
' Synopsis: Handle incoming characters, 'On Comm' Event
' Description: By setting MSComm1.RThreshold = 1, this event will fire for
' each character that arrives in the comm controls input buffer.
' Set MSComm1.RThreshold = 0 if you want to poll the control
' yourself, either via a TImer or within program execution loop.
' In most cases, OnComm Event processing shown here is the prefered
' method of processing incoming characters.
Dim i As Long
Dim sBuff As String ' buffer for holding incoming characters
Const MTC As String = vbCrLf ' message terminator characters (ususally vbCrLf)
Const LenMTC As Long = 2 ' number of terminator characters, must match MTC
Dim iPtr As Long ' pointer to terminatior character
' OnComm fires for multiple Events
' so get the Event ID & process
Select Case MSComm1.CommEvent
' Received RThreshold # of chars, in our case 1.
Case comEvReceive
' read all of the characters from the input buffer
' StrConv() is required when using MSComm in binary mode,
' if you set MSComm1.InputMode = comInputModeText, it's not required
'sBuff = sBuff & StrConv(MSComm1.Input, vbUnicode)
'If Len(txtMessage.Text) > 4096 Then txtMessage.Text = ""
sBuff = MSComm1.Input
Dim ch As String
Dim PacketStart As Boolean
Dim PacketLength As Integer
Dim Packet() As String
PacketStart = False
PacketLength = 0
While (Len(sBuff) > 0)
ch = Left(sBuff, 1)
If (ch = Chr(&HAA)) Then PacketStart = True
If (ch = Chr(&HBB)) Then PacketStart = False
If (ch <> Chr(&HAA) And ch <> Chr(&HBB)) Then
PacketLength = PacketLength + 1
ReDim Preserve Packet(PacketLength)
Packet(PacketLength) = ch
End If
'txtMessage.Text = txtMessage.Text + Format(Hex(Asc(ch)), " @@")
sBuff = Right(sBuff, Len(sBuff) - 1)
Wend
If (PacketLength = 3) Then
Debug.Print "Command packet recieved"
'txtMessage.Text = txtMessage.Text + vbCrLf + "Address =" + Str(Asc(Packet(1)))
'txtMessage.Text = txtMessage.Text + vbCrLf + "Address =" + Str(Asc(Packet(2)))
End If
If (PacketLength = 4) Then
Debug.Print "Response packet recieved"
txtMessage.Text = txtMessage.Text + "Address =" + Str(Asc(Packet(1))) + _
" Answer = " + Answers((Asc(Packet(2)) And &HC0) / 64) + _
" Time =" + Str((Asc(Packet(2)) And &H3F) * 256 + (Asc(Packet(3)))) + "mS" + vbCrLf
'txtMessage.Text = txtMessage.Text + vbCrLf + "Address =" + Str(Asc(Packet(1)))
'txtMessage.Text = txtMessage.Text + vbCrLf + "Option =" + Str((Asc(Packet(2)) And &HC0) / 64)
'txtMessage.Text = txtMessage.Text + vbCrLf + "Time =" + Str((Asc(Packet(2)) And &H3F) * 256 + (Asc(Packet(3))))
End If
If (PacketLength <> 4 And PacketLength <> 3) Then Debug.Print "Unknown packet of length" + Str(PacketLength) + " recieved"
txtMessage.Text = txtMessage.Text + vbCrLf
' An EOF charater was found in the input stream
Case comEvEOF
DoEvents
' There are SThreshold number of characters in the transmit buffer.
Case comEvSend
DoEvents
' A Break was received.
Case comEventBreak
DoEvents
' Framing Error
Case comEventFrame
DoEvents
' Data Lost.
Case comEventOverrun
DoEvents
' Receive buffer overflow.
Case comEventRxOver
DoEvents
' Parity Error.
Case comEventRxParity
DoEvents
' Transmit buffer full.
Case comEventTxFull
' Unexpected error retrieving DCB]
Case comEventDCB
DoEvents
End Select
End Sub
Private Sub tmrRead_Timer()
'MSComm1.Output = vbCrLf + vbCrLf
'MSComm1.Output = Chr(128)
End Sub
Private Sub txtMessage_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = 2 Or Shift = 4 Then RejectKeystroke = False Else RejectKeystroke = True
End Sub
Private Sub txtMessage_KeyPress(KeyAscii As Integer)
If RejectKeystroke Then
KeyAscii = 0
End If
End SubThanks in advance..I want to replicate the entire VB program as Java Program.
This has to be included in my project which i am doing in java. -
How to get a signal from the serial port to start a labview program?
I need to synchronize the data obtained from a program (which is not in Labview)with the data collected with Labview on a different computer. I can send some data strings to the serial port of the computer running the Labview program when the other program starts. However, I need to be able to read the trigger in my Labview program. Do you know what I should do? Thanks.
If you don't have any other programs listening on the COM port, you need to let a LV program run BEFORE the signal comes, otherwise you won't be able to read it. You can have the program wait in a slow timed loop so that it doesn't use up too much CPU time, and when the required "trigger" comes, to move into the main part of the program.
You basically need a while loop waiting for a certain string in the serial buffer. Once the string is found the while loop is exited, and the data acqquisition or whatever else you require from the progam can be performed.
In the example attached the program wait for ANY text to be sent to the COM port. Please note that you need to configure the VISA resource before using it. Once there is something at the COM port, the loop will exit and the rest of the program will be executed.
Hope this helps
Shane
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Attachments:
Wait for serisl message.vi 17 KB
Maybe you are looking for
-
Calling Classes From JSP pages
I am importing an application specific class in a JSP page and calling it (Win NT). It compiles the servlet successfully but cannot appear to find the class during execution. I have tried placing the class file / jar fil
-
i have a iphone 3g , how do i upgrade to a better user system still on 4.2 as all others on 6 ....Help
-
Curios text in one of three computers when displaying the very same mail in outlook. I run Outlook 2003 under Windows 8.1.1 in all of my 3 computers. 70% of the mail from the same sender are shown OK in the actual computer and 100% of the very same m
-
iPhone 4 since ios 6 update is shocking,no vibrate on silent yet all settings on to receive!! Constant crashing no sounds on fb notifications yet settings on was proud of my iPhone but now can't trust it when in use,battery life is awful have to char
-
Hi Friends , I'm Looking For the Function Modules Which will do all the functionalities of the TCODE "MBRL". Regards S.Janani