LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we send Decimal or Hexadecimal command to NI DAQmx ?

Solved!
Go to solution

Hello,

 

I have one doubt using NI DAQmx.

 

I connected NI DAQmx to the controller of the rotational table system.

 

Now controller of the system has their own command to perform the operation.

 

for example: AD() : get analog input      or  0x300D

                    BG(N) Begin motion        or    0x3020

 

so now I need to send these type of many commands to perform the operation via controller to system.

 

So, can we write this type of command to DAQmx to send to the controller?

 

 

0 Kudos
Message 1 of 5
(3,502 Views)
Solution
Accepted by mi1111

Hi Parth,

 


@mi1111 wrote:

I connected NI DAQmx to the controller of the rotational table system.

Now controller of the system has their own command to perform the operation.

for example: AD() : get analog input      or  0x300D

                    BG(N) Begin motion        or    0x3020


When your controller expects commands like the ones you listed it surely will provide other communication ports than just some analog/digital inputs you could connect with your DAQmx DAQ device!

Most probably you will need to use VISA functions - more/better/reliable information once you provide information like model/vendor of table, link to manual or basically just "which communication bus is used"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(3,484 Views)

i have attached the manual of the connections.

 

Attached file gives you information of the controller which controls air bearing rotation system.

 

What i want to do is i want to send listed commands from LabVIEW via DAQ to the Control to perform the operation.

 

I choose DAQ USB 6343

0 Kudos
Message 3 of 5
(3,462 Views)
Solution
Accepted by mi1111

You are definitely barking up the wrong tree here!

 

On order to send commands to this device like you list you will need to connect the RS-232 or USB connector to your computer. Once you have done that and figured out which serial port COMx your device is using, you can simply use the VISA functions to communicate with your device. The description is from page 10 onwards.

 

But that manual does not detail the actual protocol you need to use to send your own commands to the device. For instance to write to a register as you detail you might need to actually send something like "W 0x300D<CR><LF>" or "AD()<CR><LF>" or anything else the programmer for that device felt fancy for. Without that documentation you can trial and error until the end of the universe to get something working.

 

You will need to contact the manufacturer to get a so called Protocol Description or Programmers Reference Manual for your device. If they can't or don't want to provide that to you you can basically forget to control your device over this interface. Even with that manual, expect a few weeks of trial an error before you get a fairly reliably working driver to use from LabVIEW. Without that information you could easily spend months or years and get nowhere.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 4 of 5
(3,456 Views)

thank you very much for informative answer , it is really helpful to me

0 Kudos
Message 5 of 5
(3,401 Views)