LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sending digits throug serial??? please help

Solved!
Go to solution

hey everyone.... i have some trouble...i would like to send from labview through a serial port to 2 small screens like the ones that can show only numbers from 0 to 9. So i have thoes 2 screens and i would like, if i have a knob... and if i turn it to 67 ...it will show 67 there.... please help.... thanks...if you want i can put pictures of this device....

0 Kudos
Message 1 of 38
(3,894 Views)

You can do a lot of things with serial ports.

 

But you have forgotten to include some important information, and that is, how are you communicating with these screens?

 

Do they have a manual that explains the communication protocol for them?

0 Kudos
Message 2 of 38
(3,885 Views)

ok 🙂 here are the pictures i promised...

Download All
0 Kudos
Message 3 of 38
(3,874 Views)

Nice pictures.  But they don't tell anything.

 

What does the manual for this device say about how to communicate with it?  Once you know that, you can look as the Serial Read and Write examples in the Example Finder to figure out how to get LabVIEW to communicate with it.

0 Kudos
Message 4 of 38
(3,871 Views)

Well the thing is that this is made by my teacher :)) he didn't say anything. he only said that you connect it to the computer and it will work. he said i could use an serial to usb adaptor or the socket from my pc, but that's about it. he said if i have a knob in the labview window and he puts it on 15 for example the red unit has to write 15... that's about it. i can ask him this week if you say that that's easier...

0 Kudos
Message 5 of 38
(3,868 Views)

You'll have to ask him since he seems to be the only one who knows how it works.

 

It may be as simple as simple as writing out a 1 and a 5 from the serial port.  But would it it need a termination character?

 

Even then, you still need to know the baud rate, data bits, and stop bits.

0 Kudos
Message 6 of 38
(3,864 Views)

Thats not even a serial port connector. That is a DB25 Male , serial ports on PC's (when they used to have serial ports)  are MALE so you would need a female connector to plug it in. It would fit a printer port though.

 

Alan

0 Kudos
Message 7 of 38
(3,845 Views)

Also count the lines on your first picture. there are 10 of them.  A Serial port only would need a few. TX/RX and ground probably, maybe if it were real fancy and needed flow control RTS/CTS

 

Alan

0 Kudos
Message 8 of 38
(3,842 Views)

Alan is right. That is a parallel port. There is an example that ships with LabVIEW - "Parallel Port Read and Write Loop.vi" Run the vi and click on the top row of LED's to turn the segments of your display on and off. You will have to experiment to find out which bit controls which segment.

 

You need to find the base address which is usually 378 in hex. Go to Control Panel/Device Manager/Ports(COM & LPT). Double click your printer port and click on resources.

 

I don't think that the Port Out.vi works with Windows Vista or 7. If you have XP you should be able to use the example.

 

=====================
LabVIEW 2012


0 Kudos
Message 9 of 38
(3,824 Views)

More. Since there are 10 wires you will not be able to control the two seven segment displays. You have seven wires (one for each segment) and three more. One would be ground leaving two. I am betting that these control which digit is enabled. If you enable both simultaniously then the displays will be identical.

 

What you will have to do is to toggle back and forth so that it looks like they both are on. So to display 42 you would have to enable the digit on the left and display a 4 then enable the one on the right and display a 2. You can experiment with the optimal timing but start with about 50mS.

 

It can get more complicated if your port can not fully illuminate all seven segments. In that case you have to do what I described for each of the segments.

 

Do you have an alarm clock that uses that type of a display? Pick it up and wave it back and forth in the dark and you will see that it does just this. You will see the segments flickering as the clock turns them on and off. It does that to save power.

=====================
LabVIEW 2012


0 Kudos
Message 10 of 38
(3,817 Views)