0
Answered
Stoted data communication through CAN bus for printing.
Supratim 8 years ago
in IQANdesign
•
updated by Ulrik Zakariasson (Software development) 8 years ago •
5
We know the stored data can be downloaded through IQAN run and printout can be taken. But one application customer is asking for the printout of the stored data in the machine itself, without connecting any Laptop. Small thermal printer can be used. As MD4 do not have any serial port, so we want to use another CAN controller which can connect serial printer for printing. Now our concern is to send the Stored data through CAN bus to other CAN controller. Please explain how to do that.
Customer support service by UserEcho
First you would need to store the data somewhere in the application that you can access (not the logs).
I am guessing that it is more then one instance of the value you want to store.
For that you need to use an array channel.
An Array channel can have a size up to 65535 (store 65535 different values).
You then store the data in the array with different index for each data value.
To then send the data you want you need to use a math channel to retrieve the specific data you want to send.
Then have a JPOUT and JFOUT to send the data over CAN to the printer.
How the message needs to be set up depends on the printer so i can not help there.
But you will need the receiving modules source address, the PGN for the message/messages that needs to be sent and how the messages should be structured.
I made a small example where i store the date in one array and the time in one and then you can select and index number and then send it over CAN.
The index that store the data count up automatically and then resets to 0 so when the array if full it will start over and replace the oldest value.
As i said, the CAN frame out does most likely not look like you need but i added it just to show how to connect it.
Array example.ids4
Does this technique work if you want to save your data to usb memory stick?
Not exactly.
To do that you need to save the data in logs and then retrieve the logs with IQNA software.
But we have no way to directly send the data from a master to a USB stick.
You will need a PC, or phone if you have a IQAN-G11 installed on the machine, to get the logs from the master.
You can use basically the same setup as i did in the example but instead of saving a value in the array you log the value.
There is of course nothing that stops you from doing both.
Or you use can bus data logger where is usb / memory card support?