building a perfect CAN communication

VISA; TCP/IP, CAN and similar protocols
Ответить
CANewbie
interested
interested
Сообщения: 2
Зарегистрирован: 21 ноя 2012, 11:01
Версия LabVIEW: 2011
Контактная информация:

building a perfect CAN communication

Сообщение CANewbie »

Hello Labview experts,

My project is building a CAN communication.
I have modified the Vi that i got from Kvaser, to send data that i want. Now i only need to make it send exactly every 1 sec.

I'm looking from solutions how to make that? All suggestions are very welcome :)

This example that you see here will become all that is needed for CAN communication.
That means: -sending data that is read from file, so you can test a device for all different messages
-the communication starts and it stays on(i need to transmit new data every 1 sec ), and you can change PWM rate while it is working
-reading data,than is filtered so you can see all error and status bits
So this is a complete CAN master, with only 1 press on start and it does all the rest by itself.

Because I dont have much experience with labview i need to know if my beginer schematics is OK ?
The problem is, there is a while loop inside a while loop? I think this is my bad programming skills, please suggest me on that.
Should i change it to some complicated STATEMACHINE or some other REALTIME schematics with complete different design of loops ?!?!??!
I'm ready to do the work, i just need the advice in which direction to go.

Thank you very much in advance,
best regards
Tomi from Slovenia
Вложения
CAN While Structure full PWM ready.vi
(31.13 КБ) 258 скачиваний
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: building a perfect CAN communication

Сообщение Eugen Graf »

Hi Tomi!

I cannot test your VI, because I don't have the CAN driver, you used in them.
I think the VI should work right and there is no problem in using a while loop inside of a while loop. You have not to make the VI more difficult as needed :wink:

Eugen
CANewbie
interested
interested
Сообщения: 2
Зарегистрирован: 21 ноя 2012, 11:01
Версия LabVIEW: 2011
Контактная информация:

Re: building a perfect CAN communication

Сообщение CANewbie »

I'm sending you my CAN drivers, so you can test.
The LED light on my CAN interface only blinks once, when i press PWM ON button. So it means data is sent only once. Are you suggesting that my while loop is working and data is sent all the time???
Вложения
Kvaser CanVi 2011.rar
(24.4 МБ) 244 скачивания
Ответить

Вернуться в «Communcation with devices»