LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

implementation of analog waveform and comparison

Hello all,
 
i want to do the following operation
 
1.send a serial command to the serial port for starting an operation .This command is a string for the corresponding operation.
 
Depending on the string i have to perform 5 operations .one operation is like this
1.Generate an analog wave using PXI 6251
   This value will be given to microcontroller for converting into digital.After conversion that value will be given back to  6251
2.Check the received digital value and digital value converted from the analog value(ie. the second digital value is the converted value of the analog wave .i need to convert the analog value before giving to the micro controller)
3.if the comparison is OK i want to generate a report and save it
 
I dont know how to do this .If anyone can help me with examples for these operations it will be a great help.
I made a vi from examples for sending the string through serial port.i am attaching that vi.if any errors please correct it
 
i want to do the different tasks depending on the button selected.when a button is pressed the corresponding task sub vi to be executed
 
Expecting  your valuable help
 
Techiess
0 Kudos
Message 1 of 4
(2,650 Views)

What exactly do you need help with? There are shipping examples for DAQmx that you can use to write a waveform. There is also the DAQ Assistant.

The VI you posted has some problems. You placed the VISA Write in the default case so you will be do the write when no buttons are pressed. You would be better off using the event structure instead of polling the buttons. You also do no want to do the VISA Configure Serial Port and VISA Close with every iteration. Do each only once.

0 Kudos
Message 2 of 4
(2,633 Views)

Hi Dennis,

 

Thanks for your help

I want to know whether is it possible to read two strings using the VISA READ vi.If any examples are there it will be  a great help.

Thanks & Regards,

Techiess

0 Kudos
Message 3 of 4
(2,610 Views)
A single VISA Read returns a single string. That string will be the length of what you specify or what is in the recieve buffer you spcify and can of course, be broken up into multiple parts.
0 Kudos
Message 4 of 4
(2,602 Views)