09-30-2007 04:50 AM
Power measuring instrument was connected through GPIB port available on power meter to the PC using PCI-GPIB Card. We have modified the sample program scopesimple in Visual Basic as per our requirement. We are using the write command (ilwrt Dev%) & the read command (ilrd Dev%) and the program is working fine. As the data was required at the distance of 10mtrs GPIB-ENET-100 was purchased and installed. Without any modification in the progromm we were able to execute the same program. Further we connected another instrument to the GPIB/ENET-100. We were able to detect the 2nd instrument using Measurement & Automation. How can we modify the same program written in VB to access the 2nd instrument using the write command (ilwrt Dev%) & the read command (ilrd Dev%)?
Following are the setting used for communicating with the instrument:
Const BDINDEX = 0 ' Board Index
Const PRIMARY_ADDR_OF_SCOPE = 1 ' Primary address of device
Const NO_SECONDARY_ADDR = 0 ' Secondary address of device
Const TIMEOUT = T10s ' Timeout value = 10 seconds
Const EOTMODE = 1 ' Enable the END message
Const EOSMODE = 0 ' Disable the EOS mode
10-01-2007 10:54 AM
// These two instruments will be controlled by GPIB0 (ENET #1 in Fig. 4).Let me know if there are further questions about this issue, or you need some clarification of what the example is showing.
mmeter = Open_Device (0, 2, 0, 13, 1, 0);
scope = Open_Device (0, 21, 0, 13, 1, 0);
10-03-2007 08:03 AM
Thanxs for your suggestions, i was able to get the clue and as per
10-04-2007 11:42 AM
char buffer[101]; // Make the buffer 1 char longer than longest expected read.I will look into this further, but let me know about that and I will see if there might be a setting for the GPIB bus we need to take advantage of for larger packet transfers.
01-14-2008 06:39 AM
Thanks for the suggestions
04-17-2008 03:40 AM
Hi
I have function call from VB Appliaction whcih i call ilrd Dev% ,Valuestr,12
Whenever i call this below command get timeout error,
tried giving slepp,timer etc options whcih was available in net ,Any solutions?? mathew.m@nestgroup.net
Regards
Mathew M
+91-9895519102
11-11-2008 04:54 AM
First check the primay and secondary address of the devices using measurement studio and see the numbers matches with address assigned in the program. Also send the copy of ur program let me try to find the bug.