Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial data acquisition and pid control

Hello

 

I am trying to develop a code wherein I acquire data through Bafo(USB TO serial converter)..where my DB9 connector would be connected to field side and USB to my PC...the basic serial read/write eg.works fine with Bafo also...Now I want to give the output of serial read .vi to pid.vi as an input (to process variable) ..but the problem is the data type of read buffer is string and that of process variable is 64 bit double...so how can I connect these two?.....One more question is how can I make this system as a closed loop system by giving feedback?...all the videos on websites are of USB data acquisition and pid control ; which are easily understandable but how such closed loop system can be achieved with Bafo?...any suggestion would be highly appreciated.

 

 

 

Best Regards

0 Kudos
Message 1 of 10
(4,385 Views)

What does the returned string look like?  Is it ASCII or hex?

0 Kudos
Message 2 of 10
(4,379 Views)

You also need to explain what is 'Bafo'?

0 Kudos
Message 3 of 10
(4,370 Views)

@Dennis_Knutson wrote:

You also need to explain what is 'Bafo'?


Another cheap no-name Chinese made stuff that people buy in the name of saving money and then complain when it doesn't work for their important projects.

 

0 Kudos
Message 4 of 10
(4,366 Views)

bafo is USB To serial adapter...as we all know today's laptops don't have serial port.....then what if we have to connect it to a serial port on may b other pc or microcontroller kit.....so here comes Bafo.....for more info pls refer to... .http://digital.ni.com/public.nsf/allkb/7EF12ED2863CDB608625701B0019D03D

0 Kudos
Message 5 of 10
(4,361 Views)

Your converter is irrelevant. What really matters is what you have connected at the other end of it. It is what is at the other end that is sending back data in some format (that you have not specified) that matters. If you want a closed loop system, you need a piece of hardware that you can write to in some specific format. If this is the same piece of hardware that you are reading from, you have not specified that either.

0 Kudos
Message 6 of 10
(4,354 Views)

ok..At the other end I have connnected a Zigbee receiver module....which receives data from zigbee transmitter at the field side....this x'mitter is connected to ARM7 microcontroller which actually controls a process..the string (indicator named Read Buffer) I am receving at Serial read.vi says to be a "normal display" when I right click and see the properties of this string ...so its an ASCII  data representation from microcontroller side I suppose.

 

best regards

0 Kudos
Message 7 of 10
(4,342 Views)
I'm not sure why you are asking a question here. You will need to find out from whoever programmed the micro to know the format of data. You haven't even said what the read string actually is. When you are asking about the read format, ask about the type of data you need to write.
0 Kudos
Message 8 of 10
(4,337 Views)

The read string is a temperature of a system and the sring is ASCII.

0 Kudos
Message 9 of 10
(4,335 Views)

Then use either Scan From String or Fract/Exp String to Number.

0 Kudos
Message 10 of 10
(4,323 Views)