Hi! I am programming in ATEasy and I am trying to communicate with a PicoScope 2205. The open function works, so does the close one, and the led blinking one... But when I try to query the device for its version etc., it does not respond to me! I can't receive any string from the device. Can anyone tell me why? I've implemented it like it says (it's simple thought!):
ATEasy (from Geotest Inc.) is similar to Visual Basic. Anyway, I've tried to pass the sString by value and by reference... The result: nothing at all! The device wouldn't respond anything! I've seen that there's another post about this but the proposed solution doesn't work in ATEasy... Maybe in VBasic would .
For VB.Net, I passed ByVal, and had to initialise the string
Declare Function ps2000_get_unit_info Lib "ps2000.dll" (ByVal handle As Short, ByVal str_rtn As String, ByVal lth As Short, ByVal line_no As Short) As Short
Dim Str As String = "............"
Status = ps2000_get_unit_info(ps2000_handle, Str, 255, i)
Thanks for you advice, Chris! But I'm home right now and the Pico device is at work. I'll try your idea on monday. I hope it will work! I'll let you know anyway. Have a nice weekend, my friend!
God bless you, Chris! It worked! Only that in ATEasy it has to be ByVar (the string passed by reference) and a predefined string length has to be made (or initialization of the string). A fixed length of 10 chars is sufficient, I guess. Thank you for the idea of initializing the string! I would never have guessed that this is the key of the problem. Have a nice day! Keep in touch.