03-11-2011 04:52 AM
Please can any one help me. As i described above, how I can do the thing what is the mistakes in my code..please..
03-11-2011 09:26 AM
You could have a separate value change event for each control and place a VISA Write inside each event. This is what I previously suggested. Otherwise, take all of those strings and build an array. Pass the array to a for loop with a VISA Write inside. This you are already doing in another so it should be familiar territory.
Remember to place your controls inside the event that they are firing. Don't leave them outside.
03-11-2011 09:38 AM
Thanks Dennis, Since from 7 hours no one suggested me though now I am trying something and its almost finished and after that I will post my total VI for your suggestions.:manhappy:
03-11-2011 01:13 PM
Hi,
I had changed my code to some extent though I have some errors which i did not undestnad mainly with Read Visa block and more here.
First problem
---------------------
I want to display available addresses on dropdown list but I think I had taken string dropdownlist. How can I change that to numerical dropdown list. Currently I have error on there.
Second
------------
Why In all cases eroor is related to Visa Read block.
third
-------
In Controlling options event case, I want do make a function that writes user entered data(in controls) into write visa after pressing send button but I have done some thing and I am not sure weather it will work or not. I am not able make clear button for clearing all the the controls as well as indicators (Some one help me in this case)
Fouth
----------
I want make Simple hyperterminal to send commands and viewing replies. In this case also, I had done some thing and hoping it will work. More I had add for loop count in "Monitoring option case" ans is that alwya run continously for six time or it will just run six times and stop after.
Please tell if there is any other mistakes in my code.
03-11-2011 01:22 PM
None of the changes are correct and none of them are what I said to do. NEVER place an event structure inside another event structure. I said to create a separate value change event in the main event structure for each of the controls. I said to place the controls inside the event they fire.
Your code is a huge mess right now and I really don't have the hours it would take to fix it. You are continuing to ask for advice and then doing it your own (wrong) way. Some of the code is nonsensical - like the VISA read to a STring to Byte Array and then to a string. Why? You also have no ability select a specific address which was one of your requirements.
03-11-2011 01:38 PM
None of the changes are correct and none of them are what I said to do. NEVER place an event structure inside another event structure. I said to create a separate value change event in the main event structure for each of the controls. I said to place the controls inside the event they fire.
OH! GOD, I know the point that we can not use event structure inside event structure but If I choose special event case in existing event structure for each control then I need to make every time visa write and read blocks in every case. Is that right?
I made this code before your previous suggestion and the inner event structure is in true case structure.
I really don't know then how I can create send button to send all the entered values in controls for each event case and In every case I need to take write and read visa every time. Please can you tell me how can I do with my perspective.
03-11-2011 02:05 PM
Please Dennis, I have a doubt on every event case that If I delete inner event case and will try to create event case for all controls but In that all cases Should I use write and read visa every time. Is that OK?
03-11-2011 03:14 PM
Now I deleted the inner event structure and creted event case for each control and still i have some errors with read block. I couldn't figure out the errors. can any one help me.
03-12-2011 12:59 PM
In my code, I have event buttons which always rise event when they pressed (whether it ON or OFF) but I want to do like when the button pressed light should glow and respective event should run and light OFF means(next click on the same button) event should off. How can I do that?