Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending ascii commands through a terminalwindow in Labview

Solved!
Go to solution
Hi Everyone. Can You please help me with my question? I need to send ascii commands activated trough buttons on frontpanel directly to serialport or better trough an existing Terminal window made by some clever Labview persons.I have many commands to send an it is done manually by typing in ascii caracters in terminalwindow and then press enter key.I want to make it more "automaticly" by pressing those "preprogrammed buttons.Can this be done easly.Please advice me with hints and maybe a Vi, ehh? Thanks for this helping Forum.
0 Kudos
Message 1 of 12
(10,006 Views)
Solution
Accepted by Dustyboy

It's very easy with the event structure. You would just have a value change event for each button.

 

If you don't have the event structure, you'll have to poll the Boolean, look for a change, and have a case statement execute based on which button was clicked.

 

Serial Write Event.png

Message 2 of 12
(10,004 Views)
Thank You for Your kind advice.I try to impliment the event case but i can not find the case You name Source(How did You find SOURCE?).Will i have to make a new event structure or can i just add it to an already used Event as an new case.You see i have not so much experience with labview.(beginner)
0 Kudos
Message 3 of 12
(9,997 Views)

The event structure is on the 'Structures' palette. If you don't have it there, it means you have the base version of LabVIEW and cannot create a new event structure. I'm not even sure you can edit it.

 

If you do have the full or pro version of LabVIEW, you would edit the single event structure and have an event for each front panel Boolean (at least that's the simplest way right now).

 

Have you see the free LabVIEW tutorials?

0 Kudos
Message 4 of 12
(9,995 Views)
I Forgot to upload.This is the excellent program(Found on net) i want to impliment the function inside.But i could not find SOURCE anywere.
0 Kudos
Message 5 of 12
(9,993 Views)

 

Ok,i`ll have a look again....... huuuhhh.I just looked for an easy way 🙂

0 Kudos
Message 6 of 12
(9,992 Views)
Thanks for the Link.I`ll have a look at them tomorrow.
0 Kudos
Message 7 of 12
(9,990 Views)
Hi Again, I manage to implement some buttons to send commands directly.Please look if i have undrestood something 🙂 Is there also any way to interupt user before or just after terminal receives caracters on serial port within same program? and next time NOT?  could perhaps be done within a sequenze?
0 Kudos
Message 8 of 12
(9,933 Views)

Hi everyone, i am used to communicate  with  fluke multimeter through labview, i completed communicating with the basic serial read and write Vi and next i used to include to some commands for functioning of multimeter through labview. for example if i need to measure the voltage i used to give command VAC , multimeter switches to voltmeter and then to measure ohms giving OHMS command etc.It works fine in this case.

 

now my problem is to have virtual instrument on PC. for example if i need to read voltage from the multimeter, i have to switch the button ON in  front panel so that it swicthes to voltmeter and the same for ohmmeter. for that i have used case structures for the different commands. but this time that is when i am using case structure multimeter is not responding.

 

can anyone help me out ..i have attached Vi

0 Kudos
Message 9 of 12
(8,901 Views)

duplicate post Don't ask the same question mulitple times.

0 Kudos
Message 10 of 12
(8,895 Views)