LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial port programming and protokoll extraction

Hello!

please HELP ME I'm an beginner

I have to progamm a Labview driver for an DMM and have some problems:

I have to configure the serial port as followed
7 data-bits
1 stop-bit
9600 bps
No Parity

Then I have to read 41 "7-bit-byte" and write the lower 4bits (of every
"7-bit-byte" into an array 1x164bit.

Then I have to read the xxx Bit and switch an led on or of;


THANKS for your HELP
0 Kudos
Message 1 of 2
(2,517 Views)
Look at some examples that ship with LabView.
From any LabView window, on the menubar goto Help >> Find Examples >> Search. In the box labeled Type a keyword to find:, enter Serial. After reviewing those examples, go back to Find Examples and Search for array.
The serial examples initialize the serial port using VISA Configure Serial Port. That VI includes options to set the data bits, stop bits, baud rate and parity. To add controls for those missing from the front panel of the example VI, goto the diagram of the example VI, point to the icon for VISA Configure Serial Port (labeled VISA SERIAL with a dip switch), point to the wiring terminal on the icon for the parameter you want (e.g. data bits), right-click and select Create >> Control. You see the t
erminals and their labels if you have the wiring tool selected. You can see context help if you press Ctrl-H.
The array examples show several different ways to build arrays.
There are multiple ways to read one bit, including doing a logical shift of the number to shift the bit to position 0 and then ANDing it with 1, or converting the number to a boolean array and checking the value of the desired array element (the bit number of interest). See the attached LabView 6.1 example.
Message 2 of 2
(2,517 Views)