LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FarSync Flex

Solved!
Go to solution

Hello everybody,

 

Has someone used a synchronous serial adapter named FarSync Flex made by FarSite? I'm having some problems to use it with LabVIEW. Any information about it would be really helpful.

 

Unfortunatly I didn't purchase together a toolkit named SDK that is almost mandatory to make it work (the sellers didn't warn me about it). I had been in contact with FarSite Support for more than two weeks and they had not sent me a decent manual neither were able to help me out. Today they closed our conversation. And for some reasons, I won't be able to purchase the SDK toolkits.

 

Luckily I have found this example on NI Community: https://decibel.ni.com/content/docs/DOC-30584. In the process to use the example I had to install a .dll library.

 

Althought it is very simple, the example and the .dll library made possible to communicate LabVIEW with the adapter. However, there is a flaw on this VI. When FarSync Flex stops receiving data, the VI keeps the last information on the string, making it seem that it is still receiving data. I would like to clear this string when it stops receiving data. The problem is that I don't know how to detect inside LabVIEW that it stopped receiving data.

 

Since I had to install a .dll library, I'm very limited to the example and I still couldn't find an answer for my problem. I tried to modify the .dll library, but I'm not very familiar with this type of file.

 

I hope that I was clear about my problem and that somebody will patiently help me.

 

Thank you very much. Best regards,

 

William Kiyoji Ariyoshi

0 Kudos
Message 1 of 8
(3,827 Views)

Hi,

 

I've made some changes in the VI in order to try explain better. See attached.

 

This VI only stops sending data when the user press the "Stop" button. There is no other stop condition.

 

If you want to send string when the loop stops, you can use the "IFsPort" with the Send property, as it is made inside de loop. There, the string isformed using the counter terminal of the while loop, but you can send another string. I've done this in the VI attached. 

 

Regards,

Pedro Ivo da Cruz
Engenharia de Aplicações
0 Kudos
Message 2 of 8
(3,780 Views)

Thanks for the reply, Pedro.

 

Unfortunatly I forgot to mention that my LabVIEW is the 8.5 version. Could you please convert your VI to this 8.5 version?

 

I'm afraid I will only understand what you have done by looking at it.

 

Thanks. Best regards,

0 Kudos
Message 3 of 8
(3,763 Views)

No problem. Here it follows.

 

Please, give me a feedback telling if it helped you.

 

Pedro Ivo da Cruz
Engenharia de Aplicações
0 Kudos
Message 4 of 8
(3,756 Views)

Thanks Pedro,

 

Unfortunatly I don't have availabe right now the equipment I mentioned, so at the moment I won't be able to test your VI with the synchronous serial adapter.

 

I observed that you added a new Invoke Node "IFsPort > Send" outside the while loop. I'm afraid that it won't solve my problem, since my problem is on the Invoke Node "IFsPort > Receive". The "Send" Invoke Node is working fine for my applications.

 

To be more accurate, for some reason I'm not able to use the "Receive" Invoke Node inside the "fsclient.vi". It only works inside the callback vi "fscb.vi". One of the reasons I have thought to explain this problem is because of the .dll library that I have to install before using this example. Do you have any other ideas to explain why I can't make the "Receive" Invoke Node work besides inside "fscb.vi"?

 

Thanks for your support. Best regards,

0 Kudos
Message 5 of 8
(3,747 Views)

Hi,

 

I am sorry for not responding. Have you found a solution?

 

Regards,

Pedro Ivo da Cruz
Engenharia de Aplicações
0 Kudos
Message 6 of 8
(3,675 Views)
Solution
Accepted by topic author WKAriyoshi

Hello Pedro Ivo,

 

Yes, I have managed to solve my problem. It wasn't a great solution, but it worked.

 

The problem was that when it stopped receiving data it wouldn't clear the string variable, making it seem that it was still receiving data. So I just made things in the following order for every reading loop:

 

1) Read the data received

2) Save it in a queue

3) Clear the string variable

 

This way I can also detect if I'm receiving data (when the string variable has nothing).

 

I was thinking that it would be something more sophisticated since I thought that I had to modify something of the dll library, but it was simpler than I imagined.

 

Thanks! Best regards,

0 Kudos
Message 7 of 8
(3,661 Views)

Hi WKAriyoshi, thanks for updating.

 

Good lucky with your project.

Pedro Ivo da Cruz
Engenharia de Aplicações
0 Kudos
Message 8 of 8
(3,652 Views)