10-10-2005 10:48 AM
10-11-2005 03:21 AM
10-11-2005 07:26 AM
Lul
Thanks for responding, and greetings from the US.
Initially, I tried using the Serial Character Event to do the job because I supected that it would produce an output telling me when a character was available. I could not get it to work and the HELP was too vague to be useful. So, I came up with the idea of using the Bytes At Port property node to tell me when caharacters were in the buffer instead of it intended use, telling the Read VI how mwny characters were in the buffer. It was a "work-around". If, as you say, the Serial Character Event does indicate when a character is available then it is the proper method to use for receiving serial data. It would be exactly the method I would and have used in other programming languages for the last 20+ years. Can you show me a working example of the Serial Character Event method?
Wilber
10-11-2005 08:56 AM
10-11-2005 09:46 AM
Lul
More experienced at Assembly language than C, but you are right about having to get used to thinking LabVIEW. They are very different. It is nice to know that I'm advanced enough in LabVIEW to have come up with the solution of using Bytes at Port as a "status" without any outside help. It must mean that I am thinking more LabVIEW. I really like it, too!. Not only do I have a seat at work, but being a student currently, I purchased the Student edition for myself. I'm using IMAQ for USB and a CCD Web Cam. I plan to use it with my school work. After all these years I'm going for my EE degree.
Thanks for you insight!
Wilber
11-11-2005 03:28 PM
@Lul
i dont agree with you. Using Byte at port means that you are polling the serial interface every N ms. Take a look at:
http://forums.ni.com/ni/board/message?board.id=170&message.id=91386&query.id=118883#M91386
seems that Madri (student) made what wilber was looking for, that's to say an interrupted version at high level. We know that at low level, recent micro manage the serial interface with interrupts, so the assembly code is written in the fashion described by wilber. I made a program that emulate a Modbus slave, so i have to choose a COM port and wait there for bytes to arrive. Do you think that using "byte at port" is performing better than having an interrupt (=wait on notification, VISA wait on char, using queues structures, ecc...) ?? IMHO i dont think so!
11-14-2005 01:44 AM
11-14-2005 01:44 AM