LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sending commands and getting answers

Hi,

     In the given attachment, you have a set of textboxes under checkbox and more down to the tabcontrol. Now, i want communicate with the SMPS(inbetween i have a microcontroller)for getting answers. I dont have any basic idea regarding the task. My instructor gave me a bunch of commands and i have to slect some commands(PM bus) from and used in the application.

       

    Can any one give suggestions about this, Thanks in advance.

0 Kudos
Message 1 of 12
(4,434 Views)

Look at using an event structure. Several shipping examples.

0 Kudos
Message 2 of 12
(4,415 Views)

Yeah, but probably looking for any example ...

0 Kudos
Message 3 of 12
(4,411 Views)

New Event Handler is probably the simplest example.

0 Kudos
Message 4 of 12
(4,402 Views)

i want write multiple comands and i need to display the results on numeric indicators. i had tried with example from http://forums.ni.com/t5/LabVIEW/Multiple-LABVIEW-GPIB-Commanding-alternating-Write-followed-by/td-p/... and i did not make it . let say if i wnat write five commands DD, 8D, 88, 89 and 97, for each command i will get differnet answer and i need to store that in five numeric textboxes. How can i do that. can nay one explaine.

       Thank you in advance.

0 Kudos
Message 5 of 12
(4,330 Views)

If you made an attempt that did not work, post your VI.

Jim

LV 2020
0 Kudos
Message 6 of 12
(4,313 Views)

now, i have taken the sequence structure and tried to implement all the commands appending together but its not working, Because my device will undestand only hex and i think i am sending normal string so far. The thing what i am doing is exactly wrong and for tommorow's metting i need to show some thing. In my case, i need to monitor and control the SMPS. I am using PMBus protocol(i have taken commands from http://pmbus.org/docs/PMBus_Specification_Part_II_Rev_1-1_20070205.pdf and in that you can see commands in last pages) on slave side to get and set the data. in my attched VI the 5 numeric indicators shown down to tab control are monitor stuff i.e those are only read parameters. Right now, i am just sending the command code for tommarows meeting but indeed i need to send a packet structure to get data and set data. My basic doubt is how can implement set of commands everytime to write one by one continously and each command cost a result back which i need to store that in the textboxes(not all only below 5). Other text boxes can read the data as well write to the device drictly from numeric indicators. Dont have any basic idea to do that. Can any one help me.  

0 Kudos
Message 7 of 12
(4,305 Views)

Hi,

 

I am not certain that I understand your task or question.  If you are trying to send each command and read a response, then what you have won't work.  You are writing 4 times, but only reading once.  Also, the stacked sequence is a bad choice most of the time because it hides the code in every frame except the open one.  Look at the attachment and let me know what (if anything) it does to address your question.  The wait error vi is very usefull, but I now use a similar one that I got from OpenG.ORG.  It has many usefull tools.  If you go to jki.net and download the VI Package Manager you can get the OpenG pallette installed in LabVIEW.

Jim

LV 2020
0 Kudos
Message 8 of 12
(4,276 Views)

It's good that you configure and close the Visa port, but you also need to Open it. Does your 3 commands yield 1 result? Yes, you send text, you can either r-click and change visibility to codes and write \16 or you can place a numeric constant of 16 and typecast it to string.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 12
(4,271 Views)

DOH!  I didn't catch the lack of a VISA open.  That will surely not help.

Jim

LV 2020
0 Kudos
Message 10 of 12
(4,263 Views)